Skip to contentSkip to conversation

arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc

PATCH In review Markus Reichl 3 participants 7 messages Nov 12, 2019 – Nov 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc

Add SDR104 capability and regulators to SD card node. While at it, fix a typo in lcd pinctrl and remove two undocumented bindings from pmic.

---
v2: Remove always-on from vcc3v0_sd

---
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 30 +++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +24 -6
index d1eb55c855b3..a31099f7620b 100644
@@ -135,6 +135,19 @@
 		vin-supply = <&vcc_1v8>;
 	};
 
+	vcc3v0_sd: vcc3v0-sd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc3v0_sd_en>;
+		regulator-name = "vcc3v0_sd";
+		regulator-boot-on;
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+		vin-supply = <&vcc3v3_sys>;
+	};
+
 	vcc3v3_sys: vcc3v3-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_sys";
@@ -293,8 +306,6 @@
 		vcc10-supply = <&vcc3v3_sys>;
 		vcc11-supply = <&vcc3v3_sys>;
 		vcc12-supply = <&vcc3v3_sys>;
-		vcc13-supply = <&vcc3v3_sys>;
-		vcc14-supply = <&vcc3v3_sys>;
 		vddio-supply = <&vcc_3v0>;
 
 		regulators {
@@ -576,7 +587,7 @@
 
 	lcd-panel {
 		lcd_panel_reset: lcd-panel-reset {
-			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
 
@@ -602,6 +613,10 @@
 		vsel2_gpio: vsel2-gpio {
 			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
+
+		pmic_int_l: pmic-int-l {
+			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
 	};
 
 	sdio-pwrseq {
@@ -610,9 +625,9 @@
 		};
 	};
 
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+	sdmmc {
+		vcc3v0_sd_en: vcc3v0-sd-en {
+			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
@@ -667,6 +682,9 @@
 	cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
 	disable-wp;
 	max-frequency = <150000000>;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc3v0_sd>;
+	vqmmc-supply = <&vcc_sdio>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
 	status = "okay";
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Markus Reichl

Add SDR104 capability and regulators to SD card node. While at it, fix a typo in lcd pinctrl and remove two undocumented bindings from pmic.

FWIW:

Kind regards
Uffe

Quoted 85 lines

---
v2: Remove always-on from vcc3v0_sd

---
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 30 +++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +24 -7
index d1eb55c855b3..a31099f7620b 100644
@@ -135,6 +135,19 @@
                vin-supply = <&vcc_1v8>;
        };
 
+       vcc3v0_sd: vcc3v0-sd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc3v0_sd_en>;
+               regulator-name = "vcc3v0_sd";
+               regulator-boot-on;
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               vin-supply = <&vcc3v3_sys>;
+       };
+
        vcc3v3_sys: vcc3v3-sys {
                compatible = "regulator-fixed";
                regulator-name = "vcc3v3_sys";
@@ -293,8 +306,6 @@
                vcc10-supply = <&vcc3v3_sys>;
                vcc11-supply = <&vcc3v3_sys>;
                vcc12-supply = <&vcc3v3_sys>;
-               vcc13-supply = <&vcc3v3_sys>;
-               vcc14-supply = <&vcc3v3_sys>;
                vddio-supply = <&vcc_3v0>;
 
                regulators {
@@ -576,7 +587,7 @@
 
        lcd-panel {
                lcd_panel_reset: lcd-panel-reset {
-                       rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
@@ -602,6 +613,10 @@
                vsel2_gpio: vsel2-gpio {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
+
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
        };
 
        sdio-pwrseq {
@@ -610,9 +625,9 @@
                };
        };
 
-       pmic {
-               pmic_int_l: pmic-int-l {
-                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+       sdmmc {
+               vcc3v0_sd_en: vcc3v0-sd-en {
+                       rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
@@ -667,6 +682,9 @@
        cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
        disable-wp;
        max-frequency = <150000000>;
+       sd-uhs-sdr104;
+       vmmc-supply = <&vcc3v0_sd>;
+       vqmmc-supply = <&vcc_sdio>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
        status = "okay";
--

2.20.1

maintainer
#2 lore raw
In reply to Markus Reichl

Hi Markus,

Am Dienstag, 12. November 2019, 09:45:36 CET schrieb Markus Reichl:

Quoted 4 lines

Add SDR104 capability and regulators to SD card node.

While at it, fix a typo in lcd pinctrl and remove two undocumented bindings from pmic.

A commit message like this always is a good indicator that this wants to be multiple patches ;-) [Keywords: "While at it", "And", ...]

Quoted 32 lines

---
v2: Remove always-on from vcc3v0_sd

---
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 30 +++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +13 -0
index d1eb55c855b3..a31099f7620b 100644
@@ -135,6 +135,19 @@
 		vin-supply = <&vcc_1v8>;
 	};
 
+	vcc3v0_sd: vcc3v0-sd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc3v0_sd_en>;
+		regulator-name = "vcc3v0_sd";
+		regulator-boot-on;
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+		vin-supply = <&vcc3v3_sys>;
+	};
+
 	vcc3v3_sys: vcc3v3-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_sys";

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi line 297

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -2
@@ -293,8 +306,6 @@
 		vcc10-supply = <&vcc3v3_sys>;
 		vcc11-supply = <&vcc3v3_sys>;
 		vcc12-supply = <&vcc3v3_sys>;
-		vcc13-supply = <&vcc3v3_sys>;
-		vcc14-supply = <&vcc3v3_sys>;

Separate patch with nice description perhaps? (remove undocumented inputs)

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi line 590

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
 		vddio-supply = <&vcc_3v0>;
 
 		regulators {
@@ -576,7 +587,7 @@
 
 	lcd-panel {
 		lcd_panel_reset: lcd-panel-reset {
-			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;

Separate patch please, "use correct pin for lcd-reset pinctrl" or so.

Quoted 15 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +4 -0
 		};
 	};
 
@@ -602,6 +613,10 @@
 		vsel2_gpio: vsel2-gpio {
 			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
+
+		pmic_int_l: pmic-int-l {
+			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
 	};
 
 	sdio-pwrseq {

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi line 615

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -3
@@ -610,9 +625,9 @@
 		};
 	};
 
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;

separate patch please talking about regrouping the two separate pmic pin-groups.

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi line 687

Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +6 -0
+	sdmmc {
+		vcc3v0_sd_en: vcc3v0-sd-en {
+			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
@@ -667,6 +682,9 @@
 	cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
 	disable-wp;
 	max-frequency = <150000000>;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc3v0_sd>;
+	vqmmc-supply = <&vcc_sdio>;

Alphabetical sorting of new properties please
(status staying at the bottom though)

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi line 690

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -0
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
 	status = "okay";

Thanks
Heiko

#3 lore raw

PATCH v3 1/2 arm64: dts: rockchip: Use correct pin for lcd-reset pinctrl on rk3399-roc-pc

Fix typo according to schematics.
The original pin is needed to enable vcc3v0_sd in second patch of this series.

---
v3: Split patch in two, generate this part 1/2

---
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
index 44617c8e0773..6d485712f47c 100644
@@ -576,7 +576,7 @@
 
 	lcd-panel {
 		lcd_panel_reset: lcd-panel-reset {
-			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
 
Signature · 1 line
2.20.1
maintainer
#4 lore raw

Re: [PATCH v3 1/2] arm64: dts: rockchip: Use correct pin for lcd-reset pinctrl on rk3399-roc-pc

Am Montag, 18. November 2019, 12:23:18 CET schrieb Markus Reichl:

Quoted 4 lines

Fix typo according to schematics.
The original pin is needed to enable vcc3v0_sd in second patch of this series.

applied (yesterday evening already)

Thanks
Heiko

#5 lore raw

PATCH v3 2/2 arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc

In reply to Heiko Stuebner

Add SDR104 capability and regulators to SD card node.

---
v3: Split patch in two, remove non related changes
v2: Remove always-on from vcc3v0_sd

---
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +22 -1
index 6d485712f47c..014a9869d61a 100644
@@ -135,6 +135,19 @@
 		vin-supply = <&vcc_1v8>;
 	};
 
+	vcc3v0_sd: vcc3v0-sd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc3v0_sd_en>;
+		regulator-name = "vcc3v0_sd";
+		regulator-boot-on;
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+		vin-supply = <&vcc3v3_sys>;
+	};
+
 	vcc3v3_sys: vcc3v3-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_sys";
@@ -610,6 +623,12 @@
 		};
 	};
 
+	sdmmc {
+		vcc3v0_sd_en: vcc3v0-sd-en {
+			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -662,13 +681,15 @@
 
 &sdmmc {
 	bus-width = <4>;
-	cap-mmc-highspeed;
 	cap-sd-highspeed;
 	cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
 	disable-wp;
 	max-frequency = <150000000>;
+	sd-uhs-sdr104;
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+	vmmc-supply = <&vcc3v0_sd>;
+	vqmmc-supply = <&vcc_sdio>;
 	status = "okay";
 };
 
Signature · 1 line
2.20.1
maintainer
#6 lore raw

Am Montag, 18. November 2019, 12:23:47 CET schrieb Markus Reichl:

Quoted 3 lines

Add SDR104 capability and regulators to SD card node.

applied (yesterday evening already)

Thanks
Heiko