* [PATCH v2] arm64: dts: rockchip: fix nEXTRST on SOQuartz
@ 2023-04-21 15:26 Nicolas Frattaroli
2023-04-27 9:58 ` Heiko Stuebner
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Frattaroli @ 2023-04-21 15:26 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, Peter Geis
Cc: Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
In pre-production prototypes (of which I only know one person
having one, Peter Geis), GPIO0 pin A5 was tied to the SDMMC
power enable pin on the CM4 connector. On all production models,
this is not the case; instead, this pin is used for the nEXTRST
signal, and the SDMMC power enable pin is always pulled high.
Since everyone currently using the SOQuartz device trees will
want this change, it is made to the tree without splitting the
trees into two separate ones of which users will then inevitably
choose the wrong one.
This fixes USB and PCIe on a wide variety of CM4IO-compatible
boards which use the nEXTRST signal.
Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
Changes in v2:
- use GPIO hog instead of a fake regulator
.../boot/dts/rockchip/rk3566-soquartz-cm4.dts | 18 +++++++-----
.../boot/dts/rockchip/rk3566-soquartz.dtsi | 29 +++++++++----------
2 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
index 263ce40770dd..cddf6cd2fecb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
@@ -28,6 +28,16 @@ vcc_5v: vcc-5v-regulator {
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
+
+ vcc_sd_pwr: vcc-sd-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_sd_pwr";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc3v3_sys>;
+ };
};
/* phy for pcie */
@@ -130,13 +140,7 @@ &saradc {
};
&sdmmc0 {
- vmmc-supply = <&sdmmc_pwr>;
- status = "okay";
-};
-
-&sdmmc_pwr {
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
+ vmmc-supply = <&vcc_sd_pwr>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
index ce7165d7f1a1..3036985e2567 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
@@ -104,16 +104,6 @@ vcc3v3_sys: vcc3v3-sys-regulator {
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc5v0_sys>;
};
-
- sdmmc_pwr: sdmmc-pwr-regulator {
- compatible = "regulator-fixed";
- enable-active-high;
- gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&sdmmc_pwr_h>;
- regulator-name = "sdmmc_pwr";
- status = "disabled";
- };
};
&cpu0 {
@@ -155,6 +145,19 @@ &gmac1m0_clkinout
status = "disabled";
};
+&gpio0 {
+ nextrst-hog {
+ gpio-hog;
+ /*
+ * GPIO_ACTIVE_LOW + output-low here means that the pin is set
+ * to high, because output-low decides the value pre-inversion.
+ */
+ gpios = <RK_PA5 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "nEXTRST";
+ };
+};
+
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
@@ -538,12 +541,6 @@ wifi_enable_h: wifi-enable-h {
rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
-
- sdmmc-pwr {
- sdmmc_pwr_h: sdmmc-pwr-h {
- rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
};
&pmu_io_domains {
--
2.40.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: fix nEXTRST on SOQuartz
2023-04-21 15:26 [PATCH v2] arm64: dts: rockchip: fix nEXTRST on SOQuartz Nicolas Frattaroli
@ 2023-04-27 9:58 ` Heiko Stuebner
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2023-04-27 9:58 UTC (permalink / raw)
To: Rob Herring, Nicolas Frattaroli, Krzysztof Kozlowski, Peter Geis
Cc: Heiko Stuebner, devicetree, linux-kernel, linux-rockchip,
linux-arm-kernel
On Fri, 21 Apr 2023 17:26:10 +0200, Nicolas Frattaroli wrote:
> In pre-production prototypes (of which I only know one person
> having one, Peter Geis), GPIO0 pin A5 was tied to the SDMMC
> power enable pin on the CM4 connector. On all production models,
> this is not the case; instead, this pin is used for the nEXTRST
> signal, and the SDMMC power enable pin is always pulled high.
>
> Since everyone currently using the SOQuartz device trees will
> want this change, it is made to the tree without splitting the
> trees into two separate ones of which users will then inevitably
> choose the wrong one.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: fix nEXTRST on SOQuartz
commit: e5d8752e957872a844ed46736b15f30b08af6591
As fix for 6.4
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-27 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-21 15:26 [PATCH v2] arm64: dts: rockchip: fix nEXTRST on SOQuartz Nicolas Frattaroli
2023-04-27 9:58 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®