devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
To: Samuel Mendoza-Jonas <sam@mendozajonas.com>,
	"David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Cc: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Subject: [PATCH v2 5/6] dt-bindings: net: Add NCSI bindings
Date: Sat, 11 Jun 2022 00:59:39 +0800	[thread overview]
Message-ID: <20220610165940.2326777-6-jiaqing.zhao@linux.intel.com> (raw)
In-Reply-To: <20220610165940.2326777-1-jiaqing.zhao@linux.intel.com>

Add devicetree bindings for NCSI VLAN modes. This allows VLAN mode to
be configured in devicetree.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@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@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@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@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


  parent reply	other threads:[~2022-06-10 17:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 16:59 [PATCH v2 0/6] Configurable VLAN mode for NCSI driver Jiaqing Zhao
2022-06-10 16:59 ` [PATCH v2 1/6] net/ncsi: Fix value of NCSI_CAP_VLAN_ANY Jiaqing Zhao
2022-06-10 16:59 ` [PATCH v2 2/6] net/ncsi: Rename NCSI_CAP_VLAN_NO to NCSI_CAP_VLAN_FILTERED Jiaqing Zhao
2022-06-10 16:59 ` [PATCH v2 3/6] net/ncsi: Enable VLAN filtering when callback is registered Jiaqing Zhao
2022-06-10 16:59 ` [PATCH v2 4/6] ftgmac100: Remove enable NCSI VLAN filtering Jiaqing Zhao
2022-06-10 16:59 ` Jiaqing Zhao [this message]
2022-06-10 23:19   ` [PATCH v2 5/6] dt-bindings: net: Add NCSI bindings Rob Herring
2022-06-11  3:09     ` Jiaqing Zhao
2022-06-13 15:28       ` Rob Herring
2022-06-14  2:33         ` Jiaqing Zhao
2022-06-10 16:59 ` [PATCH v2 6/6] net/ncsi: Support VLAN mode configuration Jiaqing Zhao
2022-06-10 20:09 ` [PATCH v2 0/6] Configurable VLAN mode for NCSI driver Jakub Kicinski
2022-06-11  3:25   ` Jiaqing Zhao
2022-06-11  4:45     ` Jakub Kicinski
2022-06-11  5:18       ` Jiaqing Zhao
2022-06-11  5:44         ` Jakub Kicinski
2022-06-11  9:58           ` Jiaqing Zhao

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=20220610165940.2326777-6-jiaqing.zhao@linux.intel.com \
    --to=jiaqing.zhao@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sam@mendozajonas.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;
as well as URLs for NNTP newsgroup(s).