mediatek,mt6360.yaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/mediatek,mt6360.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MT6360 PMIC from MediaTek Integrated
  7. maintainers:
  8. - Gene Chen <gene_chen@richtek.com>
  9. description: |
  10. MT6360 is a PMIC device with the following sub modules.
  11. It is interfaced to host controller using I2C interface.
  12. This document describes the binding for PMIC device and its sub module.
  13. properties:
  14. compatible:
  15. const: mediatek,mt6360
  16. reg:
  17. maxItems: 1
  18. wakeup-source: true
  19. interrupts:
  20. maxItems: 1
  21. interrupt-names:
  22. const: IRQB
  23. interrupt-controller: true
  24. "#interrupt-cells":
  25. const: 1
  26. description:
  27. The first cell is the IRQ number.
  28. regulators:
  29. $ref: /schemas/regulator/mt6360-regulator.yaml#
  30. charger:
  31. $ref: /schemas/power/supply/mt6360_charger.yaml#
  32. tcpc:
  33. $ref: /schemas/usb/mediatek,mt6360-tcpc.yaml#
  34. led-controller:
  35. $ref: /schemas/leds/leds-mt6360.yaml#
  36. required:
  37. - compatible
  38. - reg
  39. - interrupts
  40. - interrupt-controller
  41. - "#interrupt-cells"
  42. additionalProperties:
  43. type: object
  44. examples:
  45. - |
  46. #include <dt-bindings/interrupt-controller/irq.h>
  47. #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
  48. #include <dt-bindings/leds/common.h>
  49. #include <dt-bindings/usb/pd.h>
  50. i2c {
  51. #address-cells = <1>;
  52. #size-cells = <0>;
  53. pmic@34 {
  54. compatible = "mediatek,mt6360";
  55. reg = <0x34>;
  56. wakeup-source;
  57. interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
  58. interrupt-names = "IRQB";
  59. interrupt-controller;
  60. #interrupt-cells = <1>;
  61. mt6360_charger: charger {
  62. compatible = "mediatek,mt6360-chg";
  63. richtek,vinovp-microvolt = <14500000>;
  64. otg_vbus_regulator: usb-otg-vbus-regulator {
  65. regulator-name = "usb-otg-vbus";
  66. regulator-min-microvolt = <4425000>;
  67. regulator-max-microvolt = <5825000>;
  68. };
  69. };
  70. led-controller {
  71. compatible = "mediatek,mt6360-led";
  72. #address-cells = <1>;
  73. #size-cells = <0>;
  74. multi-led@0 {
  75. reg = <0>;
  76. function = LED_FUNCTION_INDICATOR;
  77. color = <LED_COLOR_ID_RGB>;
  78. led-max-microamp = <24000>;
  79. #address-cells = <1>;
  80. #size-cells = <0>;
  81. led@0 {
  82. reg = <0>;
  83. color = <LED_COLOR_ID_RED>;
  84. };
  85. led@1 {
  86. reg = <1>;
  87. color = <LED_COLOR_ID_GREEN>;
  88. };
  89. led@2 {
  90. reg = <2>;
  91. color = <LED_COLOR_ID_BLUE>;
  92. };
  93. };
  94. led@3 {
  95. reg = <3>;
  96. function = LED_FUNCTION_INDICATOR;
  97. color = <LED_COLOR_ID_WHITE>;
  98. led-max-microamp = <150000>;
  99. };
  100. led@4 {
  101. reg = <4>;
  102. function = LED_FUNCTION_FLASH;
  103. color = <LED_COLOR_ID_WHITE>;
  104. function-enumerator = <1>;
  105. led-max-microamp = <200000>;
  106. flash-max-microamp = <500000>;
  107. flash-max-timeout-us = <1024000>;
  108. };
  109. led@5 {
  110. reg = <5>;
  111. function = LED_FUNCTION_FLASH;
  112. color = <LED_COLOR_ID_WHITE>;
  113. function-enumerator = <2>;
  114. led-max-microamp = <200000>;
  115. flash-max-microamp = <500000>;
  116. flash-max-timeout-us = <1024000>;
  117. };
  118. };
  119. regulators {
  120. compatible = "mediatek,mt6360-regulator";
  121. LDO_VIN3-supply = <&BUCK2>;
  122. buck1 {
  123. regulator-name = "mt6360,buck1";
  124. regulator-min-microvolt = <300000>;
  125. regulator-max-microvolt = <1300000>;
  126. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  127. MT6360_OPMODE_LP
  128. MT6360_OPMODE_ULP>;
  129. };
  130. BUCK2: buck2 {
  131. regulator-name = "mt6360,buck2";
  132. regulator-min-microvolt = <300000>;
  133. regulator-max-microvolt = <1300000>;
  134. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  135. MT6360_OPMODE_LP
  136. MT6360_OPMODE_ULP>;
  137. };
  138. ldo6 {
  139. regulator-name = "mt6360,ldo6";
  140. regulator-min-microvolt = <500000>;
  141. regulator-max-microvolt = <2100000>;
  142. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  143. MT6360_OPMODE_LP>;
  144. };
  145. ldo7 {
  146. regulator-name = "mt6360,ldo7";
  147. regulator-min-microvolt = <500000>;
  148. regulator-max-microvolt = <2100000>;
  149. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  150. MT6360_OPMODE_LP>;
  151. };
  152. ldo1 {
  153. regulator-name = "mt6360,ldo1";
  154. regulator-min-microvolt = <1200000>;
  155. regulator-max-microvolt = <3600000>;
  156. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  157. MT6360_OPMODE_LP>;
  158. };
  159. ldo2 {
  160. regulator-name = "mt6360,ldo2";
  161. regulator-min-microvolt = <1200000>;
  162. regulator-max-microvolt = <3600000>;
  163. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  164. MT6360_OPMODE_LP>;
  165. };
  166. ldo3 {
  167. regulator-name = "mt6360,ldo3";
  168. regulator-min-microvolt = <1200000>;
  169. regulator-max-microvolt = <3600000>;
  170. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  171. MT6360_OPMODE_LP>;
  172. };
  173. ldo5 {
  174. regulator-name = "mt6360,ldo5";
  175. regulator-min-microvolt = <2700000>;
  176. regulator-max-microvolt = <3600000>;
  177. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  178. MT6360_OPMODE_LP>;
  179. };
  180. };
  181. tcpc {
  182. compatible = "mediatek,mt6360-tcpc";
  183. interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
  184. interrupt-names = "PD_IRQB";
  185. connector {
  186. compatible = "usb-c-connector";
  187. label = "USB-C";
  188. data-role = "dual";
  189. power-role = "dual";
  190. try-power-role = "sink";
  191. source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
  192. sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
  193. op-sink-microwatt = <10000000>;
  194. ports {
  195. #address-cells = <1>;
  196. #size-cells = <0>;
  197. port@0 {
  198. reg = <0>;
  199. endpoint {
  200. remote-endpoint = <&usb_hs>;
  201. };
  202. };
  203. port@1 {
  204. reg = <1>;
  205. endpoint {
  206. remote-endpoint = <&usb_ss>;
  207. };
  208. };
  209. port@2 {
  210. reg = <2>;
  211. endpoint {
  212. remote-endpoint = <&dp_aux>;
  213. };
  214. };
  215. };
  216. };
  217. };
  218. };
  219. };