netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Broadcom b53 YAML bindings
@ 2020-11-12  4:50 Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 01/10] dt-bindings: net: dsa: Extend switch nodes pattern Florian Fainelli
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Hi,

This patch series fixes the various Broadcom SoCs DTS files and the
existing YAML binding for missing properties before adding a proper b53
switch YAML binding from Kurt.

If this all looks good, given that there are quite a few changes to the
DTS files, it might be best if I take them through the upcoming Broadcom
ARM SoC pull requests. Let me know if you would like those patches to be
applied differently.

Thanks!

Changes in v2:

- collected Reviewed-by and Acked-by tags from Vladimir and Rob
- corrected BCM5301X default compatibles based on data provided by Rafal
  on his different devices
- updated strategy for NSP to tackle each board separately
- provide both a ports {} container node and its #address-cells and
  #size-cells properties
- renamed binding from b53.yaml to brcm,b53.yaml

Florian Fainelli (9):
  dt-bindings: net: dsa: Extend switch nodes pattern
  dt-bindings: net: dsa: Document sfp and managed properties
  ARM: dts: BCM5301X: Update Ethernet switch node name
  ARM: dts: BCM5301X: Add a default compatible for switch node
  ARM: dts: BCM5301X: Provide defaults ports container node
  ARM: dts: NSP: Update ethernet switch node name
  ARM: dts: NSP: Fix Ethernet switch SGMII register name
  ARM: dts: NSP: Add a SRAB compatible string for each board
  ARM: dts: NSP: Provide defaults ports container node

Kurt Kanzenbach (1):
  dt-bindings: net: dsa: b53: Add YAML bindings

 .../devicetree/bindings/net/dsa/b53.txt       | 149 -----------
 .../devicetree/bindings/net/dsa/brcm,b53.yaml | 249 ++++++++++++++++++
 .../devicetree/bindings/net/dsa/dsa.yaml      |   6 +-
 MAINTAINERS                                   |   2 +-
 arch/arm/boot/dts/bcm-nsp.dtsi                |   8 +-
 arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts  |   3 -
 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts  |   3 -
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts |   3 -
 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts |   3 -
 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts |   3 -
 arch/arm/boot/dts/bcm4709.dtsi                |   4 +
 .../boot/dts/bcm47094-linksys-panamera.dts    |   3 -
 arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts |   3 -
 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts |   3 -
 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts |   3 -
 .../boot/dts/bcm47094-luxul-xwr-3150-v1.dts   |   3 -
 arch/arm/boot/dts/bcm47094.dtsi               |   4 +
 arch/arm/boot/dts/bcm5301x.dtsi               |   8 +-
 arch/arm/boot/dts/bcm953012er.dts             |   3 -
 arch/arm/boot/dts/bcm958522er.dts             |   4 +
 arch/arm/boot/dts/bcm958525er.dts             |   4 +
 arch/arm/boot/dts/bcm958525xmc.dts            |   4 +
 arch/arm/boot/dts/bcm958622hr.dts             |   3 -
 arch/arm/boot/dts/bcm958623hr.dts             |   3 -
 arch/arm/boot/dts/bcm958625hr.dts             |   3 -
 arch/arm/boot/dts/bcm958625k.dts              |   3 -
 arch/arm/boot/dts/bcm988312hr.dts             |   3 -
 27 files changed, 287 insertions(+), 203 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/dsa/b53.txt
 create mode 100644 Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml

-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 01/10] dt-bindings: net: dsa: Extend switch nodes pattern
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 02/10] dt-bindings: net: dsa: Document sfp and managed properties Florian Fainelli
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Vladimir Oltean, Rob Herring, Andrew Lunn,
	Vivien Didelot, David S. Miller, Jakub Kicinski, Rob Herring,
	Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Upon discussion with Kurt, Rob and Vladimir it appears that we should be
allowing ethernet-switch as a node name, update dsa.yaml accordingly.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/net/dsa/dsa.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index a765ceba28c6..5f8f5177938a 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -20,7 +20,7 @@ select: false
 
 properties:
   $nodename:
-    pattern: "^switch(@.*)?$"
+    pattern: "^(ethernet-)?switch(@.*)?$"
 
   dsa,member:
     minItems: 2
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 02/10] dt-bindings: net: dsa: Document sfp and managed properties
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 01/10] dt-bindings: net: dsa: Extend switch nodes pattern Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 03/10] ARM: dts: BCM5301X: Update Ethernet switch node name Florian Fainelli
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Rob Herring, Andrew Lunn, Vivien Didelot,
	Vladimir Oltean, David S. Miller, Jakub Kicinski, Rob Herring,
	Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

The 'sfp' and 'managed' properties are commonly used to describe
Ethernet switch ports connecting to SFP/SFF cages, describe these two
properties as valid that we inherit from ethernet-controller.yaml.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index 5f8f5177938a..8e044631bcf7 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -78,6 +78,10 @@ patternProperties:
 
           mac-address: true
 
