[RFC PATCH v2 1/2] dt-bindings: net: New binding for mctp-i2c-generic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An I2C bus with attached MCTP peripherals can be configured to be
accessible to the host system, using a specified I2C address.

This mctp-i2c-generic binding can attach to existing I2C bus
that supports slave functionality.

For a fictional hardware I2C controller:

    /* for I2C_OWN_SLAVE_ADDRESS */
    #include <dt-bindings/i2c/i2c.h>

    /* root-level i2c controller */
    i2c {
        compatible = "vendor,example-i2c-controller";
        reg = <...>
        #address-cells = <1>;
        #size-cells = <0>;

        mctp@50 {
            compatible = "mctp-i2c";
            reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
        };
    };

Signed-off-by: Matt Johnston <matt@xxxxxxxxxxxxxxxxxxxx>
---
 .../bindings/net/mctp-i2c-generic.yaml        | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/mctp-i2c-generic.yaml

diff --git a/Documentation/devicetree/bindings/net/mctp-i2c-generic.yaml b/Documentation/devicetree/bindings/net/mctp-i2c-generic.yaml
new file mode 100644
index 000000000000..6092f7e8dc07
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mctp-i2c-generic.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/mctp-i2c-generic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic MCTP I2C transport binding
+
+maintainers:
+  - Matt Johnston <matt@xxxxxxxxxxxxxxxxxxxx>
+
+description:
+  The generic MCTP I2C binding defines an MCTP endpoint on an existing I2C
+  adapter. MCTP I2C is specified by DMTF DSP0237.
+
+  An mctp-i2c-generic device must be attached to a hardware bus adapter
+  which supports slave functionality.
+
+properties:
+  compatible:
+    const: mctp-i2c-generic
+
+  reg:
+    maxItems: 1
+    description:
+      7 bit I2C address of the endpoint.
+      I2C_OWN_SLAVE_ADDRESS flag must be set (described in i2c.txt)
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/i2c/i2c.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        mctp@50 {
+            compatible = "mctp-i2c";
+            reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
+        };
+    };
-- 
2.30.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux