2022-05-17 14:12:46

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v6 0/3] document dt-schema for some USB Ethernet controllers

changes v6:
- remove USB hub example from microchip,lan95xx.yaml. We care only about
ethernet node.
- use only documented USD ID in example.
- add Reviewed-by
- drop board patches, all of them are taken by different subsystem
maintainers.

changes v5:
- move compatible string changes to a separate patch
- add note about possible regressions

changes v4:
- reword commit logs.
- add note about compatible fix

Oleksij Rempel (3):
dt-bindings: net: add schema for ASIX USB Ethernet controllers
dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet
controllers
dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller

.../devicetree/bindings/net/asix,ax88178.yaml | 68 +++++++++++++++++++
.../bindings/net/microchip,lan95xx.yaml | 63 +++++++++++++++++
.../devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 +-
3 files changed, 132 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/net/asix,ax88178.yaml
create mode 100644 Documentation/devicetree/bindings/net/microchip,lan95xx.yaml

--
2.30.2



2022-05-18 00:42:09

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v6 0/3] document dt-schema for some USB Ethernet controllers

On Tue, May 17, 2022 at 01:15:02PM +0200, Oleksij Rempel wrote:
> changes v6:
> - remove USB hub example from microchip,lan95xx.yaml. We care only about
> ethernet node.
> - use only documented USD ID in example.
> - add Reviewed-by
> - drop board patches, all of them are taken by different subsystem
> maintainers.
>
> changes v5:
> - move compatible string changes to a separate patch
> - add note about possible regressions
>
> changes v4:
> - reword commit logs.
> - add note about compatible fix
>
> Oleksij Rempel (3):
> dt-bindings: net: add schema for ASIX USB Ethernet controllers
> dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet
> controllers
> dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller

Series applied, thanks.

Rob

2022-05-18 01:00:44

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v6 1/3] dt-bindings: net: add schema for ASIX USB Ethernet controllers

Create schema for ASIX USB Ethernet controllers and import some of
currently supported USB IDs form drivers/net/usb/asix_devices.c

These devices are already used in some of DTs. So, this schema makes it official.
NOTE: there was no previously documented txt based DT binding for this
controllers.

Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../devicetree/bindings/net/asix,ax88178.yaml | 68 +++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/asix,ax88178.yaml

diff --git a/Documentation/devicetree/bindings/net/asix,ax88178.yaml b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
new file mode 100644
index 000000000000..1af52358de4c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/asix,ax88178.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: The device tree bindings for the USB Ethernet controllers
+
+maintainers:
+ - Oleksij Rempel <[email protected]>
+
+description: |
+ Device tree properties for hard wired USB Ethernet devices.
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - usbb95,1720 # ASIX AX88172
+ - usbb95,172a # ASIX AX88172A
+ - usbb95,1780 # ASIX AX88178
+ - usbb95,7720 # ASIX AX88772
+ - usbb95,772a # ASIX AX88772A
+ - usbb95,772b # ASIX AX88772B
+ - usbb95,7e2b # ASIX AX88772B
+
+ reg: true
+ local-mac-address: true
+ mac-address: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ usb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet@1 {
+ compatible = "usbb95,7e2b";
+ reg = <1>;
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ - |
+ usb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb1@1 {
+ compatible = "usb1234,5678";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet@1 {
+ compatible = "usbb95,772b";
+ reg = <1>;
+ };
+ };
+ };
--
2.30.2


2022-05-18 04:12:42

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v6 3/3] dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller

This documentation provides wrong node name for the Ethernet controller.
It should be "ethernet" instead of "smsc" as required by Ethernet
controller devicetree schema:
Documentation/devicetree/bindings/net/ethernet-controller.yaml

Signed-off-by: Oleksij Rempel <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index a5c5db6a0b2d..ba51fb1252b9 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -151,7 +151,7 @@ Example for HSIC:
#address-cells = <1>;
#size-cells = <0>;

- usbnet: smsc@1 {
+ usbnet: ethernet@1 {
compatible = "usb424,9730";
reg = <1>;
};
--
2.30.2


2022-05-18 04:35:28

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v6 2/3] dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet controllers

Create initial schema for Microchip/SMSC LAN95xx USB Ethernet controllers and
import some of currently supported USB IDs form drivers/net/usb/smsc95xx.c

These devices are already used in some of DTs. So, this schema makes it official.
NOTE: there was no previously documented txt based DT binding for this
controllers.

Signed-off-by: Oleksij Rempel <[email protected]>
---
.../bindings/net/microchip,lan95xx.yaml | 63 +++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/microchip,lan95xx.yaml

diff --git a/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
new file mode 100644
index 000000000000..cf91fecd8909
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/microchip,lan95xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: The device tree bindings for the USB Ethernet controllers
+
+maintainers:
+ - Oleksij Rempel <[email protected]>
+
+description: |
+ Device tree properties for hard wired SMSC95xx compatible USB Ethernet
+ controller.
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - usb424,9500 # SMSC9500 USB Ethernet Device
+ - usb424,9505 # SMSC9505 USB Ethernet Device
+ - usb424,9530 # SMSC LAN9530 USB Ethernet Device
+ - usb424,9730 # SMSC LAN9730 USB Ethernet Device
+ - usb424,9900 # SMSC9500 USB Ethernet Device (SAL10)
+ - usb424,9901 # SMSC9505 USB Ethernet Device (SAL10)
+ - usb424,9902 # SMSC9500A USB Ethernet Device (SAL10)
+ - usb424,9903 # SMSC9505A USB Ethernet Device (SAL10)
+ - usb424,9904 # SMSC9512/9514 USB Hub & Ethernet Device (SAL10)
+ - usb424,9905 # SMSC9500A USB Ethernet Device (HAL)
+ - usb424,9906 # SMSC9505A USB Ethernet Device (HAL)
+ - usb424,9907 # SMSC9500 USB Ethernet Device (Alternate ID)
+ - usb424,9908 # SMSC9500A USB Ethernet Device (Alternate ID)
+ - usb424,9909 # SMSC9512/9514 USB Hub & Ethernet Devic. ID)
+ - usb424,9e00 # SMSC9500A USB Ethernet Device
+ - usb424,9e01 # SMSC9505A USB Ethernet Device
+ - usb424,9e08 # SMSC LAN89530 USB Ethernet Device
+ - usb424,ec00 # SMSC9512/9514 USB Hub & Ethernet Device
+
+ reg: true
+ local-mac-address: true
+ mac-address: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ usb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet@1 {
+ compatible = "usb424,9e00";
+ reg = <1>;
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
--
2.30.2