Re: [PATCH v2 8/9] DT: stm32f469-disco: add node for SDIO controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 12, 2017 at 9:34 AM, Alexandre Torgue
<alexandre.torgue@xxxxxx> wrote:
> Hi Andrea
>
>
> On 01/12/2017 08:25 AM, Andrea Merello wrote:
>>
>> On Tue, Jan 10, 2017 at 10:18 AM, Alexandre Torgue
>> <alexandre.torgue@xxxxxx> wrote:
>>>
>>> Hi Andrea
>>>
>>> On 01/10/2017 09:42 AM, Andrea Merello wrote:
>>>>
>>>>
>>>> Signed-off-by: Andrea Merello <andrea.merello@xxxxxxxxx>
>>>
>>>
>>>
>>> Can you please add a commit message.
>>> Can you also change commit header like: "ARM: dts: stm32: enable SDIO
>>> controller on stm32f469 disco board
>>
>>
>> Sure.
>>
>>>
>>>
>>>> ---
>>>>  arch/arm/boot/dts/stm32f429.dtsi      |  2 +-
>>>>  arch/arm/boot/dts/stm32f469-disco.dts | 29
>>>> +++++++++++++++++++++++++++++
>>>>  2 files changed, 30 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/stm32f429.dtsi
>>>> b/arch/arm/boot/dts/stm32f429.dtsi
>>>> index c12a64e..5aba383 100644
>>>> --- a/arch/arm/boot/dts/stm32f429.dtsi
>>>> +++ b/arch/arm/boot/dts/stm32f429.dtsi
>>>> @@ -206,7 +206,7 @@
>>>>                         reg = <0x40007000 0x400>;
>>>>                 };
>>>>
>>>> -               pin-controller {
>>>> +               pinctrl:pin-controller {
>>>>                         #address-cells = <1>;
>>>>                         #size-cells = <1>;
>>>>                         compatible = "st,stm32f429-pinctrl";
>>>
>>>
>>>
>>>
>>>
>>>> diff --git a/arch/arm/boot/dts/stm32f469-disco.dts
>>>> b/arch/arm/boot/dts/stm32f469-disco.dts
>>>> index 8877c00..7b3458e 100644
>>>> --- a/arch/arm/boot/dts/stm32f469-disco.dts
>>>> +++ b/arch/arm/boot/dts/stm32f469-disco.dts
>>>> @@ -65,6 +65,13 @@
>>>>                 serial0 = &usart3;
>>>>         };
>>>>
>>>> +       mmc_vcard: mmc_vcard {
>>>> +               compatible = "regulator-fixed";
>>>> +               regulator-name = "mmc_vcard";
>>>> +               regulator-min-microvolt = <3300000>;
>>>> +               regulator-max-microvolt = <3300000>;
>>>> +       };
>>>> +
>>>>         soc {
>>>>                 dma-ranges = <0xc0000000 0x0 0x10000000>;
>>>>         };
>>>> @@ -78,6 +85,28 @@
>>>>         clock-frequency = <8000000>;
>>>>  };
>>>>
>>>> +&pinctrl {
>>>> +       sdio-cd {
>>>> +               sdio_cd: sdio-cd {
>>>> +                       pins {
>>>> +                               pinmux = <STM32F429_PG2_FUNC_GPIO>;
>>>> +                               bias-pull-up;
>>>> +                       };
>>>> +               };
>>>> +       };
>>>> +};
>>>> +
>>>
>>>
>>>
>>> As you only have config for 469-disco, please add this configuration of
>>> pinmux directly in stm32f429.dtsi.
>>
>>
>> I'm not sure I got your point here..
>>
>> I would say that stm32f429.dtsi should contain the HW description of
>> the MCU, and should be board-agnostic, while stm32f469-disco should
>> contain the HW description of this specific board.
>>
>> Even if we haven't this config for other boards yet, I would say this
>> is still a very board-specific stuff, unrelated to the stm MCU itself.
>> Please correct me if I'm wrong: AFAIK the CD could be routed to any
>> GPIO pin, and it is not dependant by any STM32 specific AFIO.
>
>
> For pinctrl:
> To my point of view pinmuxing defintion is SOC, because those muxing
> possibilities are offered by the SOC.
> The pinmuxing choice is board-specific.
>
> For GPIO:
> yes it stays in board file (it is not a definition but a gpio choice)
>
> I hope to be enough clear :$

Yes, now it makes more sense to me. Thanks.
Going to perform all changes you requested and post a V3. Hopefully today.

>
>>
>>>
>>>> +&sdio {
>>>> +       status = "okay";
>>>> +       vmmc-supply = <&mmc_vcard>;
>>>> +       cd-gpios = <&gpiog 2 0>;
>>>> +       cd-inverted;
>>>> +       pinctrl-names = "default", "opendrain";
>>>> +       pinctrl-0 = <&sdio_pins>;
>>>> +       pinctrl-1 = <&sdio_pins_od>;
>>>> +       bus-width = <4>;
>>>> +};
>>>> +
>>>>  &usart3 {
>>>>         status = "okay";
>>>>  };
>>>>
>>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux