* [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
@ 2026-11-09 19:16 Rob Herring (Arm)
2026-11-10 19:17 ` sashiko-bot
2026-11-12 10:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2026-11-09 19:16 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Jian Shen,
Jijie Shao, Heiner Kallweit, Russell King, Florian Fainelli
Cc: Andrew Lunn, netdev, devicetree, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
2026-11-09 19:16 [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema Rob Herring (Arm)
@ 2026-11-10 19:17 ` sashiko-bot
2026-11-11 14:06 ` Rob Herring
2026-11-12 10:00 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: sashiko-bot @ 2026-11-10 19:17 UTC (permalink / raw)
To: Rob Herring (Arm); +Cc: devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dt-bindings: net: hisilicon,hisi-gmac-v1.yaml omits
hisilicon,hi3516a-gmac
--
commit ab6f211d13f9c7a3f51fb6e0f45f7089669c73d4
Author: Rob Herring (Arm) <robh@kernel.org>
dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
This commit converts the HiSilicon GMAC v1/2 binding from text to DT schema
format and relaxes the node name pattern in mdio.yaml to allow ethernet
controller nodes that directly contain an MDIO bus.
> 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 0000000000000..89ed6ab1905e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
> @@ -0,0 +1,96 @@
[ ... ]
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - const: hisilicon,hix5hd2-gmac
> + - const: hisilicon,hisi-gmac-v1
> + - items:
> + - const: hisilicon,hi3798cv200-gmac
> + - const: hisilicon,hisi-gmac-v2
[Severity: Low]
Should the v2 compatible entry also allow "hisilicon,hi3516a-gmac" via an
enum alongside "hisilicon,hi3798cv200-gmac"?
The removed text binding documented "hisilicon,hi3516a-gmac" as a v2 SoC
compatible string, and hix5hd2_of_match[] in
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c still matches it, so omitting
it leaves that compatible string undocumented for dt_compatible_check and
breaks schema validation for hi3516a GMAC nodes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109191641.653847-3-robh@kernel.org?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
2026-11-10 19:17 ` sashiko-bot
@ 2026-11-11 14:06 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2026-11-11 14:06 UTC (permalink / raw)
To: sashiko-reviews; +Cc: devicetree, conor+dt
On Tue, Nov 10, 2026 at 07:17:28PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] dt-bindings: net: hisilicon,hisi-gmac-v1.yaml omits
> hisilicon,hi3516a-gmac
> --
>
> commit ab6f211d13f9c7a3f51fb6e0f45f7089669c73d4
> Author: Rob Herring (Arm) <robh@kernel.org>
>
> dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
>
> This commit converts the HiSilicon GMAC v1/2 binding from text to DT schema
> format and relaxes the node name pattern in mdio.yaml to allow ethernet
> controller nodes that directly contain an MDIO bus.
>
> > 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 0000000000000..89ed6ab1905e1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
> > @@ -0,0 +1,96 @@
>
> [ ... ]
>
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - const: hisilicon,hix5hd2-gmac
> > + - const: hisilicon,hisi-gmac-v1
> > + - items:
> > + - const: hisilicon,hi3798cv200-gmac
> > + - const: hisilicon,hisi-gmac-v2
>
> [Severity: Low]
> Should the v2 compatible entry also allow "hisilicon,hi3516a-gmac" via an
> enum alongside "hisilicon,hi3798cv200-gmac"?
>
> The removed text binding documented "hisilicon,hi3516a-gmac" as a v2 SoC
> compatible string, and hix5hd2_of_match[] in
> drivers/net/ethernet/hisilicon/hix5hd2_gmac.c still matches it, so omitting
> it leaves that compatible string undocumented for dt_compatible_check and
> breaks schema validation for hi3516a GMAC nodes.
No, the above matches actual users and the .txt binding was not precise.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
2026-11-09 19:16 [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema Rob Herring (Arm)
2026-11-10 19:17 ` sashiko-bot
@ 2026-11-12 10:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-12 10:00 UTC (permalink / raw)
To: Rob Herring
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, krzk+dt, conor+dt,
shenjian15, shaojijie, hkallweit1, linux, f.fainelli, andrew,
netdev, devicetree, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 9 Nov 2026 13:16:41 -0600 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema
https://git.kernel.org/netdev/net-next/c/556e0ac6a771
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-12 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 19:16 [PATCH net-next] dt-bindings: net: Convert HiSilicon GMAC v1/2 to DT schema Rob Herring (Arm)
2026-11-10 19:17 ` sashiko-bot
2026-11-11 14:06 ` Rob Herring
2026-11-12 10:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox