From patchwork Mon Jul 20 18:51:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11674479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C332813B4 for ; Mon, 20 Jul 2020 18:52:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D09522482 for ; Mon, 20 Jul 2020 18:52:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qWgqPNba"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="bYYIcYpQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D09522482 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sOvge0/bAxEZEAZ+iXdvyR1W4g4AItXthjctytwsICk=; b=qWgqPNba73dHvECkhP7iX5vLB GpHLNzq4GBXnibHtk/FYQJFAA58E8ZC71RCSoEQ30flzceEPIMAFtz6RgXRlUn1iJ+ZnHBak+MOJt KaF+dGbhR//wtduiXuHQcmPIG8SO6z13ldFm5GpWqWpnz6PgyrU3zvgncWRs4pqhlUM0CYQ5WRN/C 68CCA/atTiWkIziTY0qUPRWJDcJdIYkNCMfPtkzs6xWkNV8LEnnPH13IjDrlZ+iujDb5o03tcHCT4 ajGjIRY/PdjrZPoGK0EIRET+VLB2cwyJhhVJT6LK7Bdn+R2kGqg1z6tEfCoX3roaId92HzC6bRYwn uTdaYUNjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxau7-0002zI-Eq; Mon, 20 Jul 2020 18:52:47 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxau5-0002yF-I2 for linux-rockchip@lists.infradead.org; Mon, 20 Jul 2020 18:52:46 +0000 Received: by mail-pl1-x644.google.com with SMTP id x9so9099180plr.2 for ; Mon, 20 Jul 2020 11:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wpUasnmB4o6Pjbrfjg8n3mDLTrXsnyIXa7b2j1DH0iA=; b=bYYIcYpQHHKbFZIUd77WzxOjmybp+AdAKSzRzzBt9pDOxcj34qm47OqiKAwCZ1rOA9 f9KT9N6oqnYN+xjVrsgwhOfxQS90M9YSfJI51Y3ntwS112gnCwZDqXBB0X11JgbwcP1g a4reYXetj1caQzYLRlkontvMMJyxW2jKHtLb4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wpUasnmB4o6Pjbrfjg8n3mDLTrXsnyIXa7b2j1DH0iA=; b=moBrTIKRLwXz0XI7KZBTG3zZCSeFr8vApxHtVlml1zTu5c+oV+u0Q/WCo0Ofp1QWnu t5siT3c7vWFPBtApCjJhaZ05nSs43m9NxN51blD3dI/7nF+mXdmfvKCnMHWGgXeLA0t4 J8dYBHHMke3ujxAW08s9xuDhjdnOdFXpuuX+cCw+/VZNqiwxDldvsmkv/DjUZvBGhdy+ Eji9x26npbgl9jRyftck6Q7RHwd9KfzmmRjZpYSo2Qx9R4u0QNLgsYqvTm5lxuHfU6B0 0/b5/ZFeqvqHJkGOaQfe1/DTRZaPgiqGoX/C41iw660YEL9qTb5n9MxinXtu8iH2D9vk Q9dw== X-Gm-Message-State: AOAM532TfWjSENOldIdnhPowDNuR/q3UI7jaYCdBNu+5bWVuXFImmi0o lD1x68BAzhweGZf5QWaU2TLE9Q== X-Google-Smtp-Source: ABdhPJyKSxdqVNqs5H79tTDlWQup2h98y110x+yI7BUoO3UrIfDpY9w65g/NWTUzxrBYuaISRxr62A== X-Received: by 2002:a17:90b:1881:: with SMTP id mn1mr781562pjb.198.1595271163229; Mon, 20 Jul 2020 11:52:43 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id m9sm306649pjs.18.2020.07.20.11.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 11:52:42 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH 06/16] arm64: dts: rockchip: Add PCIe for RockPI N10 Date: Tue, 21 Jul 2020 00:21:10 +0530 Message-Id: <20200720185120.671064-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200720185120.671064-1-jagan@amarulasolutions.com> References: <20200720185120.671064-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_145245_628890_7B7D0C8A X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This patch adds support to enable PCIe for RockPI N10. Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399pro-vmarc-som.dtsi | 40 +++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/rk3399pro-vmarc-som.dtsi b/arch/arm/dts/rk3399pro-vmarc-som.dtsi index ebccc4a153..5d087be04a 100644 --- a/arch/arm/dts/rk3399pro-vmarc-som.dtsi +++ b/arch/arm/dts/rk3399pro-vmarc-som.dtsi @@ -11,6 +11,18 @@ / { compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro"; + + vcc3v3_pcie: vcc-pcie-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pwr>; + regulator-name = "vcc3v3_pcie"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + }; }; &cpu_l0 { @@ -142,7 +154,8 @@ regulator-min-microvolt = <900000>; regulator-max-microvolt = <900000>; regulator-state-mem { - regulator-off-in-suspend; + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; }; }; @@ -177,7 +190,8 @@ regulator-min-microvolt = <1850000>; regulator-max-microvolt = <1850000>; regulator-state-mem { - regulator-off-in-suspend; + regulator-on-in-suspend; + regulator-suspend-microvolt = <1850000>; }; }; @@ -304,6 +318,22 @@ sdmmc-supply = <&vccio_sd>; }; +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; + max-link-speed = <2>; + num-lanes = <4>; + pinctrl-0 = <&pcie_clkreqnb_cpm>; + pinctrl-names = "default"; + vpcie0v9-supply = <&vcca_0v9>; /* VCC_0V9_S0 */ + vpcie1v8-supply = <&vcca_1v8>; /* VCC_1V8_S0 */ + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + &pinctrl { hym8563 { hym8563_int: hym8563-int { @@ -311,6 +341,12 @@ }; }; + pcie { + pcie_pwr: pcie-pwr { + rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;