mctp-i2c-controller.yaml 2.1 KB

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