diff mbox series

[V2,06/22] ARM: dts: stm32: Repair SDMMC1 operation on AV96

Message ID 20200331005701.283998-7-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series ARM: dts: stm32: Repair AV96 board | expand

Commit Message

Marek Vasut March 31, 2020, 12:56 a.m. UTC
The SD uses different pinmux for the D123DIRline, use such a pinmux,
otherwise there is a pinmux collision on the AV96. Add missing SD
voltage regulator switch.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
---
V2: Disable SDR104, it seems unstable thus far
---
 arch/arm/boot/dts/stm32mp157a-avenger96.dts | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

Comments

'Manivannan Sadhasivam' March 31, 2020, 4:33 a.m. UTC | #1
On Tue, Mar 31, 2020 at 02:56:45AM +0200, Marek Vasut wrote:
> The SD uses different pinmux for the D123DIRline, use such a pinmux,
> otherwise there is a pinmux collision on the AV96. Add missing SD
> voltage regulator switch.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: Disable SDR104, it seems unstable thus far
> ---
>  arch/arm/boot/dts/stm32mp157a-avenger96.dts | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> index e58653ccb60f..04280353fdbe 100644
> --- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> +++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> @@ -77,6 +77,20 @@ led6 {
>  			default-state = "off";
>  		};
>  	};
> +
> +	sd_switch: regulator-sd_switch {
> +		compatible = "regulator-gpio";
> +		regulator-name = "sd_switch";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <2900000>;
> +		regulator-type = "voltage";
> +		regulator-always-on;
> +
> +		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
> +		gpios-states = <0>;
> +		states = <1800000 0x1>,
> +			 <2900000 0x0>;
> +	};
>  };
>  
>  &ethernet0 {
> @@ -305,9 +319,9 @@ &rtc {
>  
>  &sdmmc1 {
>  	pinctrl-names = "default", "opendrain", "sleep";
> -	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
> -	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
> -	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
> +	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
> +	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
> +	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
>  	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;

The "cd-gpios" change is not present in mainline. I think you can add it to
this patch as well with relevant commit description.

With that fixed,

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

>  	disable-wp;
>  	st,sig-dir;
> @@ -315,6 +329,7 @@ &sdmmc1 {
>  	st,use-ckin;
>  	bus-width = <4>;
>  	vmmc-supply = <&vdd_sd>;
> +	vqmmc-supply = <&sd_switch>;
>  	status = "okay";
>  };
>  
> -- 
> 2.25.1
>
Marek Vasut March 31, 2020, 1:36 p.m. UTC | #2
On 3/31/20 6:33 AM, Manivannan Sadhasivam wrote:
> On Tue, Mar 31, 2020 at 02:56:45AM +0200, Marek Vasut wrote:
>> The SD uses different pinmux for the D123DIRline, use such a pinmux,
>> otherwise there is a pinmux collision on the AV96. Add missing SD
>> voltage regulator switch.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Alexandre Torgue <alexandre.torgue@st.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
>> Cc: Patrice Chotard <patrice.chotard@st.com>
>> Cc: Patrick Delaunay <patrick.delaunay@st.com>
>> Cc: linux-stm32@st-md-mailman.stormreply.com
>> To: linux-arm-kernel@lists.infradead.org
>> ---
>> V2: Disable SDR104, it seems unstable thus far
>> ---
>>  arch/arm/boot/dts/stm32mp157a-avenger96.dts | 21 ++++++++++++++++++---
>>  1 file changed, 18 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>> index e58653ccb60f..04280353fdbe 100644
>> --- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>> +++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>> @@ -77,6 +77,20 @@ led6 {
>>  			default-state = "off";
>>  		};
>>  	};
>> +
>> +	sd_switch: regulator-sd_switch {
>> +		compatible = "regulator-gpio";
>> +		regulator-name = "sd_switch";
>> +		regulator-min-microvolt = <1800000>;
>> +		regulator-max-microvolt = <2900000>;
>> +		regulator-type = "voltage";
>> +		regulator-always-on;
>> +
>> +		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
>> +		gpios-states = <0>;
>> +		states = <1800000 0x1>,
>> +			 <2900000 0x0>;
>> +	};
>>  };
>>  
>>  &ethernet0 {
>> @@ -305,9 +319,9 @@ &rtc {
>>  
>>  &sdmmc1 {
>>  	pinctrl-names = "default", "opendrain", "sleep";
>> -	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
>> -	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
>> -	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
>> +	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
>> +	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
>> +	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
>>  	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
> 
> The "cd-gpios" change is not present in mainline. I think you can add it to
> this patch as well with relevant commit description.

What change to cd-gpios ? This patch doesn't change cd-gpios.
'Manivannan Sadhasivam' March 31, 2020, 2:02 p.m. UTC | #3
On Tue, Mar 31, 2020 at 03:36:34PM +0200, Marek Vasut wrote:
> On 3/31/20 6:33 AM, Manivannan Sadhasivam wrote:
> > On Tue, Mar 31, 2020 at 02:56:45AM +0200, Marek Vasut wrote:
> >> The SD uses different pinmux for the D123DIRline, use such a pinmux,
> >> otherwise there is a pinmux collision on the AV96. Add missing SD
> >> voltage regulator switch.
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> >> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> >> Cc: Patrice Chotard <patrice.chotard@st.com>
> >> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> >> Cc: linux-stm32@st-md-mailman.stormreply.com
> >> To: linux-arm-kernel@lists.infradead.org
> >> ---
> >> V2: Disable SDR104, it seems unstable thus far
> >> ---
> >>  arch/arm/boot/dts/stm32mp157a-avenger96.dts | 21 ++++++++++++++++++---
> >>  1 file changed, 18 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> >> index e58653ccb60f..04280353fdbe 100644
> >> --- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> >> +++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> >> @@ -77,6 +77,20 @@ led6 {
> >>  			default-state = "off";
> >>  		};
> >>  	};
> >> +
> >> +	sd_switch: regulator-sd_switch {
> >> +		compatible = "regulator-gpio";
> >> +		regulator-name = "sd_switch";
> >> +		regulator-min-microvolt = <1800000>;
> >> +		regulator-max-microvolt = <2900000>;
> >> +		regulator-type = "voltage";
> >> +		regulator-always-on;
> >> +
> >> +		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
> >> +		gpios-states = <0>;
> >> +		states = <1800000 0x1>,
> >> +			 <2900000 0x0>;
> >> +	};
> >>  };
> >>  
> >>  &ethernet0 {
> >> @@ -305,9 +319,9 @@ &rtc {
> >>  
> >>  &sdmmc1 {
> >>  	pinctrl-names = "default", "opendrain", "sleep";
> >> -	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
> >> -	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
> >> -	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
> >> +	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
> >> +	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
> >> +	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
> >>  	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
> > 
> > The "cd-gpios" change is not present in mainline. I think you can add it to
> > this patch as well with relevant commit description.
> 
> What change to cd-gpios ? This patch doesn't change cd-gpios.

This cd-gpios change is not present in mainline and also there seems to be few
other properties which got added (probably by another patch?). So this doesn't
apply on top of mainline/master.

Thanks,
Mani
Marek Vasut March 31, 2020, 3:45 p.m. UTC | #4
On 3/31/20 4:02 PM, Manivannan Sadhasivam wrote:
> On Tue, Mar 31, 2020 at 03:36:34PM +0200, Marek Vasut wrote:
>> On 3/31/20 6:33 AM, Manivannan Sadhasivam wrote:
>>> On Tue, Mar 31, 2020 at 02:56:45AM +0200, Marek Vasut wrote:
>>>> The SD uses different pinmux for the D123DIRline, use such a pinmux,
>>>> otherwise there is a pinmux collision on the AV96. Add missing SD
>>>> voltage regulator switch.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>> Cc: Alexandre Torgue <alexandre.torgue@st.com>
>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
>>>> Cc: Patrice Chotard <patrice.chotard@st.com>
>>>> Cc: Patrick Delaunay <patrick.delaunay@st.com>
>>>> Cc: linux-stm32@st-md-mailman.stormreply.com
>>>> To: linux-arm-kernel@lists.infradead.org
>>>> ---
>>>> V2: Disable SDR104, it seems unstable thus far
>>>> ---
>>>>  arch/arm/boot/dts/stm32mp157a-avenger96.dts | 21 ++++++++++++++++++---
>>>>  1 file changed, 18 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>>>> index e58653ccb60f..04280353fdbe 100644
>>>> --- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>>>> +++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
>>>> @@ -77,6 +77,20 @@ led6 {
>>>>  			default-state = "off";
>>>>  		};
>>>>  	};
>>>> +
>>>> +	sd_switch: regulator-sd_switch {
>>>> +		compatible = "regulator-gpio";
>>>> +		regulator-name = "sd_switch";
>>>> +		regulator-min-microvolt = <1800000>;
>>>> +		regulator-max-microvolt = <2900000>;
>>>> +		regulator-type = "voltage";
>>>> +		regulator-always-on;
>>>> +
>>>> +		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
>>>> +		gpios-states = <0>;
>>>> +		states = <1800000 0x1>,
>>>> +			 <2900000 0x0>;
>>>> +	};
>>>>  };
>>>>  
>>>>  &ethernet0 {
>>>> @@ -305,9 +319,9 @@ &rtc {
>>>>  
>>>>  &sdmmc1 {
>>>>  	pinctrl-names = "default", "opendrain", "sleep";
>>>> -	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
>>>> -	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
>>>> -	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
>>>> +	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
>>>> +	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
>>>> +	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
>>>>  	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>>>
>>> The "cd-gpios" change is not present in mainline. I think you can add it to
>>> this patch as well with relevant commit description.
>>
>> What change to cd-gpios ? This patch doesn't change cd-gpios.
> 
> This cd-gpios change is not present in mainline and also there seems to be few
> other properties which got added (probably by another patch?). So this doesn't
> apply on top of mainline/master.

This series is based on next/master .
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
index e58653ccb60f..04280353fdbe 100644
--- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
+++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
@@ -77,6 +77,20 @@  led6 {
 			default-state = "off";
 		};
 	};
+
+	sd_switch: regulator-sd_switch {
+		compatible = "regulator-gpio";
+		regulator-name = "sd_switch";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <2900000>;
+		regulator-type = "voltage";
+		regulator-always-on;
+
+		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
+		gpios-states = <0>;
+		states = <1800000 0x1>,
+			 <2900000 0x0>;
+	};
 };
 
 &ethernet0 {
@@ -305,9 +319,9 @@  &rtc {
 
 &sdmmc1 {
 	pinctrl-names = "default", "opendrain", "sleep";
-	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
-	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
-	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
+	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
+	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
 	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
 	disable-wp;
 	st,sig-dir;
@@ -315,6 +329,7 @@  &sdmmc1 {
 	st,use-ckin;
 	bus-width = <4>;
 	vmmc-supply = <&vdd_sd>;
+	vqmmc-supply = <&sd_switch>;
 	status = "okay";
 };