2024-03-08 15:47:22

by Quentin Schulz

[permalink] [raw]
Subject: [PATCH v2 0/3] rockchip: small DTS fixes for RK3399 Puma

There's a pull-up missing on a pin that is used as GPIO input for PCIe
which will make the diode/level-shifter not let voltage pass and thus
not allowing the state of the pin to change.

Also add the missing regulators for the PCIe PHY+connector though this
is purely cosmetic.

There's also a missing PU on the USB ID pin used as a GPIO input, so
let's add it for the same reasons as the one used for PCIe listed above.

Note there's a light dependency on
https://lore.kernel.org/linux-rockchip/[email protected]/T/#ma0499cbc5e5c20f1a4c6b8452baa2d296abe2d0d
to prevent a git conflict for the maintainer(s).

Signed-off-by: Quentin Schulz <[email protected]>
---
Changes in v2:
- added underscore in regulator names to match schematics,
- reworded commit log for PCIE_WAKE# pull-up as suggested off-list by
Heiko,
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Quentin Schulz (3):
arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID for RK3399 Puma
arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou

.../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 2 ++
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 33 +++++++++++++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
---
base-commit: 370e52abbf8306f09b0022995ad7ccdff3a834bb
change-id: 20240308-puma-diode-pu-1d2f4551be6d

Best regards,
--
Quentin Schulz <[email protected]>



2024-03-08 15:47:36

by Quentin Schulz

[permalink] [raw]
Subject: [PATCH v2 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou

From: Quentin Schulz <[email protected]>

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 <[email protected]>
Signed-off-by: Quentin Schulz <[email protected]>
---
.../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>;

--
2.44.0


2024-03-24 23:31:05

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] rockchip: small DTS fixes for RK3399 Puma

On Fri, 08 Mar 2024 16:46:06 +0100, Quentin Schulz wrote:
> There's a pull-up missing on a pin that is used as GPIO input for PCIe
> which will make the diode/level-shifter not let voltage pass and thus
> not allowing the state of the pin to change.
>
> Also add the missing regulators for the PCIe PHY+connector though this
> is purely cosmetic.
>
> [...]

Applied, thanks!

[1/3] arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID for RK3399 Puma
commit: e6b1168f37e3f86d9966276c5a3fff9eb0df3e5f
[2/3] arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
commit: 945a7c8570916650a415757d15d83e0fa856a686
[3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou
commit: d7ed698abc28b2886c9fc71d17ca6b023fcf47f3

Best regards,
--
Heiko Stuebner <[email protected]>