diff mbox series

[net-next] dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support

Message ID 20240705215207.256863-1-marex@denx.de
State Changes Requested
Headers show
Series [net-next] dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Marek Vasut July 5, 2024, 9:51 p.m. UTC
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(-)

Comments

Rob Herring (Arm) July 8, 2024, 8:58 p.m. UTC | #1
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
Marek Vasut July 8, 2024, 9:01 p.m. UTC | #2
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 ?
Krzysztof Kozlowski July 9, 2024, 9:01 a.m. UTC | #3
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
Marek Vasut July 9, 2024, 11:37 a.m. UTC | #4
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 mbox series

Patch

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 {