From: "Rob Herring (Arm)" <robh@kernel.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jian Shen <shenjian15@huawei.com>,
Jijie Shao <shaojijie@huawei.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
Date: Mon, 9 Nov 2026 13:16:41 -0600 [thread overview]
Message-ID: <20261109191641.653847-3-robh@kernel.org> (raw)
Convert the HiSilicon GMAC v1/2 binding to DT schema format.
As this binding also contains the MDIO bus directly rather than in an
'mdio' child node, the MDIO node name schema needs to be relaxed.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
.../bindings/net/hisilicon,hisi-gmac-v1.yaml | 96 +++++++++++++++++++
.../bindings/net/hisilicon-hix5hd2-gmac.txt | 60 ------------
.../devicetree/bindings/net/mdio.yaml | 7 +-
3 files changed, 102 insertions(+), 61 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
delete mode 100644 Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
new file mode 100644
index 000000000000..89ed6ab1905e
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/hisilicon,hisi-gmac-v1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon GMAC controller
+
+maintainers:
+ - Jian Shen <shenjian15@huawei.com>
+ - Jijie Shao <shaojijie@huawei.com>
+
+allOf:
+ - $ref: /schemas/net/ethernet-controller.yaml#
+ - $ref: /schemas/net/mdio.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: hisilicon,hix5hd2-gmac
+ - const: hisilicon,hisi-gmac-v1
+ - items:
+ - const: hisilicon,hi3798cv200-gmac
+ - const: hisilicon,hisi-gmac-v2
+
+ reg:
+ items:
+ - description: MAC registers
+ - description: External interface control register
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: mac_core
+ - const: mac_ifc
+
+ resets:
+ minItems: 1
+ maxItems: 3
+
+ reset-names:
+ minItems: 1
+ items:
+ - const: mac_core
+ - const: mac_ifc
+ - const: phy
+
+ hisilicon,phy-reset-delays-us:
+ description: Triplet of PHY reset delays in microseconds.
+ items:
+ - description: Pre-reset delay.
+ - description: Reset pulse duration.
+ - description: Post-reset delay.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - phy-mode
+ - phy-handle
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/histb-clock.h>
+
+ ethernet@f9840000 {
+ compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
+ reg = <0xf9840000 0x1000>, <0xf984300c 0x4>;
+ interrupts = <0 71 4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy-mode = "rgmii";
+ phy-handle = <&phy2>;
+ mac-address = [00 00 00 00 00 00];
+ clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
+ clock-names = "mac_core", "mac_ifc";
+ resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
+ reset-names = "mac_core", "mac_ifc", "phy";
+ hisilicon,phy-reset-delays-us = <10000 10000 30000>;
+
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
deleted file mode 100644
index cddf46bf6b63..000000000000
--- a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-Hisilicon hix5hd2 gmac controller
-
-Required properties:
-- compatible: should contain one of the following SoC strings:
- * "hisilicon,hix5hd2-gmac"
- * "hisilicon,hi3798cv200-gmac"
- * "hisilicon,hi3516a-gmac"
- and one of the following version string:
- * "hisilicon,hisi-gmac-v1"
- * "hisilicon,hisi-gmac-v2"
- The version v1 includes SoCs hix5hd2.
- The version v2 includes SoCs hi3798cv200, hi3516a.
-- reg: specifies base physical address(s) and size of the device registers.
- The first region is the MAC register base and size.
- The second region is external interface control register.
-- interrupts: should contain the MAC interrupt.
-- #address-cells: must be <1>.
-- #size-cells: must be <0>.
-- phy-mode: see ethernet.txt [1].
-- phy-handle: see ethernet.txt [1].
-- clocks: clock phandle and specifier pair.
-- clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
-- resets: should contain the phandle to the MAC core reset signal(optional),
- the MAC interface reset signal(optional)
- and the PHY reset signal(optional).
-- reset-names: contain the reset signal name "mac_core"(optional),
- "mac_ifc"(optional) and "phy"(optional).
-- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
- The 1st cell is reset pre-delay in micro seconds.
- The 2nd cell is reset pulse in micro seconds.
- The 3rd cell is reset post-delay in micro seconds.
-
-The MAC address will be determined using the properties defined in
-ethernet.txt[1].
-
-- PHY subnode: inherits from phy binding [2]
-
-[1] Documentation/devicetree/bindings/net/ethernet.txt
-[2] Documentation/devicetree/bindings/net/phy.txt
-
-Example:
- gmac0: ethernet@f9840000 {
- compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
- reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
- interrupts = <0 71 4>;
- #address-cells = <1>;
- #size-cells = <0>;
- phy-mode = "rgmii";
- phy-handle = <&phy2>;
- mac-address = [00 00 00 00 00 00];
- clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
- clock-names = "mac_core", "mac_ifc";
- resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
- reset-names = "mac_core", "mac_ifc", "phy";
- hisilicon,phy-reset-delays-us = <10000 10000 30000>;
-
- phy2: ethernet-phy@2 {
- reg = <2>;
- };
- };
diff --git a/Documentation/devicetree/bindings/net/mdio.yaml b/Documentation/devicetree/bindings/net/mdio.yaml
index bed3987a8fbf..1f812753dbd1 100644
--- a/Documentation/devicetree/bindings/net/mdio.yaml
+++ b/Documentation/devicetree/bindings/net/mdio.yaml
@@ -17,9 +17,14 @@ description:
bus. These should follow the generic ethernet-phy.yaml document, or
a device specific binding document.
+select:
+ properties:
+ $nodename:
+ pattern: '^mdio(-(bus|external))?(@.+|-([0-9]+))?$'
+
properties:
$nodename:
- pattern: '^mdio(-(bus|external))?(@.+|-([0-9]+))?$'
+ pattern: '^(ethernet|mdio(-(bus|external))?)(@.+|-([0-9]+))?$'
"#address-cells":
const: 1
--
2.53.0
reply other threads:[~2026-11-09 19:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261109191641.653847-3-robh@kernel.org \
--to=robh@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
/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
all inboxes | Powered by JetHome®