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: 1524 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 233513F03F for ; Mon, 20 Jul 2020 20:52:45 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id p4sf10945310pls.16 for ; Mon, 20 Jul 2020 11:52:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595271164; cv=pass; d=google.com; s=arc-20160816; b=WTtcDDARNhJvWC3q0rKrOlcui1JhsM/6Qp5VM/U6VjmQjbp0MUJ0aN2vtFnfDOjrkr hApso11zmpiz5oH4B3SzeQO9jzdj7a0mL5qLaIUeW3R5VNI2XzK5GRrlfC8GEbJOEp4C by+EdhVtRxpOEUCNrV6Tr7lMdZikmpK2QACCX4KSbZwNHszihMMo5iWyqSKsJWi8yXwq 5Y2AyxD0nnWNqJ4bfMuLR+tlaMW6CqgqaRN81jHHuaQYdQO7q27LfOggeDBnF75jrE+P cDC9lruYBGiIcK+PQVXxcGQhnj+1bJk5L/AOhxdylhWfs0lpf5YuWIHNg6S5suodx0Qn +mEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8z7Aa+rW9CufxKa94wAhbfgoEDEpc9OwX6wphtDn3dk=; b=i2QZL+a0HywxHBPxPt6TPQZ3jP/yAmcZe2oYV997J6LtowvX2oWYZRFzlqFT9tH01x vzR5R80eyALvwDNXeE6vBBBEa9tS6h6jQfnxoz1ZGhNyFI/L0xAy7iWoDjZ31dxKizAx 1fB/InpvpFDXuznHwXKzrBXeQKzB/wehYPhhIpUG7TCttustJUiUSrz0YYi6vhKv3WK1 Nki2LWHQbk7NV7DEQB60uP5fFkzjkCVe0fs8Gx0cv0GrSbLMCBcYc9OtnYHzfz4QZF/P iBWIxyg5vHvHm1avjUmW6aVC3UbS1Kk3ESEJxpbMwchYCwhxqeBZv+7rzqAjGw8oH4tx UkNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bYYIcYpQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=8z7Aa+rW9CufxKa94wAhbfgoEDEpc9OwX6wphtDn3dk=; b=ZZE0ucg+RWrJgjHw2iP8Pa8yWf7ReKepTD1fF2M92RljuIt6VUp5Lj3xSBP643Kfiz gqAnP4YYrB1TvLQdrZvQG6DfUN0NKT5AgmxjLUbcsX7+sLDNGSWzTvy+5BjCebS1a2+L ok5TdwPu6iXDSekPBLA003yn7akwiQGn6bKVo= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=8z7Aa+rW9CufxKa94wAhbfgoEDEpc9OwX6wphtDn3dk=; b=ScvkglfF3CcXl5oKRxsMz98LUst9yyK0JRxVyXJ5MDVQ7A9XIPQ3AMh6D3XbAc8LK4 609ctz17pqMFlq/tpwWzOdagzyuXppJZB6kCithk2Gw76ejbXciMNGm7CLgqgsmTPPq0 Sad2x3wtA5GHgZ2R2fWIp3kPBh5Eyd5Wi4ug1SGOHMGMqT6ZdzEDlpQ0hDkMceizybLc wx6MkJwQ+S/BSgda+cGL9wxPi5LcOsT3anTA5qEwUVAxDUWdSmUrKzx5ID4soVCkDOJX POp5zj/5csNqjd9HEsT78LXqg4zH01yJwFFxlALD4O3nOjjTIcrGmOt56YV73/+cb+a7 z62w== X-Gm-Message-State: AOAM530fU0mmgU8wkux/Qc3/q3aNghkYy5UMgGe9nZzI58kBSMJAuYgo LlKgU97u2Q2kQQ640wAuP3p5C3QU X-Google-Smtp-Source: ABdhPJzfeG64488Ibd999QCt0dYnjWW7/THUhdO76VQYBQu9RRaIO9Ldzz6iEeWMaBf23/qD0O5C8Q== X-Received: by 2002:aa7:9638:: with SMTP id r24mr21778201pfg.297.1595271163934; Mon, 20 Jul 2020 11:52:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:ce4d:: with SMTP id y74ls4915233pfg.3.gmail; Mon, 20 Jul 2020 11:52:43 -0700 (PDT) X-Received: by 2002:aa7:8bcb:: with SMTP id s11mr20205925pfd.170.1595271163521; Mon, 20 Jul 2020 11:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595271163; cv=none; d=google.com; s=arc-20160816; b=y3uMilZ9OlPV4aEGlm/pYurUpCzUKNucd1B22/gH+s933RV5WaiWwawH+kvY9nEBk7 L4O5zDT6lvz0YE9Kr1voy2g5Qw4au5EkKShDwR8NHP4Hi0YGPRJ6jpbW2htI4NoZq59M 3jZ4JPfcMQRLAYx7/BpxjuLFvPgPTRstnJ8LMUMd+6/UsnSvfO7622EJk39FwCA2zxbz JBGvPTWvXqEcGHQrBbyactfJTIx5iXj2JnPGfANZCCG0i1GoqB4JGMsvlrx7xBdM9UyB FrTat6++xaMCBnqLCTQaHfnsfhgNghoEj8M21dnrSOOPWPVGxgdyFrGQFq0ChgXjEiOf 7NMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wpUasnmB4o6Pjbrfjg8n3mDLTrXsnyIXa7b2j1DH0iA=; b=y8yBE9lF6/Yxaq8aBdjKp6R5rB7VmRJn23SyRbiJWxvp8ntWba+8Yr+hIMnLydtGYo izIDAZdtk8UCRL6NxFiX4vTjyKOrUt8WHWe0KA1GzGN+2VRW8doqNhJmXUyiJI/yvbUc JR9HbHqu2fyBA/v4Of25CcqqV07NkVIqpjpHENsJb8LldjNo/Um6SR+BAlqg2QaQSofQ Zw9jka5Gc9jcZyixJpP2Ii3zyqbXpqxVVidK+blJsrR93lqFGmsWQit0FfNukJMTI1Ai itj+bPbrqxM2S6pQ+9/IZDUa0gJjy3PAlXVCucJEDjeEo9byn3yyNgeH/0HZaWj9A7p4 C0OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bYYIcYpQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o11sor544686pjo.28.2020.07.20.11.52.43 for (Google Transport Security); Mon, 20 Jul 2020 11:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bYYIcYpQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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>;