901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. From aa4a0ccc41997f2da172165c92803abace43bd1c Mon Sep 17 00:00:00 2001
  2. From: Luka Kovacic <luka.kovacic () sartura ! hr>
  3. Date: Tue, 24 Aug 2021 12:44:32 +0000
  4. Subject: [PATCH 1/7] dt-bindings: Add IEI vendor prefix and IEI WT61P803
  5. PUZZLE driver bindings
  6. Add the IEI WT61P803 PUZZLE Device Tree bindings for MFD, HWMON and LED
  7. drivers. A new vendor prefix is also added accordingly for
  8. IEI Integration Corp.
  9. Signed-off-by: Luka Kovacic <[email protected]>
  10. Signed-off-by: Pavo Banicevic <[email protected]>
  11. Cc: Luka Perkov <[email protected]>
  12. Cc: Robert Marko <[email protected]>
  13. ---
  14. .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 53 ++++++++++++
  15. .../leds/iei,wt61p803-puzzle-leds.yaml | 39 +++++++++
  16. .../bindings/mfd/iei,wt61p803-puzzle.yaml | 82 +++++++++++++++++++
  17. .../devicetree/bindings/vendor-prefixes.yaml | 2 +
  18. 4 files changed, 176 insertions(+)
  19. create mode 100644 Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml
  20. create mode 100644 Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml
  21. create mode 100644 Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml
  22. --- /dev/null
  23. +++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml
  24. @@ -0,0 +1,53 @@
  25. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  26. +%YAML 1.2
  27. +---
  28. +$id: http://devicetree.org/schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml#
  29. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  30. +
  31. +title: IEI WT61P803 PUZZLE MCU HWMON module from IEI Integration Corp.
  32. +
  33. +maintainers:
  34. + - Luka Kovacic <[email protected]>
  35. +
  36. +description: |
  37. + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details
  38. + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml.
  39. +
  40. + The HWMON module is a sub-node of the MCU node in the Device Tree.
  41. +
  42. +properties:
  43. + compatible:
  44. + const: iei,wt61p803-puzzle-hwmon
  45. +
  46. + "#address-cells":
  47. + const: 1
  48. +
  49. + "#size-cells":
  50. + const: 0
  51. +
  52. +patternProperties:
  53. + "^fan-group@[0-1]$":
  54. + type: object
  55. + properties:
  56. + reg:
  57. + minimum: 0
  58. + maximum: 1
  59. + description:
  60. + Fan group ID
  61. +
  62. + cooling-levels:
  63. + minItems: 1
  64. + maxItems: 255
  65. + description:
  66. + Cooling levels for the fans (PWM value mapping)
  67. + description: |
  68. + Properties for each fan group.
  69. + required:
  70. + - reg
  71. +
  72. +required:
  73. + - compatible
  74. + - "#address-cells"
  75. + - "#size-cells"
  76. +
  77. +additionalProperties: false
  78. --- /dev/null
  79. +++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml
  80. @@ -0,0 +1,39 @@
  81. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  82. +%YAML 1.2
  83. +---
  84. +$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml#
  85. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  86. +
  87. +title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp.
  88. +
  89. +maintainers:
  90. + - Luka Kovacic <[email protected]>
  91. +
  92. +description: |
  93. + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details
  94. + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml.
  95. +
  96. + The LED module is a sub-node of the MCU node in the Device Tree.
  97. +
  98. +properties:
  99. + compatible:
  100. + const: iei,wt61p803-puzzle-leds
  101. +
  102. + "#address-cells":
  103. + const: 1
  104. +
  105. + "#size-cells":
  106. + const: 0
  107. +
  108. + led@0:
  109. + type: object
  110. + $ref: common.yaml
  111. + description: |
  112. + Properties for a single LED.
  113. +
  114. +required:
  115. + - compatible
  116. + - "#address-cells"
  117. + - "#size-cells"
  118. +
  119. +additionalProperties: false
  120. --- /dev/null
  121. +++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml
  122. @@ -0,0 +1,82 @@
  123. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  124. +%YAML 1.2
  125. +---
  126. +$id: http://devicetree.org/schemas/mfd/iei,wt61p803-puzzle.yaml#
  127. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  128. +
  129. +title: IEI WT61P803 PUZZLE MCU from IEI Integration Corp.
  130. +
  131. +maintainers:
  132. + - Luka Kovacic <[email protected]>
  133. +
  134. +description: |
  135. + IEI WT61P803 PUZZLE MCU is embedded in some IEI Puzzle series boards.
  136. + It's used for controlling system power states, fans, LEDs and temperature
  137. + sensors.
  138. +
  139. + For Device Tree bindings of other sub-modules (HWMON, LEDs) refer to the
  140. + binding documents under the respective subsystem directories.
  141. +
  142. +properties:
  143. + compatible:
  144. + const: iei,wt61p803-puzzle
  145. +
  146. + current-speed:
  147. + description:
  148. + Serial bus speed in bps
  149. + maxItems: 1
  150. +
  151. + enable-beep: true
  152. +
  153. + hwmon:
  154. + $ref: /schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml
  155. +
  156. + leds:
  157. + $ref: /schemas/leds/iei,wt61p803-puzzle-leds.yaml
  158. +
  159. +required:
  160. + - compatible
  161. + - current-speed
  162. +
  163. +additionalProperties: false
  164. +
  165. +examples:
  166. + - |
  167. + #include <dt-bindings/leds/common.h>
  168. + serial {
  169. + mcu {
  170. + compatible = "iei,wt61p803-puzzle";
  171. + current-speed = <115200>;
  172. + enable-beep;
  173. +
  174. + leds {
  175. + compatible = "iei,wt61p803-puzzle-leds";
  176. + #address-cells = <1>;
  177. + #size-cells = <0>;
  178. +
  179. + led@0 {
  180. + reg = <0>;
  181. + function = LED_FUNCTION_POWER;
  182. + color = <LED_COLOR_ID_BLUE>;
  183. + };
  184. + };
  185. +
  186. + hwmon {
  187. + compatible = "iei,wt61p803-puzzle-hwmon";
  188. + #address-cells = <1>;
  189. + #size-cells = <0>;
  190. +
  191. + fan-group@0 {
  192. + #cooling-cells = <2>;
  193. + reg = <0x00>;
  194. + cooling-levels = <64 102 170 230 250>;
  195. + };
  196. +
  197. + fan-group@1 {
  198. + #cooling-cells = <2>;
  199. + reg = <0x01>;
  200. + cooling-levels = <64 102 170 230 250>;
  201. + };
  202. + };
  203. + };
  204. + };
  205. --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
  206. +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
  207. @@ -579,6 +579,8 @@ patternProperties:
  208. description: IC Plus Corp.
  209. "^idt,.*":
  210. description: Integrated Device Technologies, Inc.
  211. + "^iei,.*":
  212. + description: IEI Integration Corp.
  213. "^ifi,.*":
  214. description: Ingenieurburo Fur Ic-Technologie (I/F/I)
  215. "^ilitek,.*":