diff mbox series

[net-next,3/8] dt-bindings: net: dsa/switch: Make 'ethernet-port' node addresses hex

Message ID 20231016-dt-net-cleanups-v1-3-a525a090b444@kernel.org (mailing list archive)
State Accepted
Commit 51ff5150258a5af8f45c06518bfd4bba2edeceed
Delegated to: Netdev Maintainers
Headers show
Series dt-bindings: net: Child node schema cleanups | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 1 maintainers not CCed: robh+dt@kernel.org
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 80 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Rob Herring (Arm) Oct. 16, 2023, 9:44 p.m. UTC
'ethernet-port' node unit-addresses should be in hexadecimal. Some
instances have it correct, but fix the ones that don't.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml         | 2 +-
 Documentation/devicetree/bindings/net/dsa/dsa.yaml               | 2 +-
 Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml   | 6 +++---
 Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml | 2 +-
 Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml       | 2 +-
 Documentation/devicetree/bindings/net/ethernet-switch.yaml       | 4 ++--
 Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml        | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

Comments

Arınç ÜNAL Oct. 17, 2023, 6:25 a.m. UTC | #1
On 17.10.2023 00:44, Rob Herring wrote:
> 'ethernet-port' node unit-addresses should be in hexadecimal. Some
> instances have it correct, but fix the ones that don't.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>   Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml         | 2 +-
>   Documentation/devicetree/bindings/net/dsa/dsa.yaml               | 2 +-
>   Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml   | 6 +++---
>   Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml | 2 +-
>   Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml       | 2 +-
>   Documentation/devicetree/bindings/net/ethernet-switch.yaml       | 4 ++--
>   Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml        | 2 +-
>   7 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
> index aa3162c74833..75d8138298fb 100644
> --- a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
> +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
> @@ -53,7 +53,7 @@ properties:
>           const: 0
>   
>       patternProperties:
> -      "^port@[0-9]+$":
> +      "^port@[0-9a-f]+$":
>           type: object
>   
>           $ref: ethernet-controller.yaml#
> diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> index ec74a660beda..e6010821f86f 100644
> --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> @@ -50,7 +50,7 @@ $defs:
>               const: 0
>   
>           patternProperties:
> -          "^(ethernet-)?port@[0-9]+$":
> +          "^(ethernet-)?port@[0-9a-f]+$":
>               description: Ethernet switch ports
>               $ref: dsa-port.yaml#
>               unevaluatedProperties: false
> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> index 20f7ba4e2203..5038818e9f2e 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -157,7 +157,7 @@ patternProperties:
>       additionalProperties: true
>   
>       patternProperties:
> -      "^(ethernet-)?port@[0-9]+$":
> +      "^(ethernet-)?port@[0-6]$":

You also restrict the pattern depending on how many ports the switch has.
Shouldn't this be a separate patch or, at the least, mentioned on the patch
log?

Regardless:

Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>

Arınç
Vladimir Oltean Oct. 19, 2023, 1:21 p.m. UTC | #2
On Mon, Oct 16, 2023 at 04:44:22PM -0500, Rob Herring wrote:
> 'ethernet-port' node unit-addresses should be in hexadecimal. Some
> instances have it correct, but fix the ones that don't.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
index aa3162c74833..75d8138298fb 100644
--- a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
+++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
@@ -53,7 +53,7 @@  properties:
         const: 0
 
     patternProperties:
-      "^port@[0-9]+$":
+      "^port@[0-9a-f]+$":
         type: object
 
         $ref: ethernet-controller.yaml#
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index ec74a660beda..e6010821f86f 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -50,7 +50,7 @@  $defs:
             const: 0
 
         patternProperties:
-          "^(ethernet-)?port@[0-9]+$":
+          "^(ethernet-)?port@[0-9a-f]+$":
             description: Ethernet switch ports
             $ref: dsa-port.yaml#
             unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 20f7ba4e2203..5038818e9f2e 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -157,7 +157,7 @@  patternProperties:
     additionalProperties: true
 
     patternProperties:
-      "^(ethernet-)?port@[0-9]+$":
+      "^(ethernet-)?port@[0-6]$":
         type: object
         additionalProperties: true
 
@@ -186,7 +186,7 @@  $defs:
     patternProperties:
       "^(ethernet-)?ports$":
         patternProperties:
-          "^(ethernet-)?port@[0-9]+$":
+          "^(ethernet-)?port@[0-6]$":
             if:
               required: [ ethernet ]
             then:
@@ -212,7 +212,7 @@  $defs:
     patternProperties:
       "^(ethernet-)?ports$":
         patternProperties:
-          "^(ethernet-)?port@[0-9]+$":
+          "^(ethernet-)?port@[0-6]$":
             if:
               required: [ ethernet ]
             then:
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
index 6a4d90d550b6..9973d64f15a7 100644
--- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
@@ -39,7 +39,7 @@  patternProperties:
   "^(ethernet-)?ports$":
     additionalProperties: true
     patternProperties:
-      "^(ethernet-)?port@[0-9]+$":
+      "^(ethernet-)?port@[0-7]$":
         allOf:
           - if:
               properties:
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index d179c6971193..9432565f4f5d 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -77,7 +77,7 @@  patternProperties:
   "^(ethernet-)?ports$":
     additionalProperties: true
     patternProperties:
-      "^(ethernet-)?port@[0-9]+$":
+      "^(ethernet-)?port@[0-9]$":
         allOf:
           - if:
               properties:
diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
index f1b9075dc7fb..dcbffe19d71a 100644
--- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
@@ -36,7 +36,7 @@  patternProperties:
         const: 0
 
     patternProperties:
-      "^(ethernet-)?port@[0-9]+$":
+      "^(ethernet-)?port@[0-9a-f]+$":
         type: object
         description: Ethernet switch ports
 
@@ -58,7 +58,7 @@  $defs:
     $ref: '#'
 
     patternProperties:
-      "^(ethernet-)?port@[0-9]+$":
+      "^(ethernet-)?port@[0-9a-f]+$":
         description: Ethernet switch ports
         $ref: ethernet-switch-port.yaml#
         unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
index b04ac4966608..f07ae3173b03 100644
--- a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
+++ b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
@@ -86,7 +86,7 @@  properties:
         const: 0
 
     patternProperties:
-      "^port@[0-9]+$":
+      "^port@[12]$":
         type: object
         description: CPSW external ports