From: Mikhail Lukianchikov <avermoal@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Rengarajan Sundararajan <Rengarajan.S@microchip.com>,
UNGLinuxDriver <UNGLinuxDriver@microchip.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mikhail Lukianchikov <avermoal@gmail.com>
Subject: [PATCH] dt-bindings: net: convert microchip,lan78xx.txt to YAML schema
Date: Tue, 7 Jul 2026 22:58:40 +0600 [thread overview]
Message-ID: <20260707165840.107409-1-avermoal@gmail.com> (raw)
Convert the Microchip LAN78xx family (LAN7800, LAN7801, LAN7850) binding
documentation from plain text to DT schema format using YAML.
The conversion was validated with 'make dt_binding_check'
Signed-off-by: Mikhail Lukianchikov <avermoal@gmail.com>
---
.../bindings/net/microchip,lan78xx.txt | 53 --------
.../bindings/net/microchip,lan78xx.yaml | 113 ++++++++++++++++++
2 files changed, 113 insertions(+), 53 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/microchip,lan78xx.txt
create mode 100644 Documentation/devicetree/bindings/net/microchip,lan78xx.yaml
diff --git a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
deleted file mode 100644
index 11a679530ae6..000000000000
--- a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-Microchip LAN78xx Gigabit Ethernet controller
-
-The LAN78XX devices are usually configured by programming their OTP or with
-an external EEPROM, but some platforms (e.g. Raspberry Pi 3 B+) have neither.
-The Device Tree properties, if present, override the OTP and EEPROM.
-
-Required properties:
-- compatible: Should be one of "usb424,7800", "usb424,7801" or "usb424,7850".
-
-The MAC address will be determined using the optional properties
-defined in ethernet.txt.
-
-Optional properties of the embedded PHY:
-- microchip,led-modes: a 0..4 element vector, with each element configuring
- the operating mode of an LED. Omitted LEDs are turned off. Allowed values
- are defined in "include/dt-bindings/net/microchip-lan78xx.h".
-
-Example:
-
-/* Based on the configuration for a Raspberry Pi 3 B+ */
-&usb {
- usb-port@1 {
- compatible = "usb424,2514";
- reg = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- usb-port@1 {
- compatible = "usb424,2514";
- reg = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- ethernet: ethernet@1 {
- compatible = "usb424,7800";
- reg = <1>;
- local-mac-address = [ 00 11 22 33 44 55 ];
-
- mdio {
- #address-cells = <0x1>;
- #size-cells = <0x0>;
- eth_phy: ethernet-phy@1 {
- reg = <1>;
- microchip,led-modes = <
- LAN78XX_LINK_1000_ACTIVITY
- LAN78XX_LINK_10_100_ACTIVITY
- >;
- };
- };
- };
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/net/microchip,lan78xx.yaml b/Documentation/devicetree/bindings/net/microchip,lan78xx.yaml
new file mode 100644
index 000000000000..743667c1e761
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/microchip,lan78xx.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/microchip,lan78xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip LAN78xx Gigabit Ethernet controller
+
+maintainers:
+ - Rengarajan Sundararajan <Rengarajan.S@microchip.com>
+ - UNGLinuxDriver <UNGLinuxDriver@microchip.com>
+
+description:
+ The LAN78XX devices are usually configured by programming their OTP or with
+ an external EEPROM, but some platforms (e.g. Raspberry Pi 3 B+) have neither.
+ The Device Tree properties, if present, override the OTP and EEPROM.
+
+allOf:
+ - $ref: /schemas/usb/usb-device.yaml#
+ - $ref: /schemas/net/ethernet-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - usb424,7800
+ - usb424,7801
+ - usb424,7850
+ reg:
+ maxItems: 1
+ description: USB port number
+ local-mac-address:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minItems: 6
+ maxItems: 6
+ description:
+ MAC address to use if not stored in OTP or EEPROM. If present,
+ overrides OTP/EEPROM.
+ mdio:
+ $ref: /schemas/net/mdio.yaml#
+ unevaluatedProperties: false
+
+patternProperties:
+ "^ethernet-phy(@[0-9a-f]+)?$":
+ type: object
+ description: |
+ PHY node for the embedded or external PHY. The PHY address is
+ given by the 'reg' property.
+ properties:
+ reg:
+ maxItems: 1
+ description: PHY address.
+ microchip,led-modes:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 4
+ description:
+ Array of LED mode values for each of up to 4 LEDs.
+ Omitted LEDs are turned off. Allowed values are defined
+ in include/dt-bindings/net/microchip-lan78xx.h.
+ required:
+ - reg
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/net/microchip-lan78xx.h>
+ / {
+ usb: usb {
+ compatible = "usb-host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ &usb {
+ usb-port@1 {
+ compatible = "usb424,2514";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb-port@1 {
+ compatible = "usb424,2514";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet@1 {
+ compatible = "usb424,7800";
+ reg = <1>;
+ local-mac-address = [00 11 22 33 44 55];
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ethernet-phy@1 {
+ reg = <1>;
+ microchip,led-modes = <
+ LAN78XX_LINK_1000_ACTIVITY
+ LAN78XX_LINK_10_100_ACTIVITY
+ >;
+ };
+ };
+ };
+ };
+ };
+ };
+...
--
2.52.0
next reply other threads:[~2026-07-07 16:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 16:58 Mikhail Lukianchikov [this message]
2026-07-07 18:32 ` [PATCH] dt-bindings: net: convert microchip,lan78xx.txt to YAML schema Rob Herring (Arm)
2026-07-08 10:56 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260707165840.107409-1-avermoal@gmail.com \
--to=avermoal@gmail.com \
--cc=Rengarajan.S@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox