Skip to contentSkip to conversation

dt-bindings: net: Convert hisilicon,hns-mdio to DT schema

PATCH Applied Rob Herring (Arm) 2 participants 2 messages Sep 30 – Oct 5

Subsystems (4)

v2 of 3 Applied 1/1 Latest is v3 →

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH v2 1/1 dt-bindings: net: Convert hisilicon,hns-mdio to DT schema

Convert the hisilicon,hns-mdio binding to DT schema format. Add the missing 'subctrl-vbase' property which is already in use.

Assisted-by LLM

---
v2:
- Make subctrl-vbase required and fix the register offset descriptions

---
 .../bindings/net/hisilicon,hns-mdio.yaml      | 61 +++++++++++++++++++
 .../bindings/net/hisilicon-hns-mdio.txt       | 27 --------
 2 files changed, 61 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/hisilicon,hns-mdio.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt
Documentation/devicetree/bindings/net/hisilicon,hns-mdio.yaml new file +61 -0
new file mode 100644
index 000000000000..6904f9b351f2
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/hisilicon,hns-mdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon HNS MDIO bus controller
+
+maintainers:
+  - Jian Shen <[email protected]>
+  - Jijie Shao <[email protected]>
+
+allOf:
+  - $ref: mdio.yaml#
+
+properties:
+  compatible:
+    enum:
+      - hisilicon,hns-mdio
+      - hisilicon,mdio
+
+  reg:
+    maxItems: 1
+
+  subctrl-vbase:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      - items:
+          - description: syscon phandle
+          - description: MDIO clock enable register offset
+          - description: MDIO reset request register offset
+          - description: MDIO clock state register offset
+          - description: MDIO reset state register offset
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+  - subctrl-vbase
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    bus {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        mdio@803c0000 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            compatible = "hisilicon,hns-mdio";
+            reg = <0x0 0x803c0000 0x0 0x10000>;
+            subctrl-vbase = <&peri_c_subctrl 0x338 0xa38 0x531c 0x5a1c>;
+
+            ethernet-phy@0 {
+                reg = <0>;
+            };
+        };
+    };
Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt deleted +0 -27
deleted file mode 100644
index 4a7ede9657b0..000000000000
@@ -1,27 +0,0 @@
-Hisilicon MDIO bus controller
-
-Properties:
-- compatible: can be one of:
-	"hisilicon,hns-mdio"
-	"hisilicon,mdio"
-  "hisilicon,hns-mdio" is recommended to be used for hip05 and later SOCs,
-  while "hisilicon,mdio" is optional for backwards compatibility only on
-  hip04 Soc.
-- reg: The base address of the MDIO bus controller register bank.
-- #address-cells: Must be <1>.
-- #size-cells: Must be <0>.  MDIO addresses have no size component.
-
-Typically an MDIO bus might have several children.
-
-Example:
-         mdio@803c0000 {
-                   #address-cells = <1>;
-                   #size-cells = <0>;
-                   compatible = "hisilicon,hns-mdio","hisilicon,mdio";
-                   reg = <0x0 0x803c0000 0x0 0x10000>;
-
-                   ethernet-phy@0 {
-                            ...
-                            reg = <0>;
-                   };
-         };
Signature · 1 line
2.53.0
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Wed, 30 Sep 2026 15:19:04 -0500 you wrote:

Convert the hisilicon,hns-mdio binding to DT schema format. Add the missing 'subctrl-vbase' property which is already in use.

Assisted-by LLM

---
v2:
- Make subctrl-vbase required and fix the register offset descriptions

[...]

Here is the summary with links:
- [net-next,v2] dt-bindings: net: Convert hisilicon,hns-mdio to DT schema

    https://git.kernel.org/netdev/net-next/c/c0402d7640a8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html