[PATCH] arm64: dts: rockchip: Fix PCIe v3 pinctrl for BPI-R2-Pro

David Heidelberg via B4 Relay posted 1 patch 1 month, 2 weeks ago
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] arm64: dts: rockchip: Fix PCIe v3 pinctrl for BPI-R2-Pro
Posted by David Heidelberg via B4 Relay 1 month, 2 weeks ago
From: David Heidelberg <david@ixit.cz>

Add missing pinctrl for PD4 (PI6C PCIe clock enable,
PCIE_CLKEN_H_GPIO0_D4) and set output high.

This does fix freeze at initialization due pinctrl being in input
state.

Reported-by: Martin Filla <freebsd@sysctl.cz> # reported by private message
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
index 4d3ebe50b90ba..b4c8abe37d1f3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
@@ -121,6 +121,8 @@ vcc3v3_pi6c_05: regulator-vcc3v3-pi6c-05 {
 		regulator-max-microvolt = <3300000>;
 		enable-active-high;
 		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&pi6cpcie_enable_h>;
+		pinctrl-names = "default";
 		startup-delay-us = <200000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
@@ -635,6 +637,10 @@ ngffpcie_enable_h: ngffpcie-enable-h {
 			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none_drv_level_5>;
 		};
 
+		pi6cpcie_enable_h: pi6cpcie-enable-h {
+			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_output_high>;
+		};
+
 		minipcie_reset_h: minipcie-reset-h {
 			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none_drv_level_5>;
 		};

---
base-commit: 3fa5e5702a82d259897bd7e209469bc06368bf31
change-id: 20260222-rk3568-bri-r2-pro-fix-pcie-355b020dd0d2

Best regards,
-- 
David Heidelberg <david@ixit.cz>
Re: [PATCH] arm64: dts: rockchip: Fix PCIe v3 pinctrl for BPI-R2-Pro
Posted by Heiko Stuebner 1 month, 2 weeks ago
Hi David,

Am Sonntag, 1. März 2026, 16:54:41 Mitteleuropäische Normalzeit schrieb David Heidelberg via B4 Relay:
> From: David Heidelberg <david@ixit.cz>
> 
> Add missing pinctrl for PD4 (PI6C PCIe clock enable,
> PCIE_CLKEN_H_GPIO0_D4) and set output high.
> 
> This does fix freeze at initialization due pinctrl being in input
> state.
> 
> Reported-by: Martin Filla <freebsd@sysctl.cz> # reported by private message
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> index 4d3ebe50b90ba..b4c8abe37d1f3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> @@ -121,6 +121,8 @@ vcc3v3_pi6c_05: regulator-vcc3v3-pi6c-05 {
>  		regulator-max-microvolt = <3300000>;
>  		enable-active-high;
>  		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&pi6cpcie_enable_h>;
> +		pinctrl-names = "default";

please model hardware not how you want to use it.

The pi6c in the pin-name suggests, that this is a Diodes clock-generator
that creates the 100MHz frequency for PCIe [0] .

Please see [1] for one possible variant to model this.


Heiko

[0] https://www.diodes.com/part/view/PI6CG33602C or some variant of it
[1] http://lore.kernel.org/all/20260210080303.680403-1-heiko@sntech.de
Re: [PATCH] arm64: dts: rockchip: Fix PCIe v3 pinctrl for BPI-R2-Pro
Posted by David Heidelberg 1 month, 2 weeks ago
On 01/03/2026 16:54, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Add missing pinctrl for PD4 (PI6C PCIe clock enable,
> PCIE_CLKEN_H_GPIO0_D4) and set output high.
> 
> This does fix freeze at initialization due pinctrl being in input
> state.
> 
> Reported-by: Martin Filla <freebsd@sysctl.cz> # reported by private message
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>   arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 6 ++++++
>   1 file changed, 6 insertions(+)
> 

Fixes: 86973ae0355b ("arm64: dts: rockchip: Add PCIe v3 nodes to BPI-R2-Pro")

[...]