linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc
@ 2019-11-11 14:13 Markus Reichl
  2019-11-11 17:27 ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Reichl @ 2019-11-11 14:13 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Heiko Stuebner, Jagan Teki,
	Markus Reichl, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, linux-mmc

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.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
---
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 31 +++++++++++++++----
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
index 33df95e384b4..e86a6db54499 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
@@ -135,6 +135,20 @@
 		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-always-on;
+		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";
@@ -279,8 +293,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 {
@@ -562,7 +574,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>;
 		};
 	};
 
@@ -588,6 +600,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 {
@@ -596,9 +612,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>;
 		};
 	};
 
@@ -653,6 +669,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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc
  2019-11-11 14:13 arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc Markus Reichl
@ 2019-11-11 17:27 ` Ulf Hansson
  2019-11-11 19:31   ` Markus Reichl
  2019-11-12  8:46   ` Markus Reichl
  0 siblings, 2 replies; 5+ messages in thread
From: Ulf Hansson @ 2019-11-11 17:27 UTC (permalink / raw)
  To: Markus Reichl
  Cc: Rob Herring, Mark Rutland, Heiko Stuebner, Jagan Teki, DTML,
	Linux ARM, open list:ARM/Rockchip SoC...,
	Linux Kernel Mailing List, linux-mmc

On Mon, 11 Nov 2019 at 15:13, Markus Reichl <m.reichl@fivetechno.de> wrote:
>
> 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.
>
> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
> ---
>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 31 +++++++++++++++----
>  1 file changed, 25 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> index 33df95e384b4..e86a6db54499 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> @@ -135,6 +135,20 @@
>                 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-always-on;

This looks odd. A GPIO regulator being always on?

> +               regulator-boot-on;
> +               regulator-min-microvolt = <3000000>;
> +               regulator-max-microvolt = <3000000>;
> +               vin-supply = <&vcc3v3_sys>;
> +       };

Assumes this powers an SDIO embedded card. Often those have a specific
power sequence, just wanted to make sure the above are really
sufficient? No delays or external clock needed?

[...]

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc
  2019-11-11 17:27 ` Ulf Hansson
@ 2019-11-11 19:31   ` Markus Reichl
  2019-11-12  8:58     ` Ulf Hansson
  2019-11-12  8:46   ` Markus Reichl
  1 sibling, 1 reply; 5+ messages in thread
From: Markus Reichl @ 2019-11-11 19:31 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Rob Herring, Mark Rutland, Heiko Stuebner, Jagan Teki, DTML,
	Linux ARM, open list:ARM/Rockchip SoC...,
	Linux Kernel Mailing List, linux-mmc

Hi Ulf,

Am 11.11.19 um 18:27 schrieb Ulf Hansson:
> On Mon, 11 Nov 2019 at 15:13, Markus Reichl <m.reichl@fivetechno.de> wrote:
>>
>> 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.
>>
>> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
>> ---
>>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 31 +++++++++++++++----
>>  1 file changed, 25 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> index 33df95e384b4..e86a6db54499 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> @@ -135,6 +135,20 @@
>>                 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-always-on;
> 
> This looks odd. A GPIO regulator being always on?

This is a standard micro SD card socket that can also be used for
booting the board. I wanted to be cautious and start
working with it and several SD cards and explore the capabilities.

On this board nearly all regulators are still continously
switched on. I plan to remove the always-on properties step
by step from the regulators when the board runs stable with it's
components all enbled. 

> 
>> +               regulator-boot-on;
>> +               regulator-min-microvolt = <3000000>;
>> +               regulator-max-microvolt = <3000000>;
>> +               vin-supply = <&vcc3v3_sys>;
>> +       };
> 
> Assumes this powers an SDIO embedded card. Often those have a specific
> power sequence, just wanted to make sure the above are really
> sufficient? No delays or external clock needed?

It's not embedded, just a standard µSD plug. It is already enabled
by mainline U-Boot and ejecting and inserting the card works fine.

--
Gruß,
Markus
> 
> [...]
> 
> Kind regards
> Uffe
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc
  2019-11-11 17:27 ` Ulf Hansson
  2019-11-11 19:31   ` Markus Reichl
@ 2019-11-12  8:46   ` Markus Reichl
  1 sibling, 0 replies; 5+ messages in thread
