From patchwork Mon Sep 18 14:13:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13389703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 008FCC46CA1 for ; Mon, 18 Sep 2023 14:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pEsmE3IQ2wyhyAJHQvd91+tIgNyUcRAlsye00i0tDtQ=; b=yoGDhupWSANEO/ LZV9TAwi2mXeQYwuKCrsLX+iW2O6+lJj96JCPweLOvqrgzRszjFR333W2cBR7c3n3CrRPFYH3q8Gh LvQEAr/xX8iRhaZo0FTlDqGUOj16xTUJasNiQ+yCUZcDo2XS3ndLnZiOTfC23KMynMoWgOsjn7lIo 68YGpgkbrPAdIlaLUc5d5k6kMQnl8tn7jViuLS55otgy8xhtOBKvLLMiUV5HTZxGPVRh6GM9hnvmn InWXBaEZTgKexHbYbrxxRLUotnxWzgs6FP7+tk1MR2vkJHn/QBcf8FarAYHrO0UUz2Rpe8umKC2Nu UGR0M6DOew2ghcAHDG3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiF0W-00Fd41-37; Mon, 18 Sep 2023 14:13:48 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiF0T-00Fd2c-1c; Mon, 18 Sep 2023 14:13:46 +0000 Received: from jupiter.universe (dyndsl-091-248-188-252.ewe-ip-backbone.de [91.248.188.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 792236607186; Mon, 18 Sep 2023 15:13:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695046419; bh=enW2m29ypYPXpGzyCbTR/AHHgm5vTOl3q1dCsoF4g/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dWyBybuSDGpG0fqByImzxXWY0GaaL+nWEkLMDTcImvxUDKB7fqZykur9JM6H5QqeT NT/Ytnv//lo8fSsnU90uS9RowCy6kRD8i1SdYXt0JHH/xNshIlHxDU5v3DfDIU/K2R KraH6UOnc9tbis+ZSeXlQp0CvOOf60dnMfz+BV2mjv6klkP6nVNy8zxbxbXhBsxwKz IFZx/m3u7UsqHibRVszimV6H3B87D9VZowiDDGw3BQ2aKEJqX6dhc0/aSPl7pEjjDN a3hkv6ZxBKh9cJjXglZUFoA2wZMM6k3KllnRRWZsM4T5oKYnMrc4UAK0THS+EYzRjo JLHqXnUki2uww== Received: by jupiter.universe (Postfix, from userid 1000) id 813374800CF; Mon, 18 Sep 2023 16:13:37 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH 1/2] arm64: dts: rockchip: rk3588-evb1: add PCIe2 network controller Date: Mon, 18 Sep 2023 16:13:26 +0200 Message-Id: <20230918141327.131108-2-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230918141327.131108-1-sebastian.reichel@collabora.com> References: <20230918141327.131108-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_071345_668200_9C576C04 X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The RK3588 EVB1 has a second network card, which is connected via PCIe2. This adds support for that. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-evb1-v10.dts | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts index 229a9111f5eb..23bef9faa690 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -29,6 +29,26 @@ backlight: backlight { pwms = <&pwm2 0 25000 0>; }; + pcie20_avdd0v85: pcie20-avdd0v85-regulator { + compatible = "regulator-fixed"; + regulator-name = "pcie20_avdd0v85"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + vin-supply = <&avdd_0v85_s0>; + }; + + pcie20_avdd1v8: pcie20-avdd1v8-regulator { + compatible = "regulator-fixed"; + regulator-name = "pcie20_avdd1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&avcc_1v8_s0>; + }; + vcc12v_dcin: vcc12v-dcin-regulator { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -87,6 +107,10 @@ &combphy0_ps { status = "okay"; }; +&combphy2_psu { + status = "okay"; +}; + &cpu_b0 { cpu-supply = <&vdd_cpu_big0_s0>; }; @@ -163,7 +187,20 @@ rgmii_phy: ethernet-phy@1 { }; }; +&pcie2x1l1 { + reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie2_1_rst>, <&rtl8111_isolate>; + status = "okay"; +}; + &pinctrl { + rtl8111 { + rtl8111_isolate: rtl8111-isolate { + rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + rtl8211f { rtl8211f_rst: rtl8211f-rst { rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; @@ -177,6 +214,12 @@ hym8563_int: hym8563-int { }; }; + pcie2 { + pcie2_1_rst: pcie2-1-rst { + rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + usb { vcc5v0_host_en: vcc5v0-host-en { rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; From patchwork Mon Sep 18 14:13:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13389704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01ADECD37B0 for ; Mon, 18 Sep 2023 14:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PtQcsxyq2+WFPLeKX8qkWP6eViB380+SPTOMRSaQEb0=; b=XOZZLADmxLAz9w PbNm+TGBfq81BH+SxRlJRP1LU/vtZjRiHOgOj9APWG1v3oMPpXblA5PW4voHAR+D/hm8FLIKbtiQh jPye7FTmYWpRWul2cVihL4N37o3OUaDAj4Zw54dvmbgTSUWPLeQK0qJcOpUtt/HSED8k0A7rftkfL fko4D0rbIU+173NyIw4XkFP9T47OcvlBWev4wqy2ly8Imgjz9if0Rq4HgF/s3bq9/KjXCLVrg5/TL EzLT77aJEbdz1oR/OQzkklIldQUw7lPdrYqamjHmEcIOThgR7bqPbSTFbxJ3C0VrWvn0JJRBq8XYs DsGaoac4fLw3b33TQEhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiF0f-00Fd61-32; Mon, 18 Sep 2023 14:13:57 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiF0T-00Fd2d-1Z; Mon, 18 Sep 2023 14:13:48 +0000 Received: from jupiter.universe (dyndsl-091-248-188-252.ewe-ip-backbone.de [91.248.188.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 848E86607197; Mon, 18 Sep 2023 15:13:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695046419; bh=LXDsfmpgz/S+OdLyVgEiEXXE5p+Ro4TcKEscm/IBY6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Id8Dl4YTEa5H93pJEpd+uJPplow+uowCumBASpPTzsAbKUX+M3rgF+CmAoM38z5h3 6lHCkUlvir10SCy3MOqEk5bkUwqSiSwIQCCbqn7bWqppr0rRcNXWnM2jkMHWuxyatC OWQrc7RveiVCuTfjr4cOaR0hlbM5UKBBErJvlaYkXA5tu7iaSHCBn0gVZHZIYGYuyG ikxhy0DrvSDQN10IykYg/zHPypjSOLRusoO+FHsWlS6NUBkFhbsNsd/w3trABCQisz pm4GlyS4tS8BGTVEhpeRfnuwruEIVfk+kTQDnpVZZ1Sjp2g2iSp56VO5wz4nPsw6ek cTgfrc27scQ5g== Received: by jupiter.universe (Postfix, from userid 1000) id 834554800D0; Mon, 18 Sep 2023 16:13:37 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH 2/2] arm64: dts: rockchip: rk3588-evb1: add PCIe3 bus Date: Mon, 18 Sep 2023 16:13:27 +0200 Message-Id: <20230918141327.131108-3-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230918141327.131108-1-sebastian.reichel@collabora.com> References: <20230918141327.131108-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_071345_671430_D9B8CBD7 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable PCIe3 support, which is exposed via a PCIe3 connector. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-evb1-v10.dts | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts index 23bef9faa690..c3fe58e39e99 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -49,6 +49,26 @@ pcie20_avdd1v8: pcie20-avdd1v8-regulator { vin-supply = <&avcc_1v8_s0>; }; + pcie30_avdd0v75: pcie30-avdd0v75-regulator { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd0v75"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <750000>; + vin-supply = <&avdd_0v75_s0>; + }; + + pcie30_avdd1v8: pcie30-avdd1v8-regulator { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&avcc_1v8_s0>; + }; + vcc12v_dcin: vcc12v-dcin-regulator { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -58,6 +78,19 @@ vcc12v_dcin: vcc12v-dcin-regulator { regulator-max-microvolt = <12000000>; }; + vcc3v3_pcie30: vcc3v3-pcie30-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_pcie30"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; + startup-delay-us = <5000>; + vin-supply = <&vcc12v_dcin>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc3v3_pcie30_en>; + }; + vcc5v0_host: vcc5v0-host-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_host"; @@ -194,6 +227,18 @@ &pcie2x1l1 { status = "okay"; }; +&pcie30phy { + status = "okay"; +}; + +&pcie3x4 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie3_reset>; + reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie30>; + status = "okay"; +}; + &pinctrl { rtl8111 { rtl8111_isolate: rtl8111-isolate { @@ -220,6 +265,16 @@ pcie2_1_rst: pcie2-1-rst { }; }; + pcie3 { + pcie3_reset: pcie3-reset { + rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc3v3_pcie30_en: vcc3v3-pcie30-en { + rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + usb { vcc5v0_host_en: vcc5v0-host-en { rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;