Message ID | 20240705215207.256863-1-marex@denx.de (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support | expand |
On Fri, Jul 05, 2024 at 11:51:46PM +0200, Marek Vasut wrote: > The RTL8211F PHY does support LED configuration, document support > for LEDs in the binding document. > > Signed-off-by: Marek Vasut <marex@denx.de> > --- > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Andrew Lunn <andrew@lunn.ch> > Cc: Conor Dooley <conor+dt@kernel.org> > Cc: Eric Dumazet <edumazet@google.com> > Cc: Florian Fainelli <f.fainelli@gmail.com> > Cc: Heiner Kallweit <hkallweit1@gmail.com> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> > Cc: Paolo Abeni <pabeni@redhat.com> > Cc: Rob Herring <robh@kernel.org> > Cc: devicetree@vger.kernel.org > Cc: netdev@vger.kernel.org > --- > .../devicetree/bindings/net/realtek,rtl82xx.yaml | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml > index 18ee72f5c74a8..28c048368073b 100644 > --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml > +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml > @@ -14,9 +14,6 @@ maintainers: > description: > Bindings for Realtek RTL82xx PHYs > > -allOf: > - - $ref: ethernet-phy.yaml# > - > properties: > compatible: > enum: > @@ -54,6 +51,17 @@ properties: > > unevaluatedProperties: false > > +allOf: > + - $ref: ethernet-phy.yaml# > + - if: > + properties: > + compatible: > + contains: > + const: ethernet-phy-id001c.c916 > + then: > + properties: > + leds: true This has no effect. 'leds' node is already allowed with the ref to ethernet-phy.yaml. I suppose you could negate the if and then, but I'm not really that worried if someone defines LEDs for a device with no LEDs. Rob
On 7/8/24 10:58 PM, Rob Herring wrote: > On Fri, Jul 05, 2024 at 11:51:46PM +0200, Marek Vasut wrote: >> The RTL8211F PHY does support LED configuration, document support >> for LEDs in the binding document. >> >> Signed-off-by: Marek Vasut <marex@denx.de> >> --- >> Cc: "David S. Miller" <davem@davemloft.net> >> Cc: Andrew Lunn <andrew@lunn.ch> >> Cc: Conor Dooley <conor+dt@kernel.org> >> Cc: Eric Dumazet <edumazet@google.com> >> Cc: Florian Fainelli <f.fainelli@gmail.com> >> Cc: Heiner Kallweit <hkallweit1@gmail.com> >> Cc: Jakub Kicinski <kuba@kernel.org> >> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> >> Cc: Paolo Abeni <pabeni@redhat.com> >> Cc: Rob Herring <robh@kernel.org> >> Cc: devicetree@vger.kernel.org >> Cc: netdev@vger.kernel.org >> --- >> .../devicetree/bindings/net/realtek,rtl82xx.yaml | 14 +++++++++++--- >> 1 file changed, 11 insertions(+), 3 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml >> index 18ee72f5c74a8..28c048368073b 100644 >> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml >> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml >> @@ -14,9 +14,6 @@ maintainers: >> description: >> Bindings for Realtek RTL82xx PHYs >> >> -allOf: >> - - $ref: ethernet-phy.yaml# >> - >> properties: >> compatible: >> enum: >> @@ -54,6 +51,17 @@ properties: >> >> unevaluatedProperties: false >> >> +allOf: >> + - $ref: ethernet-phy.yaml# >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: ethernet-phy-id001c.c916 >> + then: >> + properties: >> + leds: true > > This has no effect. 'leds' node is already allowed with the ref to > ethernet-phy.yaml. I suppose you could negate the if and then, but I'm > not really that worried if someone defines LEDs for a device with no > LEDs. So shall I simply do: leds: true and by done with it, as the easier way out ?
On 08/07/2024 23:01, Marek Vasut wrote: >>> >>> +allOf: >>> + - $ref: ethernet-phy.yaml# >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + const: ethernet-phy-id001c.c916 >>> + then: >>> + properties: >>> + leds: true >> >> This has no effect. 'leds' node is already allowed with the ref to >> ethernet-phy.yaml. I suppose you could negate the if and then, but I'm >> not really that worried if someone defines LEDs for a device with no >> LEDs. > > So shall I simply do: > > leds: true > > and by done with it, as the easier way out ? No, you should not have to do anything. Do you see any dtbs_check error without this patch? Best regards, Krzysztof
On 7/9/24 11:01 AM, Krzysztof Kozlowski wrote: > On 08/07/2024 23:01, Marek Vasut wrote: >>>> >>>> +allOf: >>>> + - $ref: ethernet-phy.yaml# >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + const: ethernet-phy-id001c.c916 >>>> + then: >>>> + properties: >>>> + leds: true >>> >>> This has no effect. 'leds' node is already allowed with the ref to >>> ethernet-phy.yaml. I suppose you could negate the if and then, but I'm >>> not really that worried if someone defines LEDs for a device with no >>> LEDs. >> >> So shall I simply do: >> >> leds: true >> >> and by done with it, as the easier way out ? > > No, you should not have to do anything. Do you see any dtbs_check error > without this patch? Not yet, but I do plan to describe PHY LEDs on a board I have locally, with RTL8211F PHY. I sent a V2 of this patch with leds:true and this conditional inverted.
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml index 18ee72f5c74a8..28c048368073b 100644 --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml @@ -14,9 +14,6 @@ maintainers: description: Bindings for Realtek RTL82xx PHYs -allOf: - - $ref: ethernet-phy.yaml# - properties: compatible: enum: @@ -54,6 +51,17 @@ properties: unevaluatedProperties: false +allOf: + - $ref: ethernet-phy.yaml# + - if: + properties: + compatible: + contains: + const: ethernet-phy-id001c.c916 + then: + properties: + leds: true + examples: - | mdio {
The RTL8211F PHY does support LED configuration, document support for LEDs in the binding document. Signed-off-by: Marek Vasut <marex@denx.de> --- Cc: "David S. Miller" <davem@davemloft.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Conor Dooley <conor+dt@kernel.org> Cc: Eric Dumazet <edumazet@google.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Cc: netdev@vger.kernel.org --- .../devicetree/bindings/net/realtek,rtl82xx.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)