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

Marek Vasut marex at denx.de
Fri Oct 16 07:02:37 EDT 2020


On 10/16/20 8:19 AM, Ahmad Fatoum wrote:
> Hello Alex,

Hi,

> 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/)

The downside of this is that you will end up with a lot of duplication
of "pin groups" in board files.



More information about the linux-arm-kernel mailing list