+          sfp: true
+
+          managed: true
+
         required:
           - reg
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 03/10] ARM: dts: BCM5301X: Update Ethernet switch node name
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 01/10] dt-bindings: net: dsa: Extend switch nodes pattern Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 02/10] dt-bindings: net: dsa: Document sfp and managed properties Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node Florian Fainelli
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Vladimir Oltean, Andrew Lunn, Vivien Didelot,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Update the switch unit name from srab to ethernet-switch, allowing us to
fix warnings such as:

  CHECK   arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml:
srab@18007000: $nodename:0: 'srab@18007000' does not match
'^(ethernet-)?switch(@.*)?$'
        From schema:
Documentation/devicetree/bindings/net/dsa/b53.yaml

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 90c09c48721b..b8d2e8d28482 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -483,7 +483,7 @@ thermal: thermal@2c0 {
 		};
 	};
 
-	srab: srab@18007000 {
+	srab: ethernet-switch@18007000 {
 		compatible = "brcm,bcm5301x-srab";
 		reg = <0x18007000 0x1000>;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (2 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 03/10] ARM: dts: BCM5301X: Update Ethernet switch node name Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  5:25   ` Rafał Miłecki
  2020-11-12  4:50 ` [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node Florian Fainelli
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Provide a default compatible string which is based on the 53011 SRAB
compatible by default. The 4709 and 47094 default to the 53012 SRAB
compatible.

This allows us to have sane defaults and silences the following
warnings:

arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml:
ethernet-switch@18007000: compatible: 'oneOf' conditional failed, one
must be fixed:
        ['brcm,bcm5301x-srab'] is too short
        'brcm,bcm5325' was expected
        'brcm,bcm53115' was expected
        'brcm,bcm53125' was expected
        'brcm,bcm53128' was expected
        'brcm,bcm5365' was expected
        'brcm,bcm5395' was expected
        'brcm,bcm5389' was expected
        'brcm,bcm5397' was expected
        'brcm,bcm5398' was expected
        'brcm,bcm11360-srab' was expected
        'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab',
'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab',
'brcm,bcm53019-srab']
        'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab',
'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab',
'brcm,bcm58311-srab', 'brcm,bcm58313-srab']
        'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab',
'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab',
'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab']
        'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch',
'brcm,bcm6328-switch', 'brcm,bcm6368-switch']
        From schema:
Documentation/devicetree/bindings/net/dsa/b53.yaml

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm4709.dtsi  | 4 ++++
 arch/arm/boot/dts/bcm47094.dtsi | 4 ++++
 arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm4709.dtsi b/arch/arm/boot/dts/bcm4709.dtsi
index e1bb8661955f..cba3d910bed8 100644
--- a/arch/arm/boot/dts/bcm4709.dtsi
+++ b/arch/arm/boot/dts/bcm4709.dtsi
@@ -9,3 +9,7 @@ &uart0 {
 	clock-frequency = <125000000>;
 	status = "okay";
 };
+
+&srab {
+	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
+};
diff --git a/arch/arm/boot/dts/bcm47094.dtsi b/arch/arm/boot/dts/bcm47094.dtsi
index 747ca030435f..2a8f7312d1be 100644
--- a/arch/arm/boot/dts/bcm47094.dtsi
+++ b/arch/arm/boot/dts/bcm47094.dtsi
@@ -25,3 +25,7 @@ &uart0 {
 	clock-frequency = <125000000>;
 	status = "okay";
 };
