[Linux-stm32] [PATCH] ARM: dts: stm32: Consistently enable internal pull-ups for SD bus

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Oct 16 02:19:39 EDT 2020


Hello Alex,

On 10/15/20 5:51 PM, Alexandre Torgue wrote:
> On 10/15/20 3:47 PM, Ahmad Fatoum wrote:
>> fixed up, not fixed. I don't know if ST is fine with the changes, for
>> the MC-1, please do:
>>
>> -------------- 8< -------------
>> diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
>> index 5700e6b700d3..7134466256b3 100644
>> --- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
>> +++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
>> @@ -208,6 +208,14 @@ pins2 {
>>          };
>>   };
>>
>> +&sdmmc2_d47_pins_b {
>> +       /* board already has external 47K pull-ups */
>> +
>> +       pins {
>> +               /delete-property/ bias-pull-up;
>> +               bias-disable;
>> +       };
>> +};
>> +
> 
> This proposition remind me an old discussion we got with Marek about "where pin definitions has to be done ?". My approach is to not define pins groups inside board dts file mainly because pinmux is a SoC configuration and a board only use one of those configurations blablabla :). But counter-argument is that pull-up/pull-down, Open-drain push-pull settings are "driven" by the board configuration and I agree.

We can split pinmux away from pinconf and still have a header to be included everywhere
for pin muxing like the i.MX is doing, e.g.

/* stm32mp15-pinmux.h */
#define STM32MP15_PC8__SDMMC1_D0	<STM32_PINMUX('C',  8, AF12)>
#define STM32MP15_PC9__SDMMC1_D1	<STM32_PINMUX('C',  9, AF12)>
#define STM32MP15_PC10__SDMMC1_D2	<STM32_PINMUX('C', 10, AF12)>
#define STM32MP15_PC11__SDMMC1_D3	<STM32_PINMUX('C', 11, AF12)>

The s/stm32mp15-pinctrl.dtsi/stm32mp15-pinconf.dtsi/ can be made to use it and define
the pin configurations that are in use on the ST boards and that most of the boards will
probably copy off.

Boards DTS can then pick and choose which pinctrl groups to take from the ST one.
If they have custom needs they just define their own groups inline
(I know I repeat myself, https://lore.kernel.org/linux-arm-kernel/310aa3a3-09ce-42ef-d1ea-b653163d1d72@pengutronix.de/)

Cheers
Ahmad

> 
> We are exactly in this case here but before to rework all STM32 DT to split pin config I propose to keep what we have today, and to enable bias-pull-up, (or other settings) in boards that need it.
> 
> Marek, what's your feeling ?
> 
> cheers
> alex
> 
> 
> 
>>   &sdmmc2 {
>>          pinctrl-names = "default", "opendrain", "sleep";
>>          pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list