From patchwork Fri Mar 8 15:46:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 13586977 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 39B6FC5475B for ; Fri, 8 Mar 2024 15:46:43 +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=qOVeZr1C6mmIbfnpakI8Jl07Lt6j7uMa1LfzQj3vq4Q=; b=BwC2G1u4frsCVw wXWHHACtBOOV3867YWVF2Bte+mikLX/jgJQVceLRdenVv9x1zogKe41Vc8d+cfXFq0gaBNJgts07o LzVIPldm2w+5GivQLad7fVCfvPlqptqdBCIlxIK6eQ9wNZXogtxUxFtg499qATPbFVCpfPesmK+ka gpFrwVDlJYoaBEZkPmVf3aB9Ljm1SIO0tbUxpmzEyDxKnW2/aWjDFB7815vTfRuMftjOaiaM6P1Fw 6Iunm+PGPFP8rEyy4/OaMq6ESw6/QJyiuKYy9m1ZaCpSn+UmIp+3TddTnRd4krqQ7iP9vTX8wsuJa wKsG2Id7aB5LyNGNU5Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQa-00000009xnC-08nw; Fri, 08 Mar 2024 15:46:32 +0000 Received: from smtp-8faa.mail.infomaniak.ch ([2001:1600:4:17::8faa]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQV-00000009xjK-2jEi for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 15:46:29 +0000 Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TrrB90RFXzMpvmL; Fri, 8 Mar 2024 16:46:25 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4TrrB83sMlz3g; Fri, 8 Mar 2024 16:46:24 +0100 (CET) From: Quentin Schulz Date: Fri, 08 Mar 2024 16:46:07 +0100 Subject: [PATCH v2 1/3] arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID for RK3399 Puma MIME-Version: 1.0 Message-Id: <20240308-puma-diode-pu-v2-1-309f83da110a@theobroma-systems.com> References: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> In-Reply-To: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Klaus Goger , Quentin Schulz , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_074627_841238_8E546CCB X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. 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 From: Quentin Schulz The Q7_USB_ID has a diode used as a level-shifter, and is used as an input pin. The SoC default for this pin is a pull-up, which is correct but the pinconf in the introducing commit missed that, so let's fix this oversight. Fixes: ed2c66a95c0c ("arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode") Signed-off-by: Quentin Schulz --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index 214ea62b24a5b..a51ebb8f8b80f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -459,7 +459,7 @@ vcc5v0_host_en: vcc5v0-host-en { usb3 { usb3_id: usb3-id { rockchip,pins = - <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; }; }; }; From patchwork Fri Mar 8 15:46:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 13586980 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 4BA9AC5475B for ; Fri, 8 Mar 2024 15:46:55 +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=xZg9CW66UKVHLN96mrqFAq7X2T8z0o3C+GLBXLmqH0E=; b=FdQgX9ezaPzUYc iF8AJv7Ou8IGZFH1Vd4s0CNArKafmImjNRtKow9UnJ2xSaCkiDo+jsx3L41xK5jV0gb5QwYHzkuVU UaejLvTmpTaNoQb/WoA/v3KsusCW77Xpc3hZ7pBdyDAiNzaAeCtx1H27xtS9fMiNnGvuDarT5N3dB Dm/00bBP1J8AkOPfNqQQH0tCGEwXA8KT++eZv773WLlfTQS4tjrYxxcHnJy0qgtEq39zQO5U1hfct cHL3mJjIvd7YeLvRn5oVe8dcn+T8MfiLAhiqCAyIuxCCgGEGfW+S3qZHIM/FNVnPZEAfLD7a8/x0r RjlEf/ii+XXJkWwYvSHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQi-00000009xsu-3USs; Fri, 08 Mar 2024 15:46:40 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQh-00000009xrG-2SSv for linux-arm-kernel@bombadil.infradead.org; Fri, 08 Mar 2024 15:46:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=0bE3n1slM4C82EoALcJZuc/laC4BI4jcTP5dPsRCiR8=; b=M6CxWs1pHt8CVtYaVVIIAVP/KH XrZy9zmRJzCc3zcEHXaI8aAUiLDeUESgQbNZzgBsJzPcMly2rWDCkx38GSNpCQDADG+PyJU/Zvede AxMlvvaW0qQwe6jPCFPO0ZqHGbDs2bVz+3cLP8pTFqECH3Sv6PYX2YSHuRpURUUhwXCXqqs0dcN2o 5Ru+vH6ad+6LCJITQNtFGr8Zo4d2xi3QERc/BsuyfNTJh3fEjGfO+Rn2fsLyqmhl/LGuzKHS9hm1i AORH6RrgFn5u/bn82i5Dw6YB3cdNfmxtf3HPj742r+NmeSt0HxSQcBE6XOy5+hXcaBhLtYmiHlyk/ 4+ODT5QA==; Received: from smtp-8faf.mail.infomaniak.ch ([83.166.143.175]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQe-00000007KWf-0zYA for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 15:46:38 +0000 Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TrrB94fWyz179d; Fri, 8 Mar 2024 16:46:25 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4TrrB90Knxzr1; Fri, 8 Mar 2024 16:46:25 +0100 (CET) From: Quentin Schulz Date: Fri, 08 Mar 2024 16:46:08 +0100 Subject: [PATCH v2 2/3] arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma MIME-Version: 1.0 Message-Id: <20240308-puma-diode-pu-v2-2-309f83da110a@theobroma-systems.com> References: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> In-Reply-To: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Klaus Goger , Quentin Schulz , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_154636_401183_530BC063 X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. 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 From: Quentin Schulz The PCIE_WAKE# has a diode used as a level-shifter, and is used as an input pin. While the SoC default is to enable the pull-up, the core rk3399 pinconf for this pin opted for pull-none. So as to not disturb the behaviour of other boards which may rely on pull-none instead of pull-up, set the needed pull-up only for RK3399 Puma. Fixes: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM") Signed-off-by: Quentin Schulz --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index a51ebb8f8b80f..2484ad2bd86fc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -416,6 +416,11 @@ &io_domains { gpio1830-supply = <&vcc_1v8>; }; +&pcie_clkreqn_cpm { + rockchip,pins = + <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>; +}; + &pinctrl { pinctrl-names = "default"; pinctrl-0 = <&q7_thermal_pin>; From patchwork Fri Mar 8 15:46:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 13586978 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 63080C5475B for ; Fri, 8 Mar 2024 15:46:47 +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=vdHtnkC5TZbKdSrol/AlpCtW1fXfsV+6HMvb6blqmQk=; b=aqYBWnPzakPXQ4 2EJhVZM2AW9gAlSXqutRKOAf+IStfXp5aGEPBH6W/lUjpSobrgN9Ek/RWUIVGEuSP/f1KyYYLjyRb AdgA85oHaXCNgpz9suM8n7O0nX312m5Wv3udK8LT8EOmVeonUGmTgbST7D5Yz41W9dLR1nh+4NvA6 MjOk6FfEBRpa374kW64mbhsDrFqAJp1nP61G4MRVfQN1LpOggLgzNM21IQeB523I5CcY60EUe+1pk Lfx17u3jpv9z6xYzSSRs/pjVYitsPmb399j9GP6uEu9mIlksYwvnagxgnJuFZLV062Vxnz09DhhIh WUe9a2eEQElykTOvuqmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQe-00000009xpD-0EhR; Fri, 08 Mar 2024 15:46:36 +0000 Received: from smtp-bc0d.mail.infomaniak.ch ([2001:1600:7:10::bc0d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ricQX-00000009xk5-1EK5 for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 15:46:31 +0000 Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TrrBB2DqHz14Qt; Fri, 8 Mar 2024 16:46:26 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4TrrB9553Rzr7; Fri, 8 Mar 2024 16:46:25 +0100 (CET) From: Quentin Schulz Date: Fri, 08 Mar 2024 16:46:09 +0100 Subject: [PATCH v2 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou MIME-Version: 1.0 Message-Id: <20240308-puma-diode-pu-v2-3-309f83da110a@theobroma-systems.com> References: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> In-Reply-To: <20240308-puma-diode-pu-v2-0-309f83da110a@theobroma-systems.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Klaus Goger , Quentin Schulz , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz , Dragan Simic X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_074629_523100_25A79410 X-CRM114-Status: GOOD ( 10.29 ) 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 From: Quentin Schulz The PCIe PHY requires two regulators and are present on the SoM directly, while the PCIe connector also exposes 3V3 and 12V power rails which are available on the baseboard. Considering that 3/4 regulators are always-on on HW level and that the last one depends on a regulator from the PMIC that is specified as always on, this commit should be purely cosmetic and no change in behavior is expected. Let's add all regulators for PCIe on RK3399 Puma Haikou. Reviewed-by: Dragan Simic Signed-off-by: Quentin Schulz --- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 2 ++ arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts index 18a98c4648eae..66ebb148bbc9a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -194,6 +194,8 @@ &pcie0 { num-lanes = <4>; pinctrl-names = "default"; pinctrl-0 = <&pcie_clkreqn_cpm>; + vpcie3v3-supply = <&vcc3v3_baseboard>; + vpcie12v-supply = <&dc_12v>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index 2484ad2bd86fc..ccbe3a7a1d2c2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -79,6 +79,26 @@ vcc5v0_sys: vcc5v0-sys { regulator-max-microvolt = <5000000>; }; + vcca_0v9: vcca-0v9-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcca_0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + vin-supply = <&vcc_1v8>; + }; + + vcca_1v8: vcca-1v8-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcca_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc3v3_sys>; + }; + vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = <&pwm2 0 25000 1>; @@ -416,6 +436,12 @@ &io_domains { gpio1830-supply = <&vcc_1v8>; }; +&pcie0 { + /* PCIe PHY supplies */ + vpcie0v9-supply = <&vcca_0v9>; + vpcie1v8-supply = <&vcca_1v8>; +}; + &pcie_clkreqn_cpm { rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;