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>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2] dt-bindings: net: Convert hisilicon,hns-nic to DT schema
Date: Wed, 30 Sep 2026 15:18:49 -0500 [thread overview]
Message-ID: <20260930201851.71082-1-robh@kernel.org> (raw)
Convert the hisilicon,hns-nic binding to DT schema format. It's a
straight forward conversion.
Assisted-by: LLM
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
v2:
- Deprecate port-id property
---
.../bindings/net/hisilicon,hns-nic.yaml | 108 ++++++++++++++++++
.../bindings/net/hisilicon-hns-nic.txt | 76 ------------
2 files changed, 108 insertions(+), 76 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/hisilicon,hns-nic.yaml
delete mode 100644 Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt
diff --git a/Documentation/devicetree/bindings/net/hisilicon,hns-nic.yaml b/Documentation/devicetree/bindings/net/hisilicon,hns-nic.yaml
new file mode 100644
index 000000000000..799b3ef1e1eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon,hns-nic.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/hisilicon,hns-nic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Network Subsystem NIC controller
+
+maintainers:
+ - Jian Shen <shenjian15@huawei.com>
+ - Jijie Shao <shaojijie@huawei.com>
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - hisilicon,hns-nic-v1
+ - hisilicon,hns-nic-v2
+
+ ae-handle:
+ description:
+ accelerator engine handle for hns, specifies a reference to the
+ associating hardware driver node.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ port-id:
+ description: |
+ is the index of port provided by DSAF (the accelerator). DSAF can connect to 8 PHYs.
+ Port 0 to 1 are both used for administration purpose.
+ They are called debug ports.
+
+ The remaining 6 PHYs are taken according to the mode of DSAF.
+
+ In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU.
+ The port-id can be 2 to 7. Here is the diagram:
+ +-----+---------------+
+ | CPU |
+ +-+-+-+---+-+-+-+-+-+-+
+ | | | | | | | |
+ debug service
+ port port
+ (0,1) (2-7)
+
+ In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a LAN Switch,
+ while the CPU side assume itself have one single NIC connect to this switch.
+ In this case, the port-id will be 2 only.
+ +-----+---------------+
+ | CPU |
+ +-+-+-+---+-+-+-+-+-+-+
+ | | service| port(2)
+ debug +------------+
+ port | switch |
+ (0,1) +-+-+-+-+-+-++
+ | | | | | |
+ external port
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 7
+ deprecated: true
+
+ port-idx-in-ae:
+ description: |
+ is the index of port provided by AE.
+ In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports to the CPU.
+ The port-idx-in-ae can be 0 to 5. Here is the diagram:
+ +-----+---------------+
+ | CPU |
+ +-+-+-+---+-+-+-+-+-+-+
+ | | | | | | | |
+ debug debug service
+ port port port
+ (0) (0) (0-5)
+
+ In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical ports connected to
+ a LAN Switch,
+ while the CPU side assume itself have one single NIC connected to this switch.
+ In this case, the port-idx-in-ae will be 0 only.
+ +-----+-----+------+------+
+ | CPU |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | | service| port(0)
+ debug debug +------------+
+ port port | switch |
+ (0) (0) +-+-+-+-+-+-++
+ | | | | | |
+ external port
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 5
+
+ dma-coherent: true
+
+required:
+ - compatible
+ - ae-handle
+ - port-idx-in-ae
+ - local-mac-address
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ ethernet {
+ compatible = "hisilicon,hns-nic-v1";
+ ae-handle = <&dsaf0>;
+ port-idx-in-ae = <0>;
+ local-mac-address = [a2 14 e4 4b 56 76];
+ };
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt
deleted file mode 100644
index f0421ee3c714..000000000000
--- a/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-Hisilicon Network Subsystem NIC controller
-
-Required properties:
-- compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
- "hisilicon,hns-nic-v1" is for hip05.
- "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
-- ae-handle: accelerator engine handle for hns,
- specifies a reference to the associating hardware driver node.
- see Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
-- port-id: is the index of port provided by DSAF (the accelerator). DSAF can
- connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
- are called debug ports.
-
- The remaining 6 PHYs are taken according to the mode of DSAF.
-
- In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
- port-id can be 2 to 7. Here is the diagram:
- +-----+---------------+
- | CPU |
- +-+-+-+---+-+-+-+-+-+-+
- | | | | | | | |
- debug service
- port port
- (0,1) (2-7)
-
- In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
- LAN Switch while the CPU side assume itself have one single NIC connect to
- this switch. In this case, the port-id will be 2 only.
- +-----+---------------+
- | CPU |
- +-+-+-+---+-+-+-+-+-+-+
- | | service| port(2)
- debug +------------+
- port | switch |
- (0,1) +-+-+-+-+-+-++
- | | | | | |
- external port
-
- This attribute is remained for compatible purpose. It is not recommended to
- use it in new code.
-
-- port-idx-in-ae: is the index of port provided by AE.
- In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
- to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
- +-----+---------------+
- | CPU |
- +-+-+-+---+-+-+-+-+-+-+
- | | | | | | | |
- debug debug service
- port port port
- (0) (0) (0-5)
-
- In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
- ports connected to a LAN Switch while the CPU side assume itself have one
- single NIC connected to this switch. In this case, the port-idx-in-ae
- will be 0 only.
- +-----+-----+------+------+
- | CPU |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+
- | | service| port(0)
- debug debug +------------+
- port port | switch |
- (0) (0) +-+-+-+-+-+-++
- | | | | | |
- external port
-
-- local-mac-address: mac addr of the ethernet interface
-
-Example:
-
- ethernet@0{
- compatible = "hisilicon,hns-nic-v1";
- ae-handle = <&dsaf0>;
- port-idx-in-ae = <0>;
- local-mac-address = [a2 14 e4 4b 56 76];
- };
--
2.53.0
next reply other threads:[~2026-09-30 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 20:18 Rob Herring (Arm) [this message]
2026-10-05 22:10 ` [PATCH net-next v2] dt-bindings: net: Convert hisilicon,hns-nic to DT schema patchwork-bot+netdevbpf
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=20260930201851.71082-1-robh@kernel.org \
--to=robh@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.