Skip to content

Commit cf9ae4a

Browse files
CounterPillowmmind
authored andcommitted
arm64: dts: rockchip: fix nEXTRST on SOQuartz
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: 5859b5a ("arm64: dts: rockchip: add SoQuartz CM4IO dts") Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Link: https://lore.kernel.org/r/20230421152610.21688-1-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent 42dcd05 commit cf9ae4a

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
regulator-max-microvolt = <5000000>;
2929
vin-supply = <&vcc12v_dcin>;
3030
};
31+
32+
vcc_sd_pwr: vcc-sd-pwr-regulator {
33+
compatible = "regulator-fixed";
34+
regulator-name = "vcc_sd_pwr";
35+
regulator-always-on;
36+
regulator-boot-on;
37+
regulator-min-microvolt = <3300000>;
38+
regulator-max-microvolt = <3300000>;
39+
vin-supply = <&vcc3v3_sys>;
40+
};
3141
};
3242

3343
/* phy for pcie */
@@ -130,13 +140,7 @@
130140
};
131141

132142
&sdmmc0 {
133-
vmmc-supply = <&sdmmc_pwr>;
134-
status = "okay";
135-
};
136-
137-
&sdmmc_pwr {
138-
regulator-min-microvolt = <3300000>;
139-
regulator-max-microvolt = <3300000>;
143+
vmmc-supply = <&vcc_sd_pwr>;
140144
status = "okay";
141145
};
142146

arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@
104104
regulator-max-microvolt = <3300000>;
105105
vin-supply = <&vcc5v0_sys>;
106106
};
107-
108-
sdmmc_pwr: sdmmc-pwr-regulator {
109-
compatible = "regulator-fixed";
110-
enable-active-high;
111-
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
112-
pinctrl-names = "default";
113-
pinctrl-0 = <&sdmmc_pwr_h>;
114-
regulator-name = "sdmmc_pwr";
115-
status = "disabled";
116-
};
117107
};
118108

119109
&cpu0 {
@@ -155,6 +145,19 @@
155145
status = "disabled";
156146
};
157147

148+
&gpio0 {
149+
nextrst-hog {
150+
gpio-hog;
151+
/*
152+
* GPIO_ACTIVE_LOW + output-low here means that the pin is set
153+
* to high, because output-low decides the value pre-inversion.
154+
*/
155+
gpios = <RK_PA5 GPIO_ACTIVE_LOW>;
156+
line-name = "nEXTRST";
157+
output-low;
158+
};
159+
};
160+
158161
&gpu {
159162
mali-supply = <&vdd_gpu>;
160163
status = "okay";
@@ -538,12 +541,6 @@
538541
rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
539542
};
540543
};
541-
542-
sdmmc-pwr {
543-
sdmmc_pwr_h: sdmmc-pwr-h {
544-
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
545-
};
546-
};
547544
};
548545

549546
&pmu_io_domains {

0 commit comments

Comments
 (0)