diff mbox series

[v2,11/11] ARM: dts: bcm2711: Add vmmc regulator in emmc2

Message ID 20200306174413.20634-12-nsaenzjulienne@suse.de (mailing list archive)
State New, archived
Headers show
Series Raspbery Pi 4 vmmc regulator support | expand

Commit Message

Nicolas Saenz Julienne March 6, 2020, 5:44 p.m. UTC
The SD card power can be controlled trough a pin routed into the board's
external GPIO expander. Turn that into a regulator and provide it to
emmc2.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Stefan Wahren March 9, 2020, 8 p.m. UTC | #1
Hi Nicolas,

Am 06.03.20 um 18:44 schrieb Nicolas Saenz Julienne:
> The SD card power can be controlled trough a pin routed into the board's
> external GPIO expander. Turn that into a regulator and provide it to
> emmc2.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> index b0ea8233b636..a2da058396fe 100644
> --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> @@ -55,6 +55,16 @@ sd_io_1v8_reg: sd_io_1v8_reg {
>  			  3300000 0x0>;
>  		status = "okay";
>  	};
> +
> +	sd_vcc_reg: sd_vcc_reg {
> +		compatible = "regulator-fixed";

i think we need to enable CONFIG_REGULATOR_FIXED_VOLTAGE in
bcm2835_defconfig

Best regards
Stefan

> +		regulator-name = "vcc-sd";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-boot-on;
> +		enable-active-high;
> +		gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
> +	};
>  };
>  
>  &firmware {
> @@ -173,6 +183,7 @@ brcmf: wifi@1 {
>  /* EMMC2 is used to drive the SD card */
>  &emmc2 {
>  	vqmmc-supply = <&sd_io_1v8_reg>;
> +	vmmc-supply = <&sd_vcc_reg>;
>  	broken-cd;
>  	status = "okay";
>  };
Nicolas Saenz Julienne March 9, 2020, 8:01 p.m. UTC | #2
On Mon, 2020-03-09 at 21:00 +0100, Stefan Wahren wrote:
> Hi Nicolas,
> 
> Am 06.03.20 um 18:44 schrieb Nicolas Saenz Julienne:
> > The SD card power can be controlled trough a pin routed into the board's
> > external GPIO expander. Turn that into a regulator and provide it to
> > emmc2.
> > 
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > ---
> >  arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > index b0ea8233b636..a2da058396fe 100644
> > --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > @@ -55,6 +55,16 @@ sd_io_1v8_reg: sd_io_1v8_reg {
> >  			  3300000 0x0>;
> >  		status = "okay";
> >  	};
> > +
> > +	sd_vcc_reg: sd_vcc_reg {
> > +		compatible = "regulator-fixed";
> 
> i think we need to enable CONFIG_REGULATOR_FIXED_VOLTAGE in
> bcm2835_defconfig

I'll take it into account for v3,

Thanks!
Nicolas
Nicolas Saenz Julienne March 27, 2020, 11:22 a.m. UTC | #3
On Fri, 2020-03-06 at 18:44 +0100, Nicolas Saenz Julienne wrote:
> The SD card power can be controlled trough a pin routed into the board's
> external GPIO expander. Turn that into a regulator and provide it to
> emmc2.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Applied for-next.

Regards,
Nicolas
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index b0ea8233b636..a2da058396fe 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -55,6 +55,16 @@  sd_io_1v8_reg: sd_io_1v8_reg {
 			  3300000 0x0>;
 		status = "okay";
 	};
+
+	sd_vcc_reg: sd_vcc_reg {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-sd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		enable-active-high;
+		gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &firmware {
@@ -173,6 +183,7 @@  brcmf: wifi@1 {
 /* EMMC2 is used to drive the SD card */
 &emmc2 {
 	vqmmc-supply = <&sd_io_1v8_reg>;
+	vmmc-supply = <&sd_vcc_reg>;
 	broken-cd;
 	status = "okay";
 };