From patchwork Tue Jul 21 15:24:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1551 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2ABF93F03F for ; Tue, 21 Jul 2020 17:25:23 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id p4sf12721259pls.16 for ; Tue, 21 Jul 2020 08:25:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595345122; cv=pass; d=google.com; s=arc-20160816; b=lEPelB6IXGot2cPxbh04aVDLYItRhY4CKP+HnOolBjjS3bx3aApg4QeZLh6OduOvmD A8MsiVfh36tA8ZtZYPxdBv6E8vAH84tV5sN8zAOGFADks/9tyDm957L0yzTtW5KrhVWD yDf9TnIrBPPPAhVWIbDKTluKoLndTaphsRMTHqCIx4sGjEdDcau5BK6IdzopuEeNGl8z KcR6qAD08PNF/k2qI9CiScoXfXfm/UkpMMevEMfw7Il5STcSegcWWzA2/ArkYiDSFU9J ygwZ7mXx+GDMaF0+53Am7+od4WUHTlhisgg7tmKAmJk+PC3fWiGWaa3g6seqVHmQJFBL cjnQ== 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=1wddO7aftPtLFJr64nwsOT8iFmgAjmxLv6IEepJpMHc=; b=kJrPClZMaKjIF9GFa8fZziGsM9e823bPR4+pk4lrTsLY4LpJYXE+DbQNxx+Dbxgk77 zbTg+4hylC8VRW7FyDYBJzqKAN9ATjGZqLAUBQL2YYRz6s0yFETmoUmE0q+zCjfvO/cp vFlcJxPzUIGITwPsrnlFupR11DTBjqrNBOlBX/YBDkFuskcKIGcaIxesG7wFJs3qvL59 3y3OvM6xgQ17eKUxJjEC9kTuC2rxDn3icZFa5ojz6DPsfgxlJB9oD7MyMP0OM9Y7JoX+ 8Fd41PIjf2mFVsGu49d/nYyQOPasP4SPfi5caAQgNHywfxRSRww0z8VeJS2XWAjDPIos /UEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hl+USTDx; 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=1wddO7aftPtLFJr64nwsOT8iFmgAjmxLv6IEepJpMHc=; b=d71t17s4vYH5oXWndTqXtJV9DPJzNnInsf+ydymjDe3J1oqULeQKqoofnIy8suraOa a+M0vFq4xeQGdKetFAle7X/fztDdrfkDmdgIoRPiUj7QHRkHHgh3+payO7FgfYKw4L/C zEZ3pus3SuL5FTkmC2jt6FykJIdrgfrosr088= 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=1wddO7aftPtLFJr64nwsOT8iFmgAjmxLv6IEepJpMHc=; b=VV89qgbs0xn+tg322aprdVlJ51VmawClkJfyco0IdlkC9ziJ69I8aAEl4xZG3n/haR ay8qv6ZMiKL6Sy5LNpcRvN3c9RpwfJf0xZdGACO7W+du/HmjYlGoMpWn0cRxxYvnyKDk JwO7ng4mB6uTy2msIGv3GmhorRdPcdb1egn7DVHtwUtvLdXAcbcyjP7gUd6l9kH4qQ8P j6JasW1BDBrYhrQHd2MZ1TIQonBiqH1bEe9z5iHHbsifLCzZJd2BS2z6sOr/gorNVdyI A90xkzLh6ki4BqgmzBNfHO9WPAsV22ik53CYE7pF2GO3sfb7+Ix0fuplEHiwsWc8g6vY PN7w== X-Gm-Message-State: AOAM5330v173Wo8I7lk98YgW/X0E5LJy2m0bUQCrQTGQmOgKYrTPcM93 Y88LoZgI412ljF79wDhO5RQIlMy6 X-Google-Smtp-Source: ABdhPJz/qVdwC3Dc5Etp3Q8x3B8bg/qqruYEv6/xHA5+841h+UDfzrZLbpPjdsXVfUhzeHdYxYds8A== X-Received: by 2002:a17:902:a717:: with SMTP id w23mr22531810plq.292.1595345121852; Tue, 21 Jul 2020 08:25:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:f450:: with SMTP id p16ls2919558pgk.5.gmail; Tue, 21 Jul 2020 08:25:21 -0700 (PDT) X-Received: by 2002:a65:6086:: with SMTP id t6mr10344418pgu.342.1595345121462; Tue, 21 Jul 2020 08:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595345121; cv=none; d=google.com; s=arc-20160816; b=RH6Vu5+mnrvj+idGqAxoAEu931iDPZpcVgVfd7v3C3VL87sjTeLVaCfRvMfWGkwD4j AXdTuJJ8BX8DwBv+dGoa0Ik9u+OH8kF07O5XZiBAxKjiEQTnb2gk8rY2FS8MWmtuPtyy XJC4e07hGwVZqNqrhg3m/Gmljjmz5FuePm9+07wnBX5EOR7hhNa9j0tEmzxVqZNBeukS r8gf7ON6nUvmvmID5Ln0nznOoNZN6My6GNd9YBb8zd35i/QczCQF7zQK5S0//fS1YZaw kf3ylEGuQ/KyhHNF0u9ZCOwP7i9llh0llPslsO0iZ86JOF4d1gKDCq2xC6puFWP4NGKy CBCA== 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=zKhxh2lgPaF4LV5PcwNy8PqcpiHuC77A0XY9JcDjdz4=; b=sjYEH7ffA09UufeDqGWCJioFIoD3FFfnjvcOrOAkAO0S6mHLY/2+7BAK5XSLIL7j80 BhmBzUvAZvPkpvrxbFi3ard2NWJn5HQDQIxEhUUAxOdK1J5xbTuaHNz9ov1w0uRCgVk2 i52p76WZmCUaC7uFce+E0WwSlkHr0dTAWjyCw3KKrxAlBwptJPEbfuVI0mJ1l0/zU1JJ qlpPF8nC6zixUe/n5WI0LPgeq0ZvymloetF8zHbFAMreE5DNv9pdcmnacyyRjVLGTs5K K/BFG3tAExGUvW5XsaxJ0B2QW5oQDCRqFSBOtWxFVUJfvfZyxROrGx234s3CdViufjUA 2ehw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hl+USTDx; 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 e69sor24590112pgc.23.2020.07.21.08.25.21 for (Google Transport Security); Tue, 21 Jul 2020 08:25:21 -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:a65:640c:: with SMTP id a12mr23070683pgv.88.1595345121200; Tue, 21 Jul 2020 08:25:21 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:3df7:ef76:b2b5:fa14]) by smtp.gmail.com with ESMTPSA id h131sm2876838pfe.138.2020.07.21.08.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 08:25:20 -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 v2 06/12] arm64: dts: rockchip: Add PCIe for RockPI N10 Date: Tue, 21 Jul 2020 20:54:40 +0530 Message-Id: <20200721152443.37602-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721152443.37602-1-jagan@amarulasolutions.com> References: <20200721152443.37602-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=hl+USTDx; 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 Reviewed-by: Kever Yang --- Changes for v2: - none 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>;