16881e493SMatt Johnston# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26881e493SMatt Johnston%YAML 1.2
36881e493SMatt Johnston---
46881e493SMatt Johnston$id: http://devicetree.org/schemas/net/mctp-i2c-controller.yaml#
56881e493SMatt Johnston$schema: http://devicetree.org/meta-schemas/core.yaml#
66881e493SMatt Johnston
7*84e85359SKrzysztof Kozlowskititle: MCTP I2C transport
86881e493SMatt Johnston
96881e493SMatt Johnstonmaintainers:
106881e493SMatt Johnston  - Matt Johnston <matt@codeconstruct.com.au>
116881e493SMatt Johnston
126881e493SMatt Johnstondescription: |
136881e493SMatt Johnston  An mctp-i2c-controller defines a local MCTP endpoint on an I2C controller.
146881e493SMatt Johnston  MCTP I2C is specified by DMTF DSP0237.
156881e493SMatt Johnston
166881e493SMatt Johnston  An mctp-i2c-controller must be attached to an I2C adapter which supports
176881e493SMatt Johnston  slave functionality. I2C busses (either directly or as subordinate mux
186881e493SMatt Johnston  busses) are attached to the mctp-i2c-controller with a 'mctp-controller'
196881e493SMatt Johnston  property on each used bus. Each mctp-controller I2C bus will be presented
206881e493SMatt Johnston  to the host system as a separate MCTP I2C instance.
216881e493SMatt Johnston
226881e493SMatt Johnstonproperties:
236881e493SMatt Johnston  compatible:
246881e493SMatt Johnston    const: mctp-i2c-controller
256881e493SMatt Johnston
266881e493SMatt Johnston  reg:
276881e493SMatt Johnston    minimum: 0x40000000
286881e493SMatt Johnston    maximum: 0x4000007f
296881e493SMatt Johnston    description: |
306881e493SMatt Johnston      7 bit I2C address of the local endpoint.
316881e493SMatt Johnston      I2C_OWN_SLAVE_ADDRESS (1<<30) flag must be set.
326881e493SMatt Johnston
336881e493SMatt JohnstonadditionalProperties: false
346881e493SMatt Johnston
356881e493SMatt Johnstonrequired:
366881e493SMatt Johnston  - compatible
376881e493SMatt Johnston  - reg
386881e493SMatt Johnston
396881e493SMatt Johnstonexamples:
406881e493SMatt Johnston  - |
416881e493SMatt Johnston    // Basic case of a single I2C bus
426881e493SMatt Johnston    #include <dt-bindings/i2c/i2c.h>
436881e493SMatt Johnston
446881e493SMatt Johnston    i2c {
456881e493SMatt Johnston      #address-cells = <1>;
466881e493SMatt Johnston      #size-cells = <0>;
476881e493SMatt Johnston      mctp-controller;
486881e493SMatt Johnston
496881e493SMatt Johnston      mctp@30 {
506881e493SMatt Johnston        compatible = "mctp-i2c-controller";
516881e493SMatt Johnston        reg = <(0x30 | I2C_OWN_SLAVE_ADDRESS)>;
526881e493SMatt Johnston      };
536881e493SMatt Johnston    };
546881e493SMatt Johnston
556881e493SMatt Johnston  - |
566881e493SMatt Johnston    // Mux topology with multiple MCTP-handling busses under
576881e493SMatt Johnston    // a single mctp-i2c-controller.
586881e493SMatt Johnston    // i2c1 and i2c6 can have MCTP devices, i2c5 does not.
596881e493SMatt Johnston    #include <dt-bindings/i2c/i2c.h>
606881e493SMatt Johnston
616881e493SMatt Johnston    i2c1: i2c {
626881e493SMatt Johnston      #address-cells = <1>;
636881e493SMatt Johnston      #size-cells = <0>;
646881e493SMatt Johnston      mctp-controller;
656881e493SMatt Johnston
666881e493SMatt Johnston      mctp@50 {
676881e493SMatt Johnston        compatible = "mctp-i2c-controller";
686881e493SMatt Johnston        reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
696881e493SMatt Johnston      };
706881e493SMatt Johnston    };
716881e493SMatt Johnston
726881e493SMatt Johnston    i2c-mux {
736881e493SMatt Johnston      #address-cells = <1>;
746881e493SMatt Johnston      #size-cells = <0>;
756881e493SMatt Johnston      i2c-parent = <&i2c1>;
766881e493SMatt Johnston
776881e493SMatt Johnston      i2c5: i2c@0 {
786881e493SMatt Johnston        #address-cells = <1>;
796881e493SMatt Johnston        #size-cells = <0>;
806881e493SMatt Johnston        reg = <0>;
816881e493SMatt Johnston        eeprom@33 {
826881e493SMatt Johnston          reg = <0x33>;
836881e493SMatt Johnston        };
846881e493SMatt Johnston      };
856881e493SMatt Johnston
866881e493SMatt Johnston      i2c6: i2c@1 {
876881e493SMatt Johnston        #address-cells = <1>;
886881e493SMatt Johnston        #size-cells = <0>;
896881e493SMatt Johnston        reg = <1>;
906881e493SMatt Johnston        mctp-controller;
916881e493SMatt Johnston      };
926881e493SMatt Johnston    };
93