* [PATCH 1/3] arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID for RK3399 Puma
2024-03-08 12:52 [PATCH 0/3] rockchip: small DTS fixes for RK3399 Puma Quentin Schulz
@ 2024-03-08 12:52 ` Quentin Schulz
2024-03-08 12:52 ` [PATCH 2/3] arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# " Quentin Schulz
2024-03-08 12:52 ` [PATCH 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou Quentin Schulz
2 siblings, 0 replies; 5+ messages in thread
From: Quentin Schulz @ 2024-03-08 12:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: Klaus Goger, Quentin Schulz, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Quentin Schulz
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
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 <quentin.schulz@theobroma-systems.com>
---
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>;
};
};
};
--
2.44.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/3] arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
2024-03-08 12:52 [PATCH 0/3] rockchip: small DTS fixes for RK3399 Puma Quentin Schulz
2024-03-08 12:52 ` [PATCH 1/3] arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID " Quentin Schulz
@ 2024-03-08 12:52 ` Quentin Schulz
2024-03-08 12:52 ` [PATCH 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou Quentin Schulz
2 siblings, 0 replies; 5+ messages in thread
From: Quentin Schulz @ 2024-03-08 12:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: Klaus Goger, Quentin Schulz, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Quentin Schulz
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
The PCIE_WAKE# 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: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
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>;
--
2.44.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou
2024-03-08 12:52 [PATCH 0/3] rockchip: small DTS fixes for RK3399 Puma Quentin Schulz
2024-03-08 12:52 ` [PATCH 1/3] arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID " Quentin Schulz
2024-03-08 12:52 ` [PATCH 2/3] arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# " Quentin Schulz
@ 2024-03-08 12:52 ` Quentin Schulz
2024-03-08 15:30 ` Dragan Simic
2 siblings, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2024-03-08 12:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: Klaus Goger, Quentin Schulz, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Quentin Schulz
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
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.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
.../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..1113f57b09313 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>;
};
+ vcca0v9: vcca0v9-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcca0v9";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ vin-supply = <&vcc_1v8>;
+ };
+
+ vcca1v8: vcca1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcca1v8";
+ 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 = <&vcca0v9>;
+ vpcie1v8-supply = <&vcca1v8>;
+};
+
&pcie_clkreqn_cpm {
rockchip,pins =
<2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.44.0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou
2024-03-08 12:52 ` [PATCH 3/3] arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou Quentin Schulz
@ 2024-03-08 15:30 ` Dragan Simic
0 siblings, 0 replies; 5+ messages in thread
From: Dragan Simic @ 2024-03-08 15:30 UTC (permalink / raw)
To: Quentin Schulz
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Klaus Goger, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Quentin Schulz
On 2024-03-08 13:52, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> 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.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Looking good to me, assuming that the regulator naming follows the
labels used in the schematics.
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
> ---
> .../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..1113f57b09313 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>;
> };
>
> + vcca0v9: vcca0v9-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "vcca0v9";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <900000>;
> + vin-supply = <&vcc_1v8>;
> + };
> +
> + vcca1v8: vcca1v8-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "vcca1v8";
> + 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 = <&vcca0v9>;
> + vpcie1v8-supply = <&vcca1v8>;
> +};
> +
> &pcie_clkreqn_cpm {
> rockchip,pins =
> <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
^ permalink raw reply [flat|nested] 5+ messages in thread