+
+&srab {
+	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
+};
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index b8d2e8d28482..a4ab3aabf8b0 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -484,7 +484,7 @@ thermal: thermal@2c0 {
 	};
 
 	srab: ethernet-switch@18007000 {
-		compatible = "brcm,bcm5301x-srab";
+		compatible = "brcm,bcm53011-srab", "brcm,bcm5301x-srab";
 		reg = <0x18007000 0x1000>;
 
 		status = "disabled";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (3 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  5:26   ` Rafał Miłecki
  2020-11-12  4:50 ` [PATCH v2 06/10] ARM: dts: NSP: Update ethernet switch node name Florian Fainelli
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Provide an empty 'ports' container node with the correct #address-cells
and #size-cells properties. This silences the following warning:

arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml:
ethernet-switch@18007000: 'oneOf' conditional failed, one must be fixed:
        'ports' is a required property
        'ethernet-ports' is a required property
        From schema:
Documentation/devicetree/bindings/net/dsa/b53.yaml

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts     | 3 ---
 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts     | 3 ---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts    | 3 ---
 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts    | 3 ---
 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts    | 3 ---
 arch/arm/boot/dts/bcm47094-linksys-panamera.dts  | 3 ---
 arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts    | 3 ---
 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts    | 3 ---
 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts    | 3 ---
 arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 3 ---
 arch/arm/boot/dts/bcm5301x.dtsi                  | 4 ++++
 arch/arm/boot/dts/bcm953012er.dts                | 3 ---
 12 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
index 810fc32f1895..766107a28d4d 100644
--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
+++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
@@ -65,9 +65,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "poe";
diff --git a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
index 7604b4480bb1..530380272a93 100644
--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
+++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
@@ -72,9 +72,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@4 {
 			reg = <4>;
 			label = "lan";
diff --git a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
index abd35a518046..51c64f0b2560 100644
--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
+++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
@@ -122,9 +122,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "lan4";
diff --git a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
index 1ec655809e57..afc98234170f 100644
--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
+++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
@@ -65,9 +65,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@4 {
 			reg = <4>;
 			label = "poe";
diff --git a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
index 04bfd58127fc..811bc371562e 100644
--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
+++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
@@ -113,9 +113,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "lan4";
diff --git a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
index 3bb3fe5bfbf8..3725f2b0d60b 100644
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
@@ -201,9 +201,6 @@ &srab {
 	dsa,member = <0 0>;
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@1 {
 			reg = <1>;
 			label = "lan7";
diff --git a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
index 068e384b8ab7..6fa101f0a90d 100644
--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
+++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
@@ -59,9 +59,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "poe";
diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
index 9ae815ddbb4b..4f8d777ae18d 100644
--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
@@ -57,9 +57,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "lan";
diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
index a21b2d185596..e17e9a17fb00 100644
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
@@ -108,9 +108,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "lan4";
diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
index 4d5c5aa7dc42..a270d6798363 100644
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
@@ -79,9 +79,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "lan4";
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index a4ab3aabf8b0..7db72a2f1020 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -490,6 +490,10 @@ srab: ethernet-switch@18007000 {
 		status = "disabled";
 
 		/* ports are defined in board DTS */
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
 	};
 
 	rng: rng@18004000 {
diff --git a/arch/arm/boot/dts/bcm953012er.dts b/arch/arm/boot/dts/bcm953012er.dts
index 957468224622..52feca0fb906 100644
--- a/arch/arm/boot/dts/bcm953012er.dts
+++ b/arch/arm/boot/dts/bcm953012er.dts
@@ -69,9 +69,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			reg = <0>;
 			label = "port0";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 06/10] ARM: dts: NSP: Update ethernet switch node name
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (4 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 07/10] ARM: dts: NSP: Fix Ethernet switch SGMII register name Florian Fainelli
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Vladimir Oltean, Andrew Lunn, Vivien Didelot,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Update the switch unit name from srab to ethernet-switch, allowing us
to fix warnings such as:

     CHECK   arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml
    arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml:
    srab@18007000: $nodename:0: 'srab@18007000' does not match
    '^(ethernet-)?switch(@.*)?$'
            From schema:
    Documentation/devicetree/bindings/net/dsa/b53.yaml

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index e895f7cb8c9f..e7d08959d5fe 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -385,7 +385,7 @@ ccbtimer1: timer@35000 {
 			clock-names = "apb_pclk";
 		};
 
-		srab: srab@36000 {
+		srab: ethernet-switch@36000 {
 			compatible = "brcm,nsp-srab";
 			reg = <0x36000 0x1000>,
 			      <0x3f308 0x8>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 07/10] ARM: dts: NSP: Fix Ethernet switch SGMII register name
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (5 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 06/10] ARM: dts: NSP: Update ethernet switch node name Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-12  4:50 ` [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board Florian Fainelli
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Vladimir Oltean, Andrew Lunn, Vivien Didelot,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

The register name should be "sgmii_config", not "sgmii", this is not a
functional change since no code is currently looking for that register
by name (or at all).

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index e7d08959d5fe..09fd7e55c069 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -390,7 +390,7 @@ srab: ethernet-switch@36000 {
 			reg = <0x36000 0x1000>,
 			      <0x3f308 0x8>,
 			      <0x3f410 0xc>;
-			reg-names = "srab", "mux_config", "sgmii";
+			reg-names = "srab", "mux_config", "sgmii_config";
 			interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (6 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 07/10] ARM: dts: NSP: Fix Ethernet switch SGMII register name Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-14  1:08   ` Vladimir Oltean
  2020-11-12  4:50 ` [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node Florian Fainelli
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Provide a valid compatible string for the Ethernet switch node based on
the board including the switch. This allows us to have sane defaults and
silences the following warnings:

 arch/arm/boot/dts/bcm958522er.dt.yaml:
    ethernet-switch@36000: compatible: 'oneOf' conditional failed,
one
    must be fixed:
            ['brcm,bcm5301x-srab'] is too short
            'brcm,bcm5325' was expected
            'brcm,bcm53115' was expected
            'brcm,bcm53125' was expected
            'brcm,bcm53128' was expected
            'brcm,bcm5365' was expected
            'brcm,bcm5395' was expected
            'brcm,bcm5389' was expected
            'brcm,bcm5397' was expected
            'brcm,bcm5398' was expected
            'brcm,bcm11360-srab' was expected
            'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab',
    'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab',
    'brcm,bcm53019-srab']
            'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab',
    'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab',
    'brcm,bcm58311-srab', 'brcm,bcm58313-srab']
            'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab',
    'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab',
    'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab']
            'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch',
    'brcm,bcm6328-switch', 'brcm,bcm6368-switch']
            From schema:
    Documentation/devicetree/bindings/net/dsa/b53.yaml

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm958522er.dts  | 4 ++++
 arch/arm/boot/dts/bcm958525er.dts  | 4 ++++
 arch/arm/boot/dts/bcm958525xmc.dts | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/bcm958522er.dts b/arch/arm/boot/dts/bcm958522er.dts
index 7be4c4e628e0..5443fc079e6e 100644
--- a/arch/arm/boot/dts/bcm958522er.dts
+++ b/arch/arm/boot/dts/bcm958522er.dts
@@ -178,3 +178,7 @@ &usb3_phy {
 &xhci {
 	status = "okay";
 };
+
+&srab {
+	compatible = "brcm,bcm58522-srab", "brcm,nsp-srab";
+};
diff --git a/arch/arm/boot/dts/bcm958525er.dts b/arch/arm/boot/dts/bcm958525er.dts
index e58ed7e95346..e1e3c26cef19 100644
--- a/arch/arm/boot/dts/bcm958525er.dts
+++ b/arch/arm/boot/dts/bcm958525er.dts
@@ -190,3 +190,7 @@ &usb3_phy {
 &xhci {
 	status = "okay";
 };
+
+&srab {
+	compatible = "brcm,bcm58525-srab", "brcm,nsp-srab";
+};
diff --git a/arch/arm/boot/dts/bcm958525xmc.dts b/arch/arm/boot/dts/bcm958525xmc.dts
index 21f922dc6019..f161ba2e7e5e 100644
--- a/arch/arm/boot/dts/bcm958525xmc.dts
+++ b/arch/arm/boot/dts/bcm958525xmc.dts
@@ -210,3 +210,7 @@ &usb3_phy {
 &xhci {
 	status = "okay";
 };
+
+&srab {
+	compatible = "brcm,bcm58525-srab", "brcm,nsp-srab";
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (7 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-14  1:10   ` Vladimir Oltean
  2020-11-12  4:50 ` [PATCH v2 10/10] dt-bindings: net: dsa: b53: Add YAML bindings Florian Fainelli
  2020-11-21  2:56 ` [PATCH v2 00/10] Broadcom b53 " Florian Fainelli
  10 siblings, 1 reply; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, Rob Herring, Ray Jui,
	Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
	Hauke Mehrtens, Rafał Miłecki,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

Provide an empty 'ports' container node with the correct #address-cells
and #size-cells properties. This silences the following warning:

arch/arm/boot/dts/bcm958522er.dt.yaml:
ethernet-switch@36000: 'oneOf' conditional failed, one must be fixed:
            'ports' is a required property
            'ethernet-ports' is a required property
            From schema:
Documentation/devicetree/bindings/net/dsa/b53.yaml

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi    | 4 ++++
 arch/arm/boot/dts/bcm958622hr.dts | 3 ---
 arch/arm/boot/dts/bcm958623hr.dts | 3 ---
 arch/arm/boot/dts/bcm958625hr.dts | 3 ---
 arch/arm/boot/dts/bcm958625k.dts  | 3 ---
 arch/arm/boot/dts/bcm988312hr.dts | 3 ---
 6 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 09fd7e55c069..b4d2cc70afb1 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -420,6 +420,10 @@ srab: ethernet-switch@36000 {
 			status = "disabled";
 
 			/* ports are defined in board DTS */
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
 		};
 
 		i2c0: i2c@38000 {
diff --git a/arch/arm/boot/dts/bcm958622hr.dts b/arch/arm/boot/dts/bcm958622hr.dts
index a49c2fd21f4a..83cb877d63db 100644
--- a/arch/arm/boot/dts/bcm958622hr.dts
+++ b/arch/arm/boot/dts/bcm958622hr.dts
@@ -176,9 +176,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			label = "port0";
 			reg = <0>;
diff --git a/arch/arm/boot/dts/bcm958623hr.dts b/arch/arm/boot/dts/bcm958623hr.dts
index dd6dff6452b8..4e106ce1384a 100644
--- a/arch/arm/boot/dts/bcm958623hr.dts
+++ b/arch/arm/boot/dts/bcm958623hr.dts
@@ -180,9 +180,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			label = "port0";
 			reg = <0>;
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index a71371b4065e..cda6cc281e18 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -195,9 +195,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			label = "port0";
 			reg = <0>;
diff --git a/arch/arm/boot/dts/bcm958625k.dts b/arch/arm/boot/dts/bcm958625k.dts
index 7782b61c51a1..ffbff0014c65 100644
--- a/arch/arm/boot/dts/bcm958625k.dts
+++ b/arch/arm/boot/dts/bcm958625k.dts
@@ -216,9 +216,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			label = "port0";
 			reg = <0>;
diff --git a/arch/arm/boot/dts/bcm988312hr.dts b/arch/arm/boot/dts/bcm988312hr.dts
index edd0f630e025..3fd39c479a3c 100644
--- a/arch/arm/boot/dts/bcm988312hr.dts
+++ b/arch/arm/boot/dts/bcm988312hr.dts
@@ -184,9 +184,6 @@ &srab {
 	status = "okay";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		port@0 {
 			label = "port0";
 			reg = <0>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 10/10] dt-bindings: net: dsa: b53: Add YAML bindings
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (8 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node Florian Fainelli
@ 2020-11-12  4:50 ` Florian Fainelli
  2020-11-21  2:56 ` [PATCH v2 00/10] Broadcom b53 " Florian Fainelli
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-12  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Kurt Kanzenbach, Rob Herring, Florian Fainelli, Andrew Lunn,
	Vivien Didelot, Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Kurt Kanzenbach <kurt@kmk-computers.de>

Convert the b53 DSA device tree bindings to YAML in order to allow
for automatic checking and such.

Reviewed-by: Rob Herring <robh@kernel.org>
Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
---
 .../devicetree/bindings/net/dsa/b53.txt       | 149 -----------
 .../devicetree/bindings/net/dsa/brcm,b53.yaml | 249 ++++++++++++++++++
 MAINTAINERS                                   |   2 +-
 3 files changed, 250 insertions(+), 150 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/dsa/b53.txt
 create mode 100644 Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml

diff --git a/Documentation/devicetree/bindings/net/dsa/b53.txt b/Documentation/devicetree/bindings/net/dsa/b53.txt
deleted file mode 100644
index f1487a751b1a..000000000000
--- a/Documentation/devicetree/bindings/net/dsa/b53.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-Broadcom BCM53xx Ethernet switches
-==================================
-
-Required properties:
-
-- compatible: For external switch chips, compatible string must be exactly one
-  of: "brcm,bcm5325"
-      "brcm,bcm53115"
-      "brcm,bcm53125"
-      "brcm,bcm53128"
-      "brcm,bcm5365"
-      "brcm,bcm5395"
-      "brcm,bcm5389"
-      "brcm,bcm5397"
-      "brcm,bcm5398"
-
-  For the BCM11360 SoC, must be:
-      "brcm,bcm11360-srab" and the mandatory "brcm,cygnus-srab" string
-
-  For the BCM5310x SoCs with an integrated switch, must be one of:
-      "brcm,bcm53010-srab"
-      "brcm,bcm53011-srab"
-      "brcm,bcm53012-srab"
-      "brcm,bcm53018-srab"
-      "brcm,bcm53019-srab" and the mandatory "brcm,bcm5301x-srab" string
-
-  For the BCM5831X/BCM1140x SoCs with an integrated switch, must be one of:
-      "brcm,bcm11404-srab"
-      "brcm,bcm11407-srab"
-      "brcm,bcm11409-srab"
-      "brcm,bcm58310-srab"
-      "brcm,bcm58311-srab"
-      "brcm,bcm58313-srab" and the mandatory "brcm,omega-srab" string
-
-  For the BCM585xx/586XX/88312 SoCs with an integrated switch, must be one of:
-      "brcm,bcm58522-srab"
-      "brcm,bcm58523-srab"
-      "brcm,bcm58525-srab"
-      "brcm,bcm58622-srab"
-      "brcm,bcm58623-srab"
-      "brcm,bcm58625-srab"
-      "brcm,bcm88312-srab" and the mandatory "brcm,nsp-srab string
-
-  For the BCM63xx/33xx SoCs with an integrated switch, must be one of:
-      "brcm,bcm3384-switch"
-      "brcm,bcm6328-switch"
-      "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"
-
-Required properties for BCM585xx/586xx/88312 SoCs:
-
- - reg: a total of 3 register base addresses, the first one must be the
-   Switch Register Access block base, the second is the port 5/4 mux
-   configuration register and the third one is the SGMII configuration
-   and status register base address.
-
- - interrupts: a total of 13 interrupts must be specified, in the following
-   order: port 0-5, 7-8 link status change, then the integrated PHY interrupt,
-   then the timestamping interrupt and the sleep timer interrupts for ports
-   5,7,8.
-
-Optional properties for BCM585xx/586xx/88312 SoCs:
-
-  - reg-names: a total of 3 names matching the 3 base register address, must
-    be in the following order:
-	"srab"
-	"mux_config"
-	"sgmii_config"
-
-  - interrupt-names: a total of 13 names matching the 13 interrupts specified
-    must be in the following order:
-	"link_state_p0"
-	"link_state_p1"
-	"link_state_p2"
-	"link_state_p3"
-	"link_state_p4"
-	"link_state_p5"
-	"link_state_p7"
-	"link_state_p8"
-	"phy"
-	"ts"
-	"imp_sleep_timer_p5"
-	"imp_sleep_timer_p7"
-	"imp_sleep_timer_p8"
-
-See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
-required and optional properties.
-
-Examples:
-
-Ethernet switch connected via MDIO to the host, CPU port wired to eth0:
-
-	eth0: ethernet@10001000 {
-		compatible = "brcm,unimac";
-		reg = <0x10001000 0x1000>;
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-		};
-	};
-
-	mdio0: mdio@10000000 {
-		compatible = "brcm,unimac-mdio";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		switch0: ethernet-switch@1e {
-			compatible = "brcm,bcm53125";
-			reg = <30>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port0@0 {
-					reg = <0>;
-					label = "lan1";
-				};
-
-				port1@1 {
-					reg = <1>;
-					label = "lan2";
-				};
-
-				port5@5 {
-					reg = <5>;
-					label = "cable-modem";
-					fixed-link {
-						speed = <1000>;
-						full-duplex;
-					};
-					phy-mode = "rgmii-txid";
-				};
-
-				port8@8 {
-					reg = <8>;
-					label = "cpu";
-					fixed-link {
-						speed = <1000>;
-						full-duplex;
-					};
-					phy-mode = "rgmii-txid";
-					ethernet = <&eth0>;
-				};
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
new file mode 100644
index 000000000000..c3c938893ad9
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
@@ -0,0 +1,249 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/brcm,b53.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM53xx Ethernet switches
+
+allOf:
+  - $ref: dsa.yaml#
+
+maintainers:
+  - Florian Fainelli <f.fainelli@gmail.com>
+
+description:
+  Broadcom BCM53xx Ethernet switches
+
+properties:
+  compatible:
+    oneOf:
+      - const: brcm,bcm5325
+      - const: brcm,bcm53115
+      - const: brcm,bcm53125
+      - const: brcm,bcm53128
+      - const: brcm,bcm5365
+      - const: brcm,bcm5395
+      - const: brcm,bcm5389
+      - const: brcm,bcm5397
+      - const: brcm,bcm5398
+      - items:
+          - const: brcm,bcm11360-srab
+          - const: brcm,cygnus-srab
+      - items:
+          - enum:
+              - brcm,bcm53010-srab
+              - brcm,bcm53011-srab
+              - brcm,bcm53012-srab
+              - brcm,bcm53018-srab
+              - brcm,bcm53019-srab
+          - const: brcm,bcm5301x-srab
+      - items:
+          - enum:
+              - brcm,bcm11404-srab
+              - brcm,bcm11407-srab
+              - brcm,bcm11409-srab
+              - brcm,bcm58310-srab
+              - brcm,bcm58311-srab
+              - brcm,bcm58313-srab
+          - const: brcm,omega-srab
+      - items:
+          - enum:
+              - brcm,bcm58522-srab
+              - brcm,bcm58523-srab
+              - brcm,bcm58525-srab
+              - brcm,bcm58622-srab
+              - brcm,bcm58623-srab
+              - brcm,bcm58625-srab
+              - brcm,bcm88312-srab
+          - const: brcm,nsp-srab
+      - items:
+          - enum:
+              - brcm,bcm3384-switch
+              - brcm,bcm6328-switch
+              - brcm,bcm6368-switch
+          - const: brcm,bcm63xx-switch
+
+required:
+  - compatible
+  - reg
+
+# BCM585xx/586xx/88312 SoCs
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - brcm,bcm58522-srab
+          - brcm,bcm58523-srab
+          - brcm,bcm58525-srab
+          - brcm,bcm58622-srab
+          - brcm,bcm58623-srab
+          - brcm,bcm58625-srab
+          - brcm,bcm88312-srab
+then:
+  properties:
+    reg:
+      minItems: 3
+      maxItems: 3
+    reg-names:
+      items:
+        - const: srab
+        - const: mux_config
+        - const: sgmii_config
+    interrupts:
+      minItems: 13
+      maxItems: 13
+    interrupt-names:
+      items:
+        - const: link_state_p0
+        - const: link_state_p1
+        - const: link_state_p2
+        - const: link_state_p3
+        - const: link_state_p4
+        - const: link_state_p5
+        - const: link_state_p7
+        - const: link_state_p8
+        - const: phy
+        - const: ts
+        - const: imp_sleep_timer_p5
+        - const: imp_sleep_timer_p7
+        - const: imp_sleep_timer_p8
+  required:
+    - interrupts
+else:
+  properties:
+    reg:
+      maxItems: 1
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    mdio {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        ethernet-switch@1e {
+            compatible = "brcm,bcm53125";
+            reg = <30>;
+
+            ethernet-ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+                    label = "lan1";
+                };
+
+                port@1 {
+                    reg = <1>;
+                    label = "lan2";
+                };
+
+                port@5 {
+                    reg = <5>;
+                    label = "cable-modem";
+                    phy-mode = "rgmii-txid";
+                    fixed-link {
+                        speed = <1000>;
+                        full-duplex;
+                    };
+                };
+
+                port@8 {
+                    reg = <8>;
+                    label = "cpu";
+                    phy-mode = "rgmii-txid";
+                    ethernet = <&eth0>;
+                    fixed-link {
+                        speed = <1000>;
+                        full-duplex;
+                    };
+                };
+            };
+        };
+    };
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    axi {
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        switch@36000 {
+            compatible = "brcm,bcm58623-srab", "brcm,nsp-srab";
+            reg = <0x36000 0x1000>,
+                  <0x3f308 0x8>,
+                  <0x3f410 0xc>;
+            reg-names = "srab", "mux_config", "sgmii_config";
+            interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "link_state_p0",
+                              "link_state_p1",
+                              "link_state_p2",
+                              "link_state_p3",
+                              "link_state_p4",
+                              "link_state_p5",
+                              "link_state_p7",
+                              "link_state_p8",
+                              "phy",
+                              "ts",
+                              "imp_sleep_timer_p5",
+                              "imp_sleep_timer_p7",
+                              "imp_sleep_timer_p8";
+
+            ethernet-ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    label = "port0";
+                    reg = <0>;
+                };
+
+                port@1 {
+                    label = "port1";
+                    reg = <1>;
+                };
+
+                port@2 {
+                    label = "port2";
+                    reg = <2>;
+                };
+
+                port@3 {
+                    label = "port3";
+                    reg = <3>;
+                };
+
+                port@4 {
+                    label = "port4";
+                    reg = <4>;
+                };
+
+                port@8 {
+                    ethernet = <&amac2>;
+                    label = "cpu";
+                    reg = <8>;
+                    fixed-link {
+                        speed = <1000>;
+                        full-duplex;
+                    };
+                };
+            };
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index e73636b75f29..3786322d0bfb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3380,7 +3380,7 @@ M:	Florian Fainelli <f.fainelli@gmail.com>
 L:	netdev@vger.kernel.org
 L:	openwrt-devel@lists.openwrt.org (subscribers-only)
 S:	Supported
-F:	Documentation/devicetree/bindings/net/dsa/b53.txt
+F:	Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
 F:	drivers/net/dsa/b53/*
 F:	include/linux/platform_data/b53.h
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node
  2020-11-12  4:50 ` [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node Florian Fainelli
@ 2020-11-12  5:25   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2020-11-12  5:25 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel
  Cc: Andrew Lunn, Vivien Didelot, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

On 12.11.2020 05:50, Florian Fainelli wrote:
> Provide a default compatible string which is based on the 53011 SRAB
> compatible by default. The 4709 and 47094 default to the 53012 SRAB
> compatible.
> 
> (...)
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Looks good, thanks!

Acked-by: Rafał Miłecki <rafal@milecki.pl>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node
  2020-11-12  4:50 ` [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node Florian Fainelli
@ 2020-11-12  5:26   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2020-11-12  5:26 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel
  Cc: Andrew Lunn, Vivien Didelot, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

On 12.11.2020 05:50, Florian Fainelli wrote:
> Provide an empty 'ports' container node with the correct #address-cells
> and #size-cells properties. This silences the following warning:
> 
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml:
> ethernet-switch@18007000: 'oneOf' conditional failed, one must be fixed:
>          'ports' is a required property
>          'ethernet-ports' is a required property
>          From schema:
> Documentation/devicetree/bindings/net/dsa/b53.yaml
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Nice!

Acked-by: Rafał Miłecki <rafal@milecki.pl>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board
  2020-11-12  4:50 ` [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board Florian Fainelli
@ 2020-11-14  1:08   ` Vladimir Oltean
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Oltean @ 2020-11-14  1:08 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-arm-kernel, Andrew Lunn, Vivien Didelot, David S. Miller,
	Jakub Kicinski, Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

On Wed, Nov 11, 2020 at 08:50:18PM -0800, Florian Fainelli wrote:
> Provide a valid compatible string for the Ethernet switch node based on
> the board including the switch. This allows us to have sane defaults and
> silences the following warnings:
> 
>  arch/arm/boot/dts/bcm958522er.dt.yaml:
>     ethernet-switch@36000: compatible: 'oneOf' conditional failed,
> one
>     must be fixed:
>             ['brcm,bcm5301x-srab'] is too short
>             'brcm,bcm5325' was expected
>             'brcm,bcm53115' was expected
>             'brcm,bcm53125' was expected
>             'brcm,bcm53128' was expected
>             'brcm,bcm5365' was expected
>             'brcm,bcm5395' was expected
>             'brcm,bcm5389' was expected
>             'brcm,bcm5397' was expected
>             'brcm,bcm5398' was expected
>             'brcm,bcm11360-srab' was expected
>             'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab',
>     'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab',
>     'brcm,bcm53019-srab']
>             'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab',
>     'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab',
>     'brcm,bcm58311-srab', 'brcm,bcm58313-srab']
>             'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab',
>     'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab',
>     'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab']
>             'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch',
>     'brcm,bcm6328-switch', 'brcm,bcm6368-switch']
>             From schema:
>     Documentation/devicetree/bindings/net/dsa/b53.yaml
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node
  2020-11-12  4:50 ` [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node Florian Fainelli
@ 2020-11-14  1:10   ` Vladimir Oltean
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Oltean @ 2020-11-14  1:10 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-arm-kernel, Andrew Lunn, Vivien Didelot, David S. Miller,
	Jakub Kicinski, Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach

On Wed, Nov 11, 2020 at 08:50:19PM -0800, Florian Fainelli wrote:
> Provide an empty 'ports' container node with the correct #address-cells
> and #size-cells properties. This silences the following warning:
> 
> arch/arm/boot/dts/bcm958522er.dt.yaml:
> ethernet-switch@36000: 'oneOf' conditional failed, one must be fixed:
>             'ports' is a required property
>             'ethernet-ports' is a required property
>             From schema:
> Documentation/devicetree/bindings/net/dsa/b53.yaml
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

So 'ports' is not going away and getting bulk-replaced with
'ethernet-ports'. Good.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 00/10] Broadcom b53 YAML bindings
  2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
                   ` (9 preceding siblings ...)
  2020-11-12  4:50 ` [PATCH v2 10/10] dt-bindings: net: dsa: b53: Add YAML bindings Florian Fainelli
@ 2020-11-21  2:56 ` Florian Fainelli
  10 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2020-11-21  2:56 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel
  Cc: Andrew Lunn, Vivien Didelot, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Rob Herring, Ray Jui, Scott Branden,
	maintainer:BROADCOM IPROC ARM ARCHITECTURE, Hauke Mehrtens,
	Rafał Miłecki, open list:NETWORKING DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Kurt Kanzenbach



On 11/11/2020 8:50 PM, Florian Fainelli wrote:
> Hi,
> 
> This patch series fixes the various Broadcom SoCs DTS files and the
> existing YAML binding for missing properties before adding a proper b53
> switch YAML binding from Kurt.
> 
> If this all looks good, given that there are quite a few changes to the
> DTS files, it might be best if I take them through the upcoming Broadcom
> ARM SoC pull requests. Let me know if you would like those patches to be
> applied differently.
> 
> Thanks!

Series applied to devicetree/next, thanks everyone.
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-11-21  2:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12  4:50 [PATCH v2 00/10] Broadcom b53 YAML bindings Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 01/10] dt-bindings: net: dsa: Extend switch nodes pattern Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 02/10] dt-bindings: net: dsa: Document sfp and managed properties Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 03/10] ARM: dts: BCM5301X: Update Ethernet switch node name Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 04/10] ARM: dts: BCM5301X: Add a default compatible for switch node Florian Fainelli
2020-11-12  5:25   ` Rafał Miłecki
2020-11-12  4:50 ` [PATCH v2 05/10] ARM: dts: BCM5301X: Provide defaults ports container node Florian Fainelli
2020-11-12  5:26   ` Rafał Miłecki
2020-11-12  4:50 ` [PATCH v2 06/10] ARM: dts: NSP: Update ethernet switch node name Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 07/10] ARM: dts: NSP: Fix Ethernet switch SGMII register name Florian Fainelli
2020-11-12  4:50 ` [PATCH v2 08/10] ARM: dts: NSP: Add a SRAB compatible string for each board Florian Fainelli
2020-11-14  1:08   ` Vladimir Oltean
2020-11-12  4:50 ` [PATCH v2 09/10] ARM: dts: NSP: Provide defaults ports container node Florian Fainelli
2020-11-14  1:10   ` Vladimir Oltean
2020-11-12  4:50 ` [PATCH v2 10/10] dt-bindings: net: dsa: b53: Add YAML bindings Florian Fainelli
2020-11-21  2:56 ` [PATCH v2 00/10] Broadcom b53 " Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).