[10/10] ARM: dts: bcm2711: Add vmmc regulator in emmc2
diff mbox series

Message ID 20200306103857.23962-11-nsaenzjulienne@suse.de
State New, archived
Headers show
Series
  • Raspberry Pi vmmc regulator support
Related show

Commit Message

Nicolas Saenz Julienne March 6, 2020, 10:38 a.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 6, 2020, 11:07 a.m. UTC | #1
Hi Nicolas,

On 06.03.20 11:38, 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>
> ---
>  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 e26ea9006378..8e98e917f9f4 100644
> --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> @@ -56,6 +56,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>;
this new GPIO has an empty GPIO label, please add it.
> +	};
>  };
>  
>  &firmware {
> @@ -174,6 +184,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";
>  };
Phil Elwell March 6, 2020, 11:35 a.m. UTC | #2
Nicolas, Stefan,

On 06/03/2020 11:07, Stefan Wahren wrote:
> Hi Nicolas,
> 
> On 06.03.20 11:38, 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>
>> ---
>>   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 e26ea9006378..8e98e917f9f4 100644
>> --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
>> +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
>> @@ -56,6 +56,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>;
> this new GPIO has an empty GPIO label, please add it.

The correct name would be "SD_PWR_ON".

>> +	};
>>   };
>>   
>>   &firmware {
>> @@ -174,6 +184,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 6, 2020, 11:37 a.m. UTC | #3
On Fri, 2020-03-06 at 11:35 +0000, Phil Elwell wrote:
> Nicolas, Stefan,
> 
> On 06/03/2020 11:07, Stefan Wahren wrote:
> > Hi Nicolas,
> > 
> > On 06.03.20 11:38, 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>
> > > ---
> > >   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 e26ea9006378..8e98e917f9f4 100644
> > > --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > > +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> > > @@ -56,6 +56,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>;
> > this new GPIO has an empty GPIO label, please add it.
> 
> The correct name would be "SD_PWR_ON".

Noted

Regrads,
Nicolas

Patch
diff mbox series

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index e26ea9006378..8e98e917f9f4 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -56,6 +56,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 {
@@ -174,6 +184,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";
 };