st,stmfx.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/st,stmfx.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: STMicroelectonics Multi-Function eXpander (STMFX)
  7. description: ST Multi-Function eXpander (STMFX) is a slave controller using I2C for
  8. communication with the main MCU. Its main features are GPIO expansion,
  9. main MCU IDD measurement (IDD is the amount of current that flows
  10. through VDD) and resistive touchscreen controller.
  11. maintainers:
  12. - Amelie Delaunay <amelie.delaunay@foss.st.com>
  13. properties:
  14. compatible:
  15. const: st,stmfx-0300
  16. reg:
  17. enum: [ 0x42, 0x43 ]
  18. interrupts:
  19. maxItems: 1
  20. drive-open-drain: true
  21. vdd-supply: true
  22. pinctrl:
  23. type: object
  24. properties:
  25. compatible:
  26. const: st,stmfx-0300-pinctrl
  27. "#gpio-cells":
  28. const: 2
  29. "#interrupt-cells":
  30. const: 2
  31. gpio-controller: true
  32. interrupt-controller: true
  33. gpio-ranges:
  34. description: if all STMFX pins[24:0] are available (no other STMFX function in use),
  35. you should use gpio-ranges = <&stmfx_pinctrl 0 0 24>;
  36. if agpio[3:0] are not available (STMFX Touchscreen function in use),
  37. you should use gpio-ranges = <&stmfx_pinctrl 0 0 16>, <&stmfx_pinctrl 20 20 4>;
  38. if agpio[7:4] are not available (STMFX IDD function in use),
  39. you should use gpio-ranges = <&stmfx_pinctrl 0 0 20>;
  40. maxItems: 1
  41. patternProperties:
  42. "^[a-zA-Z]*-pins$":
  43. type: object
  44. additionalProperties: false
  45. allOf:
  46. - $ref: /schemas/pinctrl/pinmux-node.yaml
  47. properties:
  48. pins: true
  49. bias-disable: true
  50. bias-pull-up: true
  51. bias-pull-pin-default: true
  52. bias-pull-down: true
  53. drive-open-drain: true
  54. drive-push-pull: true
  55. output-high: true
  56. output-low: true
  57. additionalProperties: false
  58. required:
  59. - compatible
  60. - "#gpio-cells"
  61. - "#interrupt-cells"
  62. - gpio-controller
  63. - interrupt-controller
  64. - gpio-ranges
  65. additionalProperties: false
  66. required:
  67. - compatible
  68. - reg
  69. - interrupts
  70. examples:
  71. - |
  72. #include <dt-bindings/interrupt-controller/arm-gic.h>
  73. i2c {
  74. #address-cells = <1>;
  75. #size-cells = <0>;
  76. stmfx@42 {
  77. compatible = "st,stmfx-0300";
  78. reg = <0x42>;
  79. interrupts = <8 IRQ_TYPE_EDGE_RISING>;
  80. interrupt-parent = <&gpioi>;
  81. vdd-supply = <&v3v3>;
  82. stmfx_pinctrl: pinctrl {
  83. compatible = "st,stmfx-0300-pinctrl";
  84. #gpio-cells = <2>;
  85. #interrupt-cells = <2>;
  86. gpio-controller;
  87. interrupt-controller;
  88. gpio-ranges = <&stmfx_pinctrl 0 0 24>;
  89. joystick_pins: joystick-pins {
  90. pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
  91. drive-push-pull;
  92. bias-pull-up;
  93. };
  94. };
  95. };
  96. };
  97. ...