From patchwork Wed Aug 21 08:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771016 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 6D45BC531DC for ; Wed, 21 Aug 2024 08:33:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qjsW1yylbVQTAbGLCAEtB6emhUQjd5g5lqQlrz+hL4Q=; b=ra2MEdfm022JLT kEjA7Yh4Qsno/c6qGdzP+EDRcS8U2slQq4In28ntQWEXT/3IHoCOLI8vo1XGWrxLKfKDxISfcJJDV pisNLEi0lfuHKzDIDpVUuo7HkCObISCTRH7SZTTEU/3aUbPfy6kJ+cjnG75fN7j71xQlQMQWh+Z/p ipmrC28RxGM+Ykt375CoUSFx+1GHrctV9w81i1FTrwSOa2V2xmXtnoCicpBLqbcROvf5m+tMOX1cc b+U+odk0yIGJuwdkUlmoP93UvTxEOQ/2Zj2Rxid84hsFfXN3gjfFzMR4xZgwYLSMnfjwa0BBpEpuB KEyhM2VUoH6QTPufVMXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm2-00000008590-0pxZ; Wed, 21 Aug 2024 08:32:58 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggf8-000000083Ij-0csn for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:51 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id D221A26018E; Wed, 21 Aug 2024 10:25:47 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id w4rYTOBLJoK3; Wed, 21 Aug 2024 10:25:46 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id BF3B3260983; Wed, 21 Aug 2024 10:25:45 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:30 +0200 Subject: [PATCH v2 1/6] arm64: dts: rockchip: enable USB 2.0 on NanoPC-T6 LTS MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-1-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012550_377824_ECC84660 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org FriendlyELEC introduced new version of NanoPC-T6 SBC. MiniPCIe slot got removed and USB 2.0 configuration has changed. There are two external accessible ports and two ports on internal header. There is on-board USB hub which provides: - one external connector (bottom one) - two internal ports on pin header - m.2 E port Top USB 2.0 connector comes directly from SoC. Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index ad8e36a339dc..bf2c4427ad74 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -182,6 +182,20 @@ vdd_4g_3v3: vdd-4g-3v3-regulator { regulator-max-microvolt = <3300000>; vin-supply = <&vcc5v0_sys>; }; + + vcc5v0_usb20_host: vcc5v0-usb20-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&usb20_host_pwren>; + pinctrl-names = "default"; + regulator-always-on; + regulator-boot-on; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "vcc5v0_usb20_host"; + vin-supply = <&vcc5v0_sys>; + }; }; &combphy0_ps { @@ -535,6 +549,10 @@ typec5v_pwren: typec5v-pwren { rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; }; + usb20_host_pwren: usb20-host-pwren { + rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + usbc0_int: usbc0-int { rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; }; @@ -911,6 +929,14 @@ &uart2 { status = "okay"; }; +&u2phy1 { + status = "okay"; +}; + +&u2phy1_otg { + status = "okay"; +}; + &u2phy2_host { phy-supply = <&vdd_4g_3v3>; status = "okay"; @@ -928,6 +954,10 @@ &u2phy3 { status = "okay"; }; +&usbdp_phy1 { + status = "okay"; +}; + &usb_host0_ehci { status = "okay"; }; @@ -943,3 +973,8 @@ &usb_host1_ehci { &usb_host1_ohci { status = "okay"; }; + +&usb_host1_xhci { + dr_mode = "host"; + status = "okay"; +}; From patchwork Wed Aug 21 08:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771020 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 980BAC52D6F for ; Wed, 21 Aug 2024 08:33:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tjTsb7Uf5zGOJIv6JmRy4ew6QEYB6xPZKsK/QoNpnfM=; b=SPiEm8XA65P/jG XZAF6ViYyUm50cKfm7fdCqjYPoRo2YLIW+R7SJrb6E3i6frdCy+nLmQNtKS9cG/iljRPaMZw88l9Q MsRzZJ97uFHLz4w5vX/KJM3B1alg9JJq8ODtMu713HMAzes/AVdCZK1Og7BAxu9v77xzuggB35b7q Le6NOG6LX6DSUs2kBKuULyqLbGLM9KOltbbxqSyysOpeeBQxxGdHZhbxBipQAoYSKaxi1UIulShVY 8FV45HWP/rgQL9WM9kJBxg6f/WMV/QqAptneE3oZ3xtwR/UtKMamdDnmTiQIgFP/Qr1yo8oWmGmKB T5Md+azyREEKRu/5eWhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm3-0000000859o-1aMT; Wed, 21 Aug 2024 08:32:59 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggf9-000000083JO-1yUy for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:53 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 7EEB5260983; Wed, 21 Aug 2024 10:25:49 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id Bl_mtQZers3B; Wed, 21 Aug 2024 10:25:47 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 200C12609DA; Wed, 21 Aug 2024 10:25:46 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:31 +0200 Subject: [PATCH v2 2/6] arm64: dts: rockchip: define pinctl for SPI M1 MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-2-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012551_800230_4142B4F9 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org FriendlyELEC NanoPC-T6 has 32MB of SPI flash connected to SPI M1 lines (always present on LTS version, optional on non-LTS one). Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi index 30db12c4fc82..75d5816b6fa4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi @@ -407,6 +407,23 @@ fspim0_cs1: fspim0-cs1 { <2 RK_PD7 2 &pcfg_pull_up_drv_level_2>; }; + /omit-if-no-ref/ + fspim1_pins: fspim1-pins { + rockchip,pins = + /* fspi_clk_m1 */ + <2 RK_PB3 5 &pcfg_pull_up_drv_level_2>, + /* fspi_cs0n_m1 */ + <2 RK_PB4 2 &pcfg_pull_up_drv_level_2>, + /* fspi_d0_m1 */ + <2 RK_PA6 5 &pcfg_pull_up_drv_level_2>, + /* fspi_d1_m1 */ + <2 RK_PA7 5 &pcfg_pull_up_drv_level_2>, + /* fspi_d2_m1 */ + <2 RK_PB0 5 &pcfg_pull_up_drv_level_2>, + /* fspi_d3_m1 */ + <2 RK_PB1 5 &pcfg_pull_up_drv_level_2>; + }; + /omit-if-no-ref/ fspim2_pins: fspim2-pins { rockchip,pins = From patchwork Wed Aug 21 08:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771017 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 5A199C52D7C for ; Wed, 21 Aug 2024 08:33:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zN0hyAlpy+PIyX2mentpRplZPYw2a90ECTNU2TLGxF0=; b=zUqpvRUWKBHzvI Dv1Hv7FB3U+hY4j/b50mRgvN0Kw17M6pOnt6pJ745V/wy3gBKxOIFSRGRG/GjwqvmtXTqKLTXbzv+ gP5OntWd9bVoX3JXxLMDM9TWS88IPsztwRfOjINa2J3ZS7BPy4aJr5h1nmKR8wlZ4QvNqQ04DOCCM lsiCRn+gSblPJrCIxUpUltp2VBfZwTVM+R8DicBV4mTYWT7VNVsN+rrmHAsCDRmqohGBq7amztTR+ YRtNeCdhkKAlZGfJF3stWu9G/mXdeVCJ0uL7apyYv0BV1J70QxbEdHdwQ0aT+8HbYP9mYqP5a+vYj Bat31iuPMcQKjk7+Q/Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm2-0000000859N-40bs; Wed, 21 Aug 2024 08:32:58 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggf9-000000083JB-1Fq6 for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:53 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id B4DB92609DA; Wed, 21 Aug 2024 10:25:49 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id 3i3Ws17Y5bza; Wed, 21 Aug 2024 10:25:47 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 97566260BCF; Wed, 21 Aug 2024 10:25:46 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:32 +0200 Subject: [PATCH v2 3/6] arm64: dts: rockchip: enable SPI flash on NanoPC-T6 LTS MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-3-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012551_524578_7F6B3A50 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org FriendlyELEC NanoPC-T6 LTS has 32MB of SPI flash on-board. On non-LTS boards this is optional chip. Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index bf2c4427ad74..0f9df64dc1b1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -594,6 +594,20 @@ &sdmmc { status = "okay"; }; +&sfc { + pinctrl-names = "default"; + pinctrl-0 = <&fspim1_pins>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <104000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <1>; + }; +}; + &spi2 { status = "okay"; assigned-clocks = <&cru CLK_SPI2>; From patchwork Wed Aug 21 08:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771022 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 BCB5DC5472D for ; Wed, 21 Aug 2024 08:33:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iPx/dYSvfNPisWHe6+WaqGjphTIwFo9g4s87rB1o7zw=; b=kO78Y9Mk8enDdn 2NoKyOe2DPNAbRs7D2l11jWqBI5nmNDOB6enfHmipaUp7v195pAyxZuFBU/+jiZpHzBg+aCNIx2hD hhjYLDH+4qJOZPKvAKUBzTqUOam8kDLk+uR4rQDcteMEG808Xk6CiHUMEdtyWbRDFoiLPuUhnsaM/ bpR7DX9kWl6/pVkfHKeQDvxxk5KwgT3+huXff93hvR+BPL+MoYsoF23l6M0OzgGHnBByHnZk5zm9k dsozlKP40xEyHhIH45MiHhYuIKSUhVBAKgtd/572jJGI0bD3cPltqOGKkCY2eD3enOXg9OKeDUZzP ISTEKvu7IryGlwIX4Szw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm3-000000085A3-3ANX; Wed, 21 Aug 2024 08:32:59 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggfB-000000083KO-1Uii for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:54 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 53523260BCF; Wed, 21 Aug 2024 10:25:51 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id 1LcJjemgMnRH; Wed, 21 Aug 2024 10:25:49 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id EE07F261993; Wed, 21 Aug 2024 10:25:46 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:33 +0200 Subject: [PATCH v2 4/6] arm64: dts: rockchip: add IR-receiver to NanoPC-T6 MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-4-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012553_577442_8F8797C6 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org FriendlyELEC NanoPC-T6 has IR receiver connected to PWM3_IR_M0 line which ends as GPIO0_D4. Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index 0f9df64dc1b1..57a9cf3da178 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -25,6 +25,11 @@ chosen { stdout-path = "serial2:1500000n8"; }; + ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>; + }; + leds { compatible = "gpio-leds"; @@ -254,7 +259,7 @@ &gpio0 { "HEADER_10", "HEADER_08", "HEADER_32", "", /* GPIO0 D0-D7 */ "", "", "", "", - "", "", "", ""; + "IR receiver [PWM3_IR_M0]", "", "", ""; }; &gpio1 { @@ -564,6 +569,13 @@ &pwm1 { status = "okay"; }; +/* Connected to IR Receiver */ +&pwm3 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm3m0_pins>; + status = "okay"; +}; + &saradc { vref-supply = <&avcc_1v8_s0>; status = "okay"; From patchwork Wed Aug 21 08:25:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771018 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 A737EC5321D for ; Wed, 21 Aug 2024 08:33:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y65u2zCGcn6f3qEDeVNVhjCZ4vjNi/U9+ckZQjosEcQ=; b=NUCGqPBUvF8HLe Y7gCku9pg6aUg/YJD+iBWS5OxHEY3ppcY3DSn/dgZq0BWfPFYaKSYKvvtiBO1zEiPR1fD3lRJzG6R 55N9+4gFgQz+tesK1yzG+KxUVazmhlSn8+syKlHqitePhasqXhdnkCMoj+wTgtIaawAEFvn3bfWjK kJN1bUufURb7x0joXbaGhJLmzXwb+hwEVt8IKAZMm2RfY/CfGt+o6hQguT+bWMr8dSJEH1oVOsVxU Kexx0d50zn+ghWxMKFjMtXDwf7rwhjaIYWr3SVAZhMf1PHWX8JZEgAZZ33p33u4O6egBqKfow5WOY FFfvxqked/QqNOJENitg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm4-000000085AT-0kRb; Wed, 21 Aug 2024 08:33:00 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggfB-000000083KQ-2B0y for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:56 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 84255261993; Wed, 21 Aug 2024 10:25:51 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id j5yZMT1yeP-v; Wed, 21 Aug 2024 10:25:49 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 67EFD2619C2; Wed, 21 Aug 2024 10:25:47 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:34 +0200 Subject: [PATCH v2 5/6] arm64: dts: rockchip: enable GPU on NanoPC-T6 MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-5-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012553_810241_101D2364 X-CRM114-Status: UNSURE ( 8.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Enable the Mali GPU on FriendlyELEC NanoPC-T6 Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index 57a9cf3da178..61b307371d4e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -322,6 +322,11 @@ &gpio4 { "", "", "", ""; }; +&gpu { + mali-supply = <&vdd_gpu_s0>; + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0m2_xfer>; From patchwork Wed Aug 21 08:25:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 13771021 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 0618CC5472E for ; Wed, 21 Aug 2024 08:33:04 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MInnWRX0C+nMPy3Fh7UMRnDOXDxj2QJ5rwyc5JAjDm8=; b=Fn2kalI+ABPgHT u6EHMnCY2EzZOo10f6ZsiqokAT2WMKrZCv9OdfLoGdghZ/5SmD7xCUPTZoG5drQsbTQldCAXeuM6H JsVHmPUykF0ibSplUbtOfued7C5XSnf6eIuwcY3CHObWPV2ulXu/bPMGJWezOfrZTdSMdvz3gWZ76 zYSk1hWL5M2KXySqsugB/gysP8ShS8Vxbdcn+XX0IpsQVC6VCbiiqfCTyt08PhP9IwwnTpoAIxvKe lkOyfL+BurDf4RQ93HRj0iuNXxK3ZTccKxavBE0v+GVx+sKzrDcVbd8EtW2Sj2qV4St0z1Q5Vthqj 5DOSQJGaTouVcV2yEPaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggm5-000000085BQ-13Pr; Wed, 21 Aug 2024 08:33:01 +0000 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggfC-000000083Kx-2Sca for linux-rockchip@lists.infradead.org; Wed, 21 Aug 2024 08:25:56 +0000 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 30D092619C2; Wed, 21 Aug 2024 10:25:53 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id Bp5BqIVJo_GC; Wed, 21 Aug 2024 10:25:51 +0200 (CEST) Received: from puchatek.local (79.186.29.241.ipv4.supernova.orange.pl [79.186.29.241]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id C44DA261A09; Wed, 21 Aug 2024 10:25:47 +0200 (CEST) From: Marcin Juszkiewicz Date: Wed, 21 Aug 2024 10:25:35 +0200 Subject: [PATCH v2 6/6] arm64: dts: rockchip: enable USB-C on NanoPC-T6 MIME-Version: 1.0 Message-Id: <20240821-friendlyelec-nanopc-t6-lts-v2-6-e0138bb10042@linaro.org> References: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> In-Reply-To: <20240821-friendlyelec-nanopc-t6-lts-v2-0-e0138bb10042@linaro.org> To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, Marcin Juszkiewicz X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_012554_860496_B765311E X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Enable the USB-C port on FriendlyELEC NanoPC-T6. Works one way so far but still better than before. Signed-off-by: Marcin Juszkiewicz --- arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index 61b307371d4e..c0d498486657 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -135,6 +135,8 @@ vbus5v0_typec: vbus5v0-typec-regulator { gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&typec5v_pwren>; + regulator-always-on; + regulator-boot-on; regulator-name = "vbus5v0_typec"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; @@ -410,6 +412,32 @@ connector { source-pdos = ; sink-pdos = ; op-sink-microwatt = <1000000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usbc0_hs: endpoint { + remote-endpoint = <&usb_host0_xhci_drd_sw>; + }; + }; + + port@1 { + reg = <1>; + usbc0_ss: endpoint { + remote-endpoint = <&usbdp_phy0_typec_ss>; + }; + }; + + port@2 { + reg = <2>; + usbc0_sbu: endpoint { + remote-endpoint = <&usbdp_phy0_typec_sbu>; + }; + }; + }; }; }; @@ -960,6 +988,14 @@ &uart2 { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + &u2phy1 { status = "okay"; }; @@ -985,6 +1021,29 @@ &u2phy3 { status = "okay"; }; +&usbdp_phy0 { + mode-switch; + orientation-switch; + sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; + sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + usbdp_phy0_typec_ss: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_ss>; + }; + + usbdp_phy0_typec_sbu: endpoint@1 { + reg = <1>; + remote-endpoint = <&usbc0_sbu>; + }; + }; +}; + &usbdp_phy1 { status = "okay"; }; @@ -997,6 +1056,18 @@ &usb_host0_ohci { status = "okay"; }; +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; + usb-role-switch; + + port { + usb_host0_xhci_drd_sw: endpoint { + remote-endpoint = <&usbc0_hs>; + }; + }; +}; + &usb_host1_ehci { status = "okay"; };