Re: [PATCH 2/2] ARM: dts: at91: sama5d29_curiosity: Add device tree for sama5d29_curiosity board

From: claudiu beznea
Date: Tue Sep 12 2023 - 07:01:47 EST


Hi, Nicolas, Mihai,

On 11.09.2023 19:01, Nicolas Ferre wrote:
> Hi Mihai, Claudiu,
>
> First of all, thanks a lot for your help on this board DT, that's great!
>
> On 03/08/2023 at 11:09, claudiu beznea wrote:
>> Hi, Mihai,
>>
>> On 02.08.2023 15:19,Mihai.Sain@xxxxxxxxxxxxx  wrote:
>>>> +&macb0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
>>>> +     #address-cells = <1>;
>>>> +     #size-cells = <0>;
>>>> +     phy-mode = "rmii";
>>>> +     status = "disabled";
>>> Should any phy/mdio container be placed here? Also, any reason this node
>>> is disabled?
>>> The board has no phy.
>>> We will add external phy boards to macb interface and they will be
>>> present in dt-overlay.
>>>
>> Then remove the macb0 node from here and keep it in overlay.
>
> What about choosing a phy and making it enabled by default. Because I doubt
> people will use this board without a phy under Linux, honestly.
> Overlays would remove this "by default" node and add the replacing phy if
> hardware plugged-in is different.

The only thing about it (FMPOV) is that there might be people expecting the
default bindings to work with every PHY.

>
> By doing this we avoid having difficult situations where the most used phy
> with this board is disabled or non existant and that we absolutely need an
> overlay for such a basic thing as having Ethernet working out-of-the-box...

I undestand your POV but DTS should describe the hardware. At least, is
there any PHY shipped with the board to be considered the default one?

SAMA5D3 EDS uses the same approach: it defines individual overlays for each
supported ethernet PHYs.

Thank you,
Claudiu Beznea

>
> Just my $0.02, but it might simplify our life in the long run...
>
> Best regards,
>   Nicolas