From: Markus Reichl @ 2019-11-12  8:46 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Mark Rutland, DTML, Heiko Stuebner, linux-mmc,
	Linux Kernel Mailing List, open list:ARM/Rockchip SoC...,
	Rob Herring, Jagan Teki, Linux ARM

Hi Ulf,

Am 11.11.19 um 18:27 schrieb Ulf Hansson:
> On Mon, 11 Nov 2019 at 15:13, Markus Reichl <m.reichl@fivetechno.de> wrote:
>>
>> 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.
>>
>> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
>> ---
>>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 31 +++++++++++++++----
>>  1 file changed, 25 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> index 33df95e384b4..e86a6db54499 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>> @@ -135,6 +135,20 @@
>>                 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-always-on;
> 
> This looks odd. A GPIO regulator being always on?

Works fine without always-on. Have sent v2. Thanks.

> 
>> +               regulator-boot-on;
>> +               regulator-min-microvolt = <3000000>;
>> +               regulator-max-microvolt = <3000000>;
>> +               vin-supply = <&vcc3v3_sys>;
>> +       };
> 
> Assumes this powers an SDIO embedded card. Often those have a specific
> power sequence, just wanted to make sure the above are really
> sufficient? No delays or external clock needed?
> 
> [...]
> 
> Kind regards
> Uffe
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 

Gruß,
-- 
Markus Reichl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc
  2019-11-11 19:31   ` Markus Reichl
@ 2019-11-12  8:58     ` Ulf Hansson
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2019-11-12  8:58 UTC (permalink / raw)
  To: Markus Reichl
  Cc: Rob Herring, Mark Rutland, Heiko Stuebner, Jagan Teki, DTML,
	Linux ARM, open list:ARM/Rockchip SoC...,
	Linux Kernel Mailing List, linux-mmc

On Mon, 11 Nov 2019 at 20:32, Markus Reichl <m.reichl@fivetechno.de> wrote:
>
> Hi Ulf,
>
> Am 11.11.19 um 18:27 schrieb Ulf Hansson:
> > On Mon, 11 Nov 2019 at 15:13, Markus Reichl <m.reichl@fivetechno.de> wrote:
> >>
> >> 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.
> >>
> >> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
> >> ---
> >>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      | 31 +++++++++++++++----
> >>  1 file changed, 25 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> >> index 33df95e384b4..e86a6db54499 100644
> >> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> >> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> >> @@ -135,6 +135,20 @@
> >>                 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-always-on;
> >
> > This looks odd. A GPIO regulator being always on?
>
> This is a standard micro SD card socket that can also be used for
> booting the board. I wanted to be cautious and start
> working with it and several SD cards and explore the capabilities.
>
> On this board nearly all regulators are still continously
> switched on. I plan to remove the always-on properties step
> by step from the regulators when the board runs stable with it's
> components all enbled.
>
> >
> >> +               regulator-boot-on;
> >> +               regulator-min-microvolt = <3000000>;
> >> +               regulator-max-microvolt = <3000000>;
> >> +               vin-supply = <&vcc3v3_sys>;
> >> +       };
> >
> > Assumes this powers an SDIO embedded card. Often those have a specific
> > power sequence, just wanted to make sure the above are really
> > sufficient? No delays or external clock needed?
>
> It's not embedded, just a standard µSD plug. It is already enabled
> by mainline U-Boot and ejecting and inserting the card works fine.

Ah, thanks for confirming.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-12  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 14:13 arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc Markus Reichl
2019-11-11 17:27 ` Ulf Hansson
2019-11-11 19:31   ` Markus Reichl
2019-11-12  8:58     ` Ulf Hansson
2019-11-12  8:46   ` Markus Reichl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).