[PATCH v2 5/6] dt-bindings: net: Add NCSI bindings
Jiaqing Zhao
jiaqing.zhao at linux.intel.com
Sat Jun 11 02:59:39 AEST 2022
Add devicetree bindings for NCSI VLAN modes. This allows VLAN mode to
be configured in devicetree.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao at linux.intel.com>
---
.../devicetree/bindings/net/ncsi.yaml | 34 +++++++++++++++++++
MAINTAINERS | 2 ++
include/dt-bindings/net/ncsi.h | 15 ++++++++
3 files changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ncsi.yaml
create mode 100644 include/dt-bindings/net/ncsi.h
diff --git a/Documentation/devicetree/bindings/net/ncsi.yaml b/Documentation/devicetree/bindings/net/ncsi.yaml
new file mode 100644
index 000000000000..ec76ae9a77a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ncsi.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ncsi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Network Controller Sideband Interface (NCSI)
+
+maintainers:
+ - Samuel Mendoza-Jonas <sam at mendozajonas.com>
+
+description: |
+ Bindings for the Network Controller Sideband Interface (NCSI) driver
+
+properties:
+ ncsi,vlan-mode:
+ description: VLAN mode used on the NCSI device.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3]
+
+examples:
+ - |
+ #include <dt-bindings/net/ncsi.h>
+
+ mac0: ethernet at 1e660000 {
+ compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
+ reg = <0x1e660000 0x180>;
+ status = "okay";
+
+ use-ncsi;
+ ncsi,vlan-mode = <NCSI_VLAN_MODE_ANY>;
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index f468864fd268..199e4b5bceab 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13534,6 +13534,8 @@ F: drivers/scsi/sun3_scsi_vme.c
NCSI LIBRARY
M: Samuel Mendoza-Jonas <sam at mendozajonas.com>
S: Maintained
+F: Documentation/devicetree/bindings/net/ncsi.yaml
+F: include/dt-bindings/net/ncsi.h
F: net/ncsi/
NCT6775 HARDWARE MONITOR DRIVER
diff --git a/include/dt-bindings/net/ncsi.h b/include/dt-bindings/net/ncsi.h
new file mode 100644
index 000000000000..d45790d97a21
--- /dev/null
+++ b/include/dt-bindings/net/ncsi.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Device Tree constants for NCSI
+ */
+
+#ifndef _DT_BINDINGS_NCSI_H
+#define _DT_BINDINGS_NCSI_H
+
+/* VLAN Modes */
+#define NCSI_VLAN_MODE_DISABLED 0
+#define NCSI_VLAN_MODE_ONLY 1
+#define NCSI_VLAN_MODE_FILTERED 2
+#define NCSI_VLAN_MODE_ANY 3
+
+#endif
--
2.34.1
More information about the openbmc
mailing list