Skip to contentSkip to conversation

dt-bindings: dsa: lan9303: Add lan9303 yaml

PATCH Superseded Jerry Ray 2 participants 3 messages Sep 22, 2022

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jerry Ray

author
#0 lore raw

PATCH 1/1 dt-bindings: dsa: lan9303: Add lan9303 yaml

Adding the dt binding yaml for the lan9303 3-port ethernet switch. The microchip lan9354 3-port ethernet switch will also use the same binding.

---
 .../devicetree/bindings/net/dsa/lan9303.txt   | 100 +-----------
 .../bindings/net/dsa/microchip,lan9303.yaml   | 143 ++++++++++++++++++
 MAINTAINERS                                   |   8 +
 3 files changed, 152 insertions(+), 99 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml
Documentation/devicetree/bindings/net/dsa/lan9303.txt +1 -99
index 464d6bf87605..44d1882530b1 100644
@@ -1,102 +1,4 @@
 SMSC/MicroChip LAN9303 three port ethernet switch
 -------------------------------------------------
 
-Required properties:
-
-- compatible: should be
-  - "smsc,lan9303-i2c" for I2C managed mode
-    or
-  - "smsc,lan9303-mdio" for mdio managed mode
-
-Optional properties:
-
-- reset-gpios: GPIO to be used to reset the whole device
-- reset-duration: reset duration in milliseconds, defaults to 200 ms
-
-Subnodes:
-
-The integrated switch subnode should be specified according to the binding
-described in dsa/dsa.txt. The CPU port of this switch is always port 0.
-
-Note: always use 'reg = <0/1/2>;' for the three DSA ports, even if the device is
-configured to use 1/2/3 instead. This hardware configuration will be
-auto-detected and mapped accordingly.
-
-Example:
-
-I2C managed mode:
-
-	master: masterdevice@X {
-
-		fixed-link { /* RMII fixed link to LAN9303 */
-			speed = <100>;
-			full-duplex;
-		};
-	};
-
-	switch: switch@a {
-		compatible = "smsc,lan9303-i2c";
-		reg = <0xa>;
-		reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
-		reset-duration = <200>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port@0 { /* RMII fixed link to master */
-				reg = <0>;
-				label = "cpu";
-				ethernet = <&master>;
-			};
-
-			port@1 { /* external port 1 */
-				reg = <1>;
-				label = "lan1";
-			};
-
-			port@2 { /* external port 2 */
-				reg = <2>;
-				label = "lan2";
-			};
-		};
-	};
-
-MDIO managed mode:
-
-	master: masterdevice@X {
-		phy-handle = <&switch>;
-
-		mdio {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			switch: switch-phy@0 {
-				compatible = "smsc,lan9303-mdio";
-				reg = <0>;
-				reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
-				reset-duration = <100>;
-
-				ports {
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port@0 {
-						reg = <0>;
-						label = "cpu";
-						ethernet = <&master>;
-					};
-
-					port@1 { /* external port 1 */
-						reg = <1>;
-						label = "lan1";
-					};
-
-					port@2 { /* external port 2 */
-						reg = <2>;
-						label = "lan2";
-					};
-				};
-			};
-		};
-	};
+See Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml for the documentation.
Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml new file +143 -0

143 lines not on this page · raw message

MAINTAINERS +8 -0
index 74036b51911d..d9abe66092be 100644
@@ -13385,6 +13385,14 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/microchip/lan743x_*
 
+MICROCHIP LAN9303/LAN9354 ETHERNET SWITCH DRIVER
+M:	Jerry Ray <[email protected]>
+M:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml
+F:	drivers/net/dsa/lan9303*
+
 MICROCHIP LAN966X ETHERNET DRIVER
 M:	Horatiu Vultur <[email protected]>
 M:	[email protected]
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Jerry Ray

Adding the dt binding yaml for the lan9303 3-port ethernet switch. The microchip lan9354 3-port ethernet switch will also use the same binding.

Please do not post internal patches to upstream mailing lists and upstream people.

Best regards,
Krzysztof

#2 lore raw
In reply to Jerry Ray
Quoted 4 lines · Jerry Ray

Adding the dt binding yaml for the lan9303 3-port ethernet switch. The microchip lan9354 3-port ethernet switch will also use the same binding.

Quoted 8 lines
---
 .../devicetree/bindings/net/dsa/lan9303.txt   | 100 +-----------
 .../bindings/net/dsa/microchip,lan9303.yaml   | 143 ++++++++++++++++++
 MAINTAINERS                                   |   8 +
 3 files changed, 152 insertions(+), 99 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/microchip,lan9303.example.dtb: switch@0: Unevaluated properties are not allowed ('mdio' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1681194

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.