ti,twl.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/ti,twl.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Texas Instruments TWL family
  7. maintainers:
  8. - Andreas Kemnade <andreas@kemnade.info>
  9. description: |
  10. The TWLs are Integrated Power Management Chips.
  11. Some versions might contain much more analog functions like
  12. USB transceiver or Audio amplifier.
  13. These chips are connected to an I2C bus.
  14. allOf:
  15. - if:
  16. properties:
  17. compatible:
  18. contains:
  19. const: ti,twl4030
  20. then:
  21. patternProperties:
  22. "^regulator-":
  23. properties:
  24. compatible:
  25. enum:
  26. - ti,twl4030-vaux1
  27. - ti,twl4030-vaux2
  28. - ti,twl4030-vaux3
  29. - ti,twl4030-vaux4
  30. - ti,twl4030-vmmc1
  31. - ti,twl4030-vmmc2
  32. - ti,twl4030-vpll1
  33. - ti,twl4030-vpll2
  34. - ti,twl4030-vsim
  35. - ti,twl4030-vdac
  36. - ti,twl4030-vintana2
  37. - ti,twl4030-vio
  38. - ti,twl4030-vdd1
  39. - ti,twl4030-vdd2
  40. - ti,twl4030-vintana1
  41. - ti,twl4030-vintdig
  42. - ti,twl4030-vusb1v5
  43. - ti,twl4030-vusb1v8
  44. - ti,twl4030-vusb3v1
  45. ti,retain-on-reset: false
  46. properties:
  47. charger:
  48. $ref: /schemas/power/supply/twl4030-charger.yaml
  49. unevaluatedProperties: false
  50. gpadc: false
  51. pwrbutton:
  52. properties:
  53. compatible:
  54. const: ti,twl4030-pwrbutton
  55. interrupts:
  56. items:
  57. - items:
  58. const: 8
  59. usb-comparator: false
  60. - if:
  61. properties:
  62. compatible:
  63. contains:
  64. const: ti,twl6030
  65. then:
  66. patternProperties:
  67. "^regulator-":
  68. properties:
  69. compatible:
  70. enum:
  71. - ti,twl6030-vaux1
  72. - ti,twl6030-vaux2
  73. - ti,twl6030-vaux3
  74. - ti,twl6030-vmmc
  75. - ti,twl6030-vpp
  76. - ti,twl6030-vusim
  77. - ti,twl6030-vana
  78. - ti,twl6030-vcxio
  79. - ti,twl6030-vdac
  80. - ti,twl6030-vusb
  81. - ti,twl6030-v1v8
  82. - ti,twl6030-v2v1
  83. - ti,twl6030-vdd1
  84. - ti,twl6030-vdd2
  85. - ti,twl6030-vdd3
  86. regulator-initial-mode: false
  87. properties:
  88. charger:
  89. $ref: /schemas/power/supply/ti,twl6030-charger.yaml
  90. unevaluatedProperties: false
  91. gpadc:
  92. properties:
  93. compatible:
  94. const: ti,twl6030-gpadc
  95. pwrbutton:
  96. properties:
  97. compatible:
  98. const: ti,twl6030-pwrbutton
  99. interrupts:
  100. items:
  101. - items:
  102. const: 0
  103. madc: false
  104. watchdog: false
  105. audio: false
  106. keypad: false
  107. twl4030-usb: false
  108. gpio: false
  109. power: false
  110. - if:
  111. properties:
  112. compatible:
  113. contains:
  114. const: ti,twl6032
  115. then:
  116. patternProperties:
  117. "^regulator-":
  118. properties:
  119. compatible:
  120. enum:
  121. - ti,twl6032-ldo1
  122. - ti,twl6032-ldo2
  123. - ti,twl6032-ldo3
  124. - ti,twl6032-ldo4
  125. - ti,twl6032-ldo5
  126. - ti,twl6032-ldo6
  127. - ti,twl6032-ldo7
  128. - ti,twl6032-ldoln
  129. - ti,twl6032-ldousb
  130. - ti,twl6032-smps3
  131. - ti,twl6032-smps4
  132. - ti,twl6032-vio
  133. regulator-initial-mode: false
  134. properties:
  135. charger:
  136. $ref: /schemas/power/supply/ti,twl6030-charger.yaml
  137. unevaluatedProperties: false
  138. gpadc:
  139. properties:
  140. compatible:
  141. const: ti,twl6032-gpadc
  142. pwrbutton:
  143. properties:
  144. compatible:
  145. const: ti,twl6030-pwrbutton
  146. interrupts:
  147. items:
  148. - items:
  149. const: 0
  150. madc: false
  151. watchdog: false
  152. audio: false
  153. keypad: false
  154. twl4030-usb: false
  155. gpio: false
  156. power: false
  157. properties:
  158. compatible:
  159. description: >
  160. TWL4030 for integrated power-management/audio CODEC device used in
  161. OMAP3 based boards.
  162. TWL6030/32 for integrated power-management used in OMAP4 based boards
  163. enum:
  164. - ti,twl4030
  165. - ti,twl6030
  166. - ti,twl6032
  167. reg:
  168. maxItems: 1
  169. interrupts:
  170. maxItems: 1
  171. interrupt-controller: true
  172. system-power-controller: true
  173. "#interrupt-cells":
  174. const: 1
  175. "#clock-cells":
  176. const: 1
  177. clocks:
  178. maxItems: 1
  179. clock-names:
  180. const: fck
  181. charger:
  182. type: object
  183. properties:
  184. compatible: true
  185. required:
  186. - compatible
  187. rtc:
  188. type: object
  189. additionalProperties: false
  190. properties:
  191. compatible:
  192. const: ti,twl4030-rtc
  193. interrupts:
  194. maxItems: 1
  195. madc:
  196. type: object
  197. $ref: /schemas/iio/adc/ti,twl4030-madc.yaml
  198. unevaluatedProperties: false
  199. pwrbutton:
  200. type: object
  201. additionalProperties: false
  202. properties:
  203. compatible:
  204. enum:
  205. - ti,twl4030-pwrbutton
  206. - ti,twl6030-pwrbutton
  207. interrupts:
  208. maxItems: 1
  209. watchdog:
  210. type: object
  211. additionalProperties: false
  212. properties:
  213. compatible:
  214. const: ti,twl4030-wdt
  215. audio:
  216. type: object
  217. additionalProperties: true
  218. properties:
  219. compatible:
  220. const: ti,twl4030-audio
  221. required:
  222. - compatible
  223. keypad:
  224. type: object
  225. additionalProperties: true
  226. properties:
  227. compatible:
  228. const: ti,twl4030-keypad
  229. required:
  230. - compatible
  231. twl4030-usb:
  232. type: object
  233. additionalProperties: true
  234. properties:
  235. compatible:
  236. const: ti,twl4030-usb
  237. required:
  238. - compatible
  239. gpio:
  240. type: object
  241. additionalProperties: true
  242. properties:
  243. compatible:
  244. const: ti,twl4030-gpio
  245. required:
  246. - compatible
  247. power:
  248. type: object
  249. additionalProperties: false
  250. description: >
  251. The power management module inside the TWL4030 provides several
  252. facilities to control the power resources, including power scripts.
  253. For now, the binding only supports the complete shutdown of the
  254. system after poweroff.
  255. Board-specific compatible strings may be used for platform-specific
  256. power configurations.
  257. A board-specific compatible string (e.g., ti,twl4030-power-omap3-evm)
  258. may be paired with a generic fallback (generally for power saving mode).
  259. properties:
  260. compatible:
  261. oneOf:
  262. # Case 1: A single compatible string is provided.
  263. - enum:
  264. - ti,twl4030-power
  265. - ti,twl4030-power-reset
  266. - ti,twl4030-power-idle
  267. - ti,twl4030-power-idle-osc-off
  268. - ti,twl4030-power-omap3-sdp
  269. - ti,twl4030-power-omap3-ldp
  270. - ti,twl4030-power-omap3-evm
  271. # Case 2: The specific, valid fallback for 'idle-osc-off'.
  272. - items:
  273. - const: ti,twl4030-power-idle-osc-off
  274. - const: ti,twl4030-power-idle
  275. # Case 3: The specific, valid fallback for 'omap3-evm'.
  276. - items:
  277. - const: ti,twl4030-power-omap3-evm
  278. - const: ti,twl4030-power-idle
  279. ti,system-power-controller:
  280. type: boolean
  281. deprecated: true
  282. description: >
  283. DEPRECATED. The standard 'system-power-controller'
  284. property on the parent node should be used instead.
  285. ti,use_poweroff:
  286. type: boolean
  287. deprecated: true
  288. description: DEPRECATED, to be removed.
  289. required:
  290. - compatible
  291. gpadc:
  292. type: object
  293. $ref: /schemas/iio/adc/ti,twl6030-gpadc.yaml
  294. unevaluatedProperties: false
  295. properties:
  296. compatible: true
  297. usb-comparator:
  298. type: object
  299. additionalProperties: true
  300. properties:
  301. compatible:
  302. const: ti,twl6030-usb
  303. required:
  304. - compatible
  305. pwm:
  306. type: object
  307. $ref: /schemas/pwm/pwm.yaml#
  308. unevaluatedProperties: false
  309. description:
  310. PWM controllers (PWM1 and PWM2 on TWL4030, PWM0 and PWM1 on TWL6030/32).
  311. properties:
  312. compatible:
  313. enum:
  314. - ti,twl4030-pwm
  315. - ti,twl6030-pwm
  316. '#pwm-cells':
  317. const: 2
  318. required:
  319. - compatible
  320. - '#pwm-cells'
  321. pwmled:
  322. type: object
  323. $ref: /schemas/pwm/pwm.yaml#
  324. unevaluatedProperties: false
  325. description: >
  326. PWM controllers connected to LED terminals (PWMA and PWMB on TWL4030.
  327. LED PWM on TWL6030/32, mainly used as charging indicator LED).
  328. properties:
  329. compatible:
  330. enum:
  331. - ti,twl4030-pwmled
  332. - ti,twl6030-pwmled
  333. '#pwm-cells':
  334. const: 2
  335. required:
  336. - compatible
  337. - '#pwm-cells'
  338. patternProperties:
  339. '^regulator-':
  340. type: object
  341. unevaluatedProperties: false
  342. $ref: /schemas/regulator/regulator.yaml
  343. properties:
  344. compatible: true
  345. regulator-initial-mode:
  346. enum:
  347. - 0x08 # Sleep mode, the nominal output voltage is maintained
  348. # with low power consumption with low load current capability
  349. - 0x0e # Active mode, the regulator can deliver its nominal output
  350. # voltage with full-load current capability
  351. ti,retain-on-reset:
  352. description: >
  353. Does not turn off the supplies during warm reset.
  354. Could be needed for VMMC, as TWL6030 reset sequence for
  355. this signal does not comply with the SD specification.
  356. type: boolean
  357. unevaluatedProperties: false
  358. required:
  359. - compatible
  360. - reg
  361. - interrupts
  362. - interrupt-controller
  363. - '#interrupt-cells'
  364. examples:
  365. - |
  366. i2c {
  367. #address-cells = <1>;
  368. #size-cells = <0>;
  369. pmic@48 {
  370. compatible = "ti,twl6030";
  371. reg = <0x48>;
  372. interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */
  373. interrupt-parent = <&gic>;
  374. interrupt-controller;
  375. #interrupt-cells = <1>;
  376. charger {
  377. compatible = "ti,twl6030-charger";
  378. interrupts = <2>, <5>;
  379. io-channels = <&gpadc 10>;
  380. io-channel-names = "vusb";
  381. monitored-battery = <&bat>;
  382. };
  383. gpadc {
  384. compatible = "ti,twl6030-gpadc";
  385. interrupts = <6>;
  386. #io-channel-cells = <1>;
  387. };
  388. pwrbutton {
  389. compatible = "ti,twl6030-pwrbutton";
  390. interrupts = <0>;
  391. };
  392. rtc {
  393. compatible = "ti,twl4030-rtc";
  394. interrupts = <8>;
  395. };
  396. regulator-vaux1 {
  397. compatible = "ti,twl6030-vaux1";
  398. regulator-min-microvolt = <1000000>;
  399. regulator-max-microvolt = <3000000>;
  400. };
  401. regulator-vmmc1 {
  402. compatible = "ti,twl6030-vmmc";
  403. ti,retain-on-reset;
  404. };
  405. pwm {
  406. compatible = "ti,twl6030-pwm";
  407. #pwm-cells = <2>;
  408. };
  409. pwmled {
  410. compatible = "ti,twl6030-pwmled";
  411. #pwm-cells = <2>;
  412. };
  413. };
  414. };
  415. - |
  416. i2c {
  417. #address-cells = <1>;
  418. #size-cells = <0>;
  419. pmic@48 {
  420. compatible = "ti,twl4030";
  421. reg = <0x48>;
  422. interrupts = <7>; /* SYS_NIRQ cascaded to intc */
  423. interrupt-parent = <&intc>;
  424. interrupt-controller;
  425. #interrupt-cells = <1>;
  426. charger {
  427. compatible = "ti,twl4030-bci";
  428. interrupts = <9>, <2>;
  429. bci3v1-supply = <&vusb3v1>;
  430. io-channels = <&twl_madc 11>;
  431. io-channel-names = "vac";
  432. };
  433. twl_madc: madc {
  434. compatible = "ti,twl4030-madc";
  435. interrupts = <3>;
  436. #io-channel-cells = <1>;
  437. };
  438. pwrbutton {
  439. compatible = "ti,twl4030-pwrbutton";
  440. interrupts = <8>;
  441. };
  442. rtc {
  443. compatible = "ti,twl4030-rtc";
  444. interrupts = <11>;
  445. };
  446. regulator-vaux1 {
  447. compatible = "ti,twl4030-vaux1";
  448. regulator-min-microvolt = <1000000>;
  449. regulator-max-microvolt = <3000000>;
  450. regulator-initial-mode = <0xe>;
  451. };
  452. vusb3v1: regulator-vusb3v1 {
  453. compatible = "ti,twl4030-vusb3v1";
  454. };
  455. watchdog {
  456. compatible = "ti,twl4030-wdt";
  457. };
  458. power {
  459. compatible = "ti,twl4030-power";
  460. };
  461. pwm {
  462. compatible = "ti,twl4030-pwm";
  463. #pwm-cells = <2>;
  464. };
  465. pwmled {
  466. compatible = "ti,twl4030-pwmled";
  467. #pwm-cells = <2>;
  468. };
  469. };
  470. };
  471. ...