xref: /freebsd-src/sys/contrib/device-tree/Bindings/net/mctp-i2c-controller.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/net/mctp-i2c-controller.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: MCTP I2C transport
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Matt Johnston <matt@codeconstruct.com.au>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotdescription: |
13c9ccf3a3SEmmanuel Vadot  An mctp-i2c-controller defines a local MCTP endpoint on an I2C controller.
14c9ccf3a3SEmmanuel Vadot  MCTP I2C is specified by DMTF DSP0237.
15c9ccf3a3SEmmanuel Vadot
16c9ccf3a3SEmmanuel Vadot  An mctp-i2c-controller must be attached to an I2C adapter which supports
17c9ccf3a3SEmmanuel Vadot  slave functionality. I2C busses (either directly or as subordinate mux
18c9ccf3a3SEmmanuel Vadot  busses) are attached to the mctp-i2c-controller with a 'mctp-controller'
19c9ccf3a3SEmmanuel Vadot  property on each used bus. Each mctp-controller I2C bus will be presented
20c9ccf3a3SEmmanuel Vadot  to the host system as a separate MCTP I2C instance.
21c9ccf3a3SEmmanuel Vadot
22c9ccf3a3SEmmanuel Vadotproperties:
23c9ccf3a3SEmmanuel Vadot  compatible:
24c9ccf3a3SEmmanuel Vadot    const: mctp-i2c-controller
25c9ccf3a3SEmmanuel Vadot
26c9ccf3a3SEmmanuel Vadot  reg:
27c9ccf3a3SEmmanuel Vadot    minimum: 0x40000000
28c9ccf3a3SEmmanuel Vadot    maximum: 0x4000007f
29c9ccf3a3SEmmanuel Vadot    description: |
30c9ccf3a3SEmmanuel Vadot      7 bit I2C address of the local endpoint.
31c9ccf3a3SEmmanuel Vadot      I2C_OWN_SLAVE_ADDRESS (1<<30) flag must be set.
32c9ccf3a3SEmmanuel Vadot
33c9ccf3a3SEmmanuel VadotadditionalProperties: false
34c9ccf3a3SEmmanuel Vadot
35c9ccf3a3SEmmanuel Vadotrequired:
36c9ccf3a3SEmmanuel Vadot  - compatible
37c9ccf3a3SEmmanuel Vadot  - reg
38c9ccf3a3SEmmanuel Vadot
39c9ccf3a3SEmmanuel Vadotexamples:
40c9ccf3a3SEmmanuel Vadot  - |
41c9ccf3a3SEmmanuel Vadot    // Basic case of a single I2C bus
42c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/i2c/i2c.h>
43c9ccf3a3SEmmanuel Vadot
44c9ccf3a3SEmmanuel Vadot    i2c {
45c9ccf3a3SEmmanuel Vadot      #address-cells = <1>;
46c9ccf3a3SEmmanuel Vadot      #size-cells = <0>;
47c9ccf3a3SEmmanuel Vadot      mctp-controller;
48c9ccf3a3SEmmanuel Vadot
49c9ccf3a3SEmmanuel Vadot      mctp@30 {
50c9ccf3a3SEmmanuel Vadot        compatible = "mctp-i2c-controller";
51c9ccf3a3SEmmanuel Vadot        reg = <(0x30 | I2C_OWN_SLAVE_ADDRESS)>;
52c9ccf3a3SEmmanuel Vadot      };
53c9ccf3a3SEmmanuel Vadot    };
54c9ccf3a3SEmmanuel Vadot
55c9ccf3a3SEmmanuel Vadot  - |
56c9ccf3a3SEmmanuel Vadot    // Mux topology with multiple MCTP-handling busses under
57c9ccf3a3SEmmanuel Vadot    // a single mctp-i2c-controller.
58c9ccf3a3SEmmanuel Vadot    // i2c1 and i2c6 can have MCTP devices, i2c5 does not.
59c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/i2c/i2c.h>
60c9ccf3a3SEmmanuel Vadot
61c9ccf3a3SEmmanuel Vadot    i2c1: i2c {
62c9ccf3a3SEmmanuel Vadot      #address-cells = <1>;
63c9ccf3a3SEmmanuel Vadot      #size-cells = <0>;
64c9ccf3a3SEmmanuel Vadot      mctp-controller;
65c9ccf3a3SEmmanuel Vadot
66c9ccf3a3SEmmanuel Vadot      mctp@50 {
67c9ccf3a3SEmmanuel Vadot        compatible = "mctp-i2c-controller";
68c9ccf3a3SEmmanuel Vadot        reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
69c9ccf3a3SEmmanuel Vadot      };
70c9ccf3a3SEmmanuel Vadot    };
71c9ccf3a3SEmmanuel Vadot
72c9ccf3a3SEmmanuel Vadot    i2c-mux {
73c9ccf3a3SEmmanuel Vadot      #address-cells = <1>;
74c9ccf3a3SEmmanuel Vadot      #size-cells = <0>;
75c9ccf3a3SEmmanuel Vadot      i2c-parent = <&i2c1>;
76c9ccf3a3SEmmanuel Vadot
77c9ccf3a3SEmmanuel Vadot      i2c5: i2c@0 {
78c9ccf3a3SEmmanuel Vadot        #address-cells = <1>;
79c9ccf3a3SEmmanuel Vadot        #size-cells = <0>;
80c9ccf3a3SEmmanuel Vadot        reg = <0>;
81c9ccf3a3SEmmanuel Vadot        eeprom@33 {
82c9ccf3a3SEmmanuel Vadot          reg = <0x33>;
83c9ccf3a3SEmmanuel Vadot        };
84c9ccf3a3SEmmanuel Vadot      };
85c9ccf3a3SEmmanuel Vadot
86c9ccf3a3SEmmanuel Vadot      i2c6: i2c@1 {
87c9ccf3a3SEmmanuel Vadot        #address-cells = <1>;
88c9ccf3a3SEmmanuel Vadot        #size-cells = <0>;
89c9ccf3a3SEmmanuel Vadot        reg = <1>;
90c9ccf3a3SEmmanuel Vadot        mctp-controller;
91c9ccf3a3SEmmanuel Vadot      };
92c9ccf3a3SEmmanuel Vadot    };
93