[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cec079e-991e-4222-a76d-d6156de0daca@arinc9.com>
Date: Wed, 13 Sep 2023 08:52:37 +0300
From: Arınç ÜNAL <arinc.unal@...nc9.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com, Linus Walleij <linus.walleij@...aro.org>,
Alvin Šipraga <alsi@...g-olufsen.dk>,
Daniel Golle <daniel@...rotopia.org>, Landen Chao
<Landen.Chao@...iatek.com>, DENG Qingfang <dqfext@...il.com>,
Sean Wang <sean.wang@...iatek.com>, Matthias Brugger
<matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
mithat.guner@...ont.com, erkin.bozoglu@...ont.com, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: document internal MDIO bus
On 12.09.2023 22:34, Vladimir Oltean wrote:
> On Tue, Sep 12, 2023 at 10:23:51PM +0300, Arınç ÜNAL wrote:
>> The phylink bindings for user ports I ended up making by looking up the
>> existing devicetrees are different than the phylink bindings for the shared
>> (CPU and DSA) ports currently enforced on all switches.
>>
>> My phylink bindings for user ports:
>>
>> allOf:
>> - anyOf:
>> - required: [ fixed-link ]
>> - required: [ phy-handle ]
>> - required: [ managed ]
>>
>> - if:
>> required: [ fixed-link ]
>> then:
>> not:
>> required: [ managed ]
>
> Right, it should have been anyOf and not oneOf.. my mistake. It is a bug
> which should be fixed. It's the same phylink that gets used in both cases,
> user ports and shared ports :)
One more thing, I don't recall phy-mode being required to be defined for
user ports as it will default to GMII. I don't believe this is the same
case for shared ports so phy-mode is required only for them?
>
>>
>> The phylink bindings for shared ports enforced on all switches on
>> dsa-port.yaml:
>>
>> allOf:
>> - required:
>> - phy-mode
>> - oneOf:
>> - required:
>> - fixed-link
>> - required:
>> - phy-handle
>> - required:
>> - managed
>>
>> Here's what I understand:
>>
>> - For switches in dsa_switches_apply_workarounds[]
>> - Enforce the latter for shared ports.
>> - Enforce the former for user ports.
>>
>> - For switches not in dsa_switches_apply_workarounds[]
>> - Enforce the former for all ports.
>
> No, no. We enforce the dt-schema regardless of switch presence in
> dsa_switches_apply_workarounds[], to encourage users to fix device trees
> (those who run schema validation). The kernel workaround consists in
> doing something (skipping phylink) for the device trees where the schema
> warns on shared ports. But there should be a single sub-schema for
> validating phylink bindings, whatever port kind it is.
Hmm, like writing phylink.yaml and then referring to it under the port
pattern node? This could prevent a lot of repetition.
Arınç
Powered by blists - more mailing lists