Skip to contentSkip to conversation

dt-bindings: net: Fix ave descriptions

PATCH Applied Kunihiko Hayashi 4 participants 8 messages Apr 5, 2022 – Apr 8, 2022

Subsystems (5)
lore
Share & tools
lore

Kunihiko Hayashi

author maintainer
#0 lore raw

cover dt-bindings: net: Fix ave descriptions

This series fixes dt-schema descriptions for ave4 controller.

Kunihiko Hayashi (2):
dt-bindings: net: ave: Clean up clocks, resets, and their names using
compatible string
dt-bindings: net: ave: Use unevaluatedProperties

 .../bindings/net/socionext,uniphier-ave4.yaml | 57 +++++++++++++------
 1 file changed, 39 insertions(+), 18 deletions(-)
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: net: ave: Clean up clocks, resets, and their names using compatible string

Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks, resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

---
 .../bindings/net/socionext,uniphier-ave4.yaml | 55 +++++++++++++------
 1 file changed, 38 insertions(+), 17 deletions(-)
Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml +38 -17
index e602761f7b14..f257520b9a7e 100644
@@ -13,9 +13,6 @@ description: |
   This describes the devicetree bindings for AVE ethernet controller
   implemented on Socionext UniPhier SoCs.
 
-allOf:
-  - $ref: ethernet-controller.yaml#
-
 properties:
   compatible:
     enum:
@@ -44,25 +41,13 @@ properties:
     minItems: 1
     maxItems: 4
 
-  clock-names:
-    oneOf:
-      - items:          # for Pro4
-          - const: gio
-          - const: ether
-          - const: ether-gb
-          - const: ether-phy
-      - const: ether    # for others
+  clock-names: true
 
   resets:
     minItems: 1
     maxItems: 2
 
-  reset-names:
-    oneOf:
-      - items:          # for Pro4
-          - const: gio
-          - const: ether
-      - const: ether    # for others
+  reset-names: true
 
   socionext,syscon-phy-mode:
     $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -78,6 +63,42 @@ properties:
     $ref: mdio.yaml#
     unevaluatedProperties: false
 
+allOf:
+  - $ref: ethernet-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: socionext,uniphier-pro4-ave4
+    then:
+      properties:
+        clocks:
+          minItems: 4
+          maxItems: 4
+        clock-names:
+          items:
+            - const: gio
+            - const: ether
+            - const: ether-gb
+            - const: ether-phy
+        resets:
+          minItems: 2
+          maxItems: 2
+        reset-names:
+          items:
+            - const: gio
+            - const: ether
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          const: ether
+        resets:
+          maxItems: 1
+        reset-names:
+          const: ether
+
 required:
   - compatible
   - reg
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: net: ave: Clean up clocks, resets, and their names using compatible string

Quoted 10 lines · Kunihiko Hayashi

Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks, resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

---
 .../bindings/net/socionext,uniphier-ave4.yaml | 55 +++++++++++++------
 1 file changed, 38 insertions(+), 17 deletions(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#3 lore raw

PATCH 2/2 dt-bindings: net: ave: Use unevaluatedProperties

In reply to Kunihiko Hayashi

This refers common bindings, so this is preferred for unevaluatedProperties instead of additionalProperties.

---
 .../devicetree/bindings/net/socionext,uniphier-ave4.yaml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml +1 -1
index f257520b9a7e..b0ebcef6801c 100644
@@ -111,7 +111,7 @@ required:
   - reset-names
   - mdio
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] dt-bindings: net: ave: Use unevaluatedProperties

Quoted 8 lines · Kunihiko Hayashi

This refers common bindings, so this is preferred for unevaluatedProperties instead of additionalProperties.

---
 .../devicetree/bindings/net/socionext,uniphier-ave4.yaml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#5 lore raw
In reply to Kunihiko Hayashi

Hi,

Quoted 9 lines · Kunihiko Hayashi

This series fixes dt-schema descriptions for ave4 controller.

Kunihiko Hayashi (2):
dt-bindings: net: ave: Clean up clocks, resets, and their names using
compatible string
dt-bindings: net: ave: Use unevaluatedProperties

 .../bindings/net/socionext,uniphier-ave4.yaml | 57 +++++++++++++------
 1 file changed, 39 insertions(+), 18 deletions(-)

@Rob: since you acked this series, I guess you prefer/except this will go via net net-next tree, is that correct?

Thanks!

Paolo

maintainer
#6 lore raw
Quoted 10 lines · Paolo Abeni

Hi,

Quoted 7 lines · Kunihiko Hayashi

This series fixes dt-schema descriptions for ave4 controller.

Kunihiko Hayashi (2):
dt-bindings: net: ave: Clean up clocks, resets, and their names using
compatible string
dt-bindings: net: ave: Use unevaluatedProperties

Quoted 5 lines
Quoted 2 lines
 .../bindings/net/socionext,uniphier-ave4.yaml | 57 +++++++++++++------
 1 file changed, 39 insertions(+), 18 deletions(-)

@Rob: since you acked this series, I guess you prefer/except this will go via net net-next tree, is that correct?

Yes, please. Though often I pick up the standalone DT net patches because the netdev maintainers haven't.

Rob

#7 lore raw
In reply to Kunihiko Hayashi
This series was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Quoted 8 lines · On Tue, 5 Apr 2022 16:52:59 +0900 you wrote:

This series fixes dt-schema descriptions for ave4 controller.

Kunihiko Hayashi (2):
dt-bindings: net: ave: Clean up clocks, resets, and their names using
compatible string
dt-bindings: net: ave: Use unevaluatedProperties

[...]

Here is the summary with links:
- [1/2] dt-bindings: net: ave: Clean up clocks, resets, and their names using compatible string

    https://git.kernel.org/netdev/net/c/2610bd72efe4
  - [2/2] dt-bindings: net: ave: Use unevaluatedProperties
    https://git.kernel.org/netdev/net/c/5a80059d8804

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html