Skip to contentSkip to conversation

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

PATCH Superseded Marek Vasut 3 participants 5 messages Jul 5, 2024 – Jul 9, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support

The RTL8211F PHY does support LED configuration, document support for LEDs in the binding document.

---
Cc: "David S. Miller" <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +11 -3
index 18ee72f5c74a8..28c048368073b 100644
@@ -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 {
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 39 lines · Marek Vasut

The RTL8211F PHY does support LED configuration, document support for LEDs in the binding document.

---
Cc: "David S. Miller" <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +0 -3
index 18ee72f5c74a8..28c048368073b 100644
@@ -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
 

Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml properties: · line 63

Quoted 10 lines
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +10 -0
+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

#2 lore raw
Quoted 40 lines · Rob Herring
Quoted 39 lines · Marek Vasut

The RTL8211F PHY does support LED configuration, document support for LEDs in the binding document.

---
Cc: "David S. Miller" <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
  .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
  1 file changed, 11 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +0 -3
index 18ee72f5c74a8..28c048368073b 100644
@@ -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
 
Quoted 15 lines

Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml properties: · line 63

Quoted 10 lines
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +10 -0
+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 ?

#3 lore raw
Quoted 17 lines · Marek Vasut
Quoted 12 lines

Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml properties: · line 63

Quoted 11 lines
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +10 -0
+allOf:
+  - $ref: ethernet-phy.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ethernet-phy-id001c.c916
+    then:
+      properties:
+        leds: true
Quoted 4 lines

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.

Quoted 5 lines

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

#4 lore raw
Quoted 18 lines · Krzysztof Kozlowski
Quoted 17 lines · Marek Vasut
Quoted 16 lines

Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml properties: · line 63

Quoted 11 lines
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml +10 -0
+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.

Quoted 8 lines
Quoted 5 lines

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.