mediatek,mt6397.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek MT6397/MT6323 PMIC
  7. maintainers:
  8. - Sen Chu <sen.chu@mediatek.com>
  9. - Macpaul Lin <macpaul.lin@mediatek.com>
  10. description: |
  11. MT6397/MT6323 is a power management system chip.
  12. Please see the sub-modules below for supported features.
  13. MT6397/MT6323 is a multifunction device with the following sub modules:
  14. - Regulators
  15. - RTC
  16. - ADC
  17. - Audio codec
  18. - GPIO
  19. - Clock
  20. - LED
  21. - Keys
  22. - Power controller
  23. It is interfaced to host controller using SPI interface by a proprietary hardware
  24. called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap.
  25. See the following for pwrap node definitions:
  26. Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
  27. properties:
  28. compatible:
  29. oneOf:
  30. - enum:
  31. - mediatek,mt6323
  32. - mediatek,mt6331 # "mediatek,mt6331" for PMIC MT6331 and MT6332.
  33. - mediatek,mt6328
  34. - mediatek,mt6358
  35. - mediatek,mt6359
  36. - mediatek,mt6397
  37. - items:
  38. - enum:
  39. - mediatek,mt6366
  40. - const: mediatek,mt6358
  41. interrupts:
  42. maxItems: 1
  43. interrupt-controller: true
  44. "#interrupt-cells":
  45. const: 2
  46. rtc:
  47. type: object
  48. $ref: /schemas/rtc/rtc.yaml#
  49. unevaluatedProperties: false
  50. description:
  51. MT6397 Real Time Clock.
  52. properties:
  53. compatible:
  54. oneOf:
  55. - enum:
  56. - mediatek,mt6323-rtc
  57. - mediatek,mt6331-rtc
  58. - mediatek,mt6358-rtc
  59. - mediatek,mt6397-rtc
  60. - items:
  61. - enum:
  62. - mediatek,mt6366-rtc
  63. - const: mediatek,mt6358-rtc
  64. start-year: true
  65. required:
  66. - compatible
  67. regulators:
  68. type: object
  69. description:
  70. List of child nodes that specify the regulators.
  71. additionalProperties: true
  72. properties:
  73. compatible:
  74. oneOf:
  75. - enum:
  76. - mediatek,mt6323-regulator
  77. - mediatek,mt6328-regulator
  78. - mediatek,mt6331-regulator
  79. - mediatek,mt6358-regulator
  80. - mediatek,mt6359-regulator
  81. - mediatek,mt6397-regulator
  82. - items:
  83. - enum:
  84. - mediatek,mt6366-regulator
  85. - const: mediatek,mt6358-regulator
  86. required:
  87. - compatible
  88. adc:
  89. type: object
  90. $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
  91. unevaluatedProperties: false
  92. audio-codec:
  93. type: object
  94. description:
  95. Audio codec support with MT6358 and MT6397.
  96. additionalProperties: true
  97. properties:
  98. compatible:
  99. oneOf:
  100. - enum:
  101. - mediatek,mt6358-sound
  102. - mediatek,mt6359-codec
  103. - mediatek,mt6397-codec
  104. - items:
  105. - enum:
  106. - mediatek,mt6366-sound
  107. - const: mediatek,mt6358-sound
  108. required:
  109. - compatible
  110. clocks:
  111. type: object
  112. additionalProperties: false
  113. description:
  114. This is a clock buffer node for mt6397. However, there are no sub nodes
  115. or any public document exposed in public.
  116. properties:
  117. compatible:
  118. const: mediatek,mt6397-clk
  119. '#clock-cells':
  120. const: 1
  121. required:
  122. - compatible
  123. leds:
  124. type: object
  125. additionalProperties: false
  126. description: |
  127. MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
  128. controllers are defined as the subnode of the function node provided by MT6323
  129. PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
  130. using shared bus called PMIC wrapper for each subfunction to access remote
  131. MT6323 PMIC hardware.
  132. Each led is represented as a child node of the mediatek,mt6323-led that
  133. describes the initial behavior for each LED physically and currently only four
  134. LED child nodes can be supported.
  135. properties:
  136. compatible:
  137. enum:
  138. - mediatek,mt6323-led
  139. - mediatek,mt6331-led
  140. - mediatek,mt6332-led
  141. reg:
  142. maxItems: 1
  143. "#address-cells":
  144. const: 1
  145. "#size-cells":
  146. const: 0
  147. patternProperties:
  148. "^led@[0-3]$":
  149. type: object
  150. $ref: /schemas/leds/common.yaml#
  151. unevaluatedProperties: false
  152. properties:
  153. reg:
  154. description:
  155. LED channel number (0..3)
  156. minimum: 0
  157. maximum: 3
  158. required:
  159. - reg
  160. required:
  161. - compatible
  162. - "#address-cells"
  163. - "#size-cells"
  164. keys:
  165. type: object
  166. $ref: /schemas/input/mediatek,pmic-keys.yaml
  167. unevaluatedProperties: false
  168. description:
  169. Power and Home keys.
  170. power-controller:
  171. type: object
  172. additionalProperties: false
  173. description:
  174. The power controller which could be found on PMIC is responsible for
  175. externally powering off or on the remote MediaTek SoC through the
  176. circuit BBPU (baseband power up).
  177. properties:
  178. compatible:
  179. const: mediatek,mt6323-pwrc
  180. '#power-domain-cells':
  181. const: 0
  182. pinctrl:
  183. type: object
  184. $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml
  185. unevaluatedProperties: false
  186. description:
  187. Pin controller
  188. required:
  189. - compatible
  190. - regulators
  191. additionalProperties: false
  192. examples:
  193. - |
  194. #include <dt-bindings/interrupt-controller/arm-gic.h>
  195. #include <dt-bindings/leds/common.h>
  196. pmic {
  197. compatible = "mediatek,mt6323";
  198. interrupt-parent = <&pio>;
  199. interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
  200. interrupt-controller;
  201. #interrupt-cells = <2>;
  202. leds {
  203. compatible = "mediatek,mt6323-led";
  204. #address-cells = <1>;
  205. #size-cells = <0>;
  206. };
  207. regulators {
  208. compatible = "mediatek,mt6323-regulator";
  209. buck_vproc {
  210. regulator-name = "vproc";
  211. regulator-min-microvolt = < 700000>;
  212. regulator-max-microvolt = <1350000>;
  213. regulator-ramp-delay = <12500>;
  214. regulator-always-on;
  215. regulator-boot-on;
  216. };
  217. buck_vsys {
  218. regulator-name = "vsys";
  219. regulator-min-microvolt = <1400000>;
  220. regulator-max-microvolt = <2987500>;
  221. regulator-ramp-delay = <25000>;
  222. regulator-always-on;
  223. regulator-boot-on;
  224. };
  225. buck_vpa {
  226. regulator-name = "vpa";
  227. regulator-min-microvolt = < 500000>;
  228. regulator-max-microvolt = <3650000>;
  229. };
  230. ldo_vtcxo {
  231. regulator-name = "vtcxo";
  232. regulator-min-microvolt = <2800000>;
  233. regulator-max-microvolt = <2800000>;
  234. regulator-enable-ramp-delay = <90>;
  235. regulator-always-on;
  236. regulator-boot-on;
  237. };
  238. ldo_vcn28 {
  239. regulator-name = "vcn28";
  240. regulator-min-microvolt = <2800000>;
  241. regulator-max-microvolt = <2800000>;
  242. regulator-enable-ramp-delay = <185>;
  243. };
  244. ldo_vcn33_bt {
  245. regulator-name = "vcn33_bt";
  246. regulator-min-microvolt = <3300000>;
  247. regulator-max-microvolt = <3600000>;
  248. regulator-enable-ramp-delay = <185>;
  249. };
  250. ldo_vcn33_wifi {
  251. regulator-name = "vcn33_wifi";
  252. regulator-min-microvolt = <3300000>;
  253. regulator-max-microvolt = <3600000>;
  254. regulator-enable-ramp-delay = <185>;
  255. };
  256. ldo_va {
  257. regulator-name = "va";
  258. regulator-min-microvolt = <2800000>;
  259. regulator-max-microvolt = <2800000>;
  260. regulator-enable-ramp-delay = <216>;
  261. regulator-always-on;
  262. regulator-boot-on;
  263. };
  264. ldo_vcama {
  265. regulator-name = "vcama";
  266. regulator-min-microvolt = <1500000>;
  267. regulator-max-microvolt = <2800000>;
  268. regulator-enable-ramp-delay = <216>;
  269. };
  270. ldo_vio28 {
  271. regulator-name = "vio28";
  272. regulator-min-microvolt = <2800000>;
  273. regulator-max-microvolt = <2800000>;
  274. regulator-enable-ramp-delay = <216>;
  275. regulator-always-on;
  276. regulator-boot-on;
  277. };
  278. ldo_vusb {
  279. regulator-name = "vusb";
  280. regulator-min-microvolt = <3300000>;
  281. regulator-max-microvolt = <3300000>;
  282. regulator-enable-ramp-delay = <216>;
  283. regulator-boot-on;
  284. };
  285. ldo_vmc {
  286. regulator-name = "vmc";
  287. regulator-min-microvolt = <1800000>;
  288. regulator-max-microvolt = <3300000>;
  289. regulator-enable-ramp-delay = <36>;
  290. regulator-boot-on;
  291. };
  292. ldo_vmch {
  293. regulator-name = "vmch";
  294. regulator-min-microvolt = <3000000>;
  295. regulator-max-microvolt = <3300000>;
  296. regulator-enable-ramp-delay = <36>;
  297. regulator-boot-on;
  298. };
  299. ldo_vemc3v3 {
  300. regulator-name = "vemc3v3";
  301. regulator-min-microvolt = <3000000>;
  302. regulator-max-microvolt = <3300000>;
  303. regulator-enable-ramp-delay = <36>;
  304. regulator-boot-on;
  305. };
  306. ldo_vgp1 {
  307. regulator-name = "vgp1";
  308. regulator-min-microvolt = <1200000>;
  309. regulator-max-microvolt = <3300000>;
  310. regulator-enable-ramp-delay = <216>;
  311. };
  312. ldo_vgp2 {
  313. regulator-name = "vgp2";
  314. regulator-min-microvolt = <1200000>;
  315. regulator-max-microvolt = <3000000>;
  316. regulator-enable-ramp-delay = <216>;
  317. };
  318. ldo_vgp3 {
  319. regulator-name = "vgp3";
  320. regulator-min-microvolt = <1200000>;
  321. regulator-max-microvolt = <1800000>;
  322. regulator-enable-ramp-delay = <216>;
  323. };
  324. ldo_vcn18 {
  325. regulator-name = "vcn18";
  326. regulator-min-microvolt = <1800000>;
  327. regulator-max-microvolt = <1800000>;
  328. regulator-enable-ramp-delay = <216>;
  329. };
  330. ldo_vsim1 {
  331. regulator-name = "vsim1";
  332. regulator-min-microvolt = <1800000>;
  333. regulator-max-microvolt = <3000000>;
  334. regulator-enable-ramp-delay = <216>;
  335. };
  336. ldo_vsim2 {
  337. regulator-name = "vsim2";
  338. regulator-min-microvolt = <1800000>;
  339. regulator-max-microvolt = <3000000>;
  340. regulator-enable-ramp-delay = <216>;
  341. };
  342. ldo_vrtc {
  343. regulator-name = "vrtc";
  344. regulator-min-microvolt = <2800000>;
  345. regulator-max-microvolt = <2800000>;
  346. regulator-always-on;
  347. regulator-boot-on;
  348. };
  349. ldo_vcamaf {
  350. regulator-name = "vcamaf";
  351. regulator-min-microvolt = <1200000>;
  352. regulator-max-microvolt = <3300000>;
  353. regulator-enable-ramp-delay = <216>;
  354. };
  355. ldo_vibr {
  356. regulator-name = "vibr";
  357. regulator-min-microvolt = <1200000>;
  358. regulator-max-microvolt = <3300000>;
  359. regulator-enable-ramp-delay = <36>;
  360. };
  361. ldo_vrf18 {
  362. regulator-name = "vrf18";
  363. regulator-min-microvolt = <1825000>;
  364. regulator-max-microvolt = <1825000>;
  365. regulator-enable-ramp-delay = <187>;
  366. };
  367. ldo_vm {
  368. regulator-name = "vm";
  369. regulator-min-microvolt = <1200000>;
  370. regulator-max-microvolt = <1800000>;
  371. regulator-enable-ramp-delay = <216>;
  372. regulator-always-on;
  373. regulator-boot-on;
  374. };
  375. ldo_vio18 {
  376. regulator-name = "vio18";
  377. regulator-min-microvolt = <1800000>;
  378. regulator-max-microvolt = <1800000>;
  379. regulator-enable-ramp-delay = <216>;
  380. regulator-always-on;
  381. regulator-boot-on;
  382. };
  383. ldo_vcamd {
  384. regulator-name = "vcamd";
  385. regulator-min-microvolt = <1200000>;
  386. regulator-max-microvolt = <1800000>;
  387. regulator-enable-ramp-delay = <216>;
  388. };
  389. ldo_vcamio {
  390. regulator-name = "vcamio";
  391. regulator-min-microvolt = <1800000>;
  392. regulator-max-microvolt = <1800000>;
  393. regulator-enable-ramp-delay = <216>;
  394. };
  395. };
  396. keys {
  397. compatible = "mediatek,mt6323-keys";
  398. mediatek,long-press-mode = <1>;
  399. power-off-time-sec = <0>;
  400. power {
  401. linux,keycodes = <116>;
  402. wakeup-source;
  403. };
  404. home {
  405. linux,keycodes = <114>;
  406. };
  407. };
  408. power-controller {
  409. compatible = "mediatek,mt6323-pwrc";
  410. #power-domain-cells = <0>;
  411. };
  412. rtc {
  413. compatible = "mediatek,mt6323-rtc";
  414. };
  415. };
  416. - |
  417. #include <dt-bindings/input/input.h>
  418. #include <dt-bindings/interrupt-controller/arm-gic.h>
  419. pmic {
  420. compatible = "mediatek,mt6358";
  421. interrupt-controller;
  422. #interrupt-cells = <2>;
  423. audio-codec {
  424. compatible = "mediatek,mt6358-sound";
  425. Avdd-supply = <&mt6358_vaud28_reg>;
  426. mediatek,dmic-mode = <0>;
  427. };
  428. regulators {
  429. compatible = "mediatek,mt6358-regulator";
  430. buck_vdram1 {
  431. regulator-name = "vdram1";
  432. regulator-min-microvolt = <500000>;
  433. regulator-max-microvolt = <2087500>;
  434. regulator-ramp-delay = <12500>;
  435. regulator-enable-ramp-delay = <0>;
  436. regulator-always-on;
  437. regulator-allowed-modes = <0 1>;
  438. };
  439. // ...
  440. ldo_vsim2 {
  441. regulator-name = "vsim2";
  442. regulator-min-microvolt = <1700000>;
  443. regulator-max-microvolt = <3100000>;
  444. regulator-enable-ramp-delay = <540>;
  445. };
  446. };
  447. rtc {
  448. compatible = "mediatek,mt6358-rtc";
  449. };
  450. keys {
  451. compatible = "mediatek,mt6358-keys";
  452. power {
  453. linux,keycodes = <KEY_POWER>;
  454. wakeup-source;
  455. };
  456. home {
  457. linux,keycodes = <KEY_HOME>;
  458. };
  459. };
  460. };
  461. - |
  462. #include <dt-bindings/interrupt-controller/arm-gic.h>
  463. pmic {
  464. compatible = "mediatek,mt6397";
  465. interrupt-parent = <&pio>;
  466. interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
  467. interrupt-controller;
  468. #interrupt-cells = <2>;
  469. audio-codec {
  470. compatible = "mediatek,mt6397-codec";
  471. };
  472. clocks {
  473. compatible = "mediatek,mt6397-clk";
  474. #clock-cells = <1>;
  475. };
  476. pinctrl {
  477. compatible = "mediatek,mt6397-pinctrl";
  478. gpio-controller;
  479. #gpio-cells = <2>;
  480. };
  481. regulators {
  482. compatible = "mediatek,mt6397-regulator";
  483. buck_vpca15 {
  484. regulator-name = "vpca15";
  485. regulator-min-microvolt = < 850000>;
  486. regulator-max-microvolt = <1350000>;
  487. regulator-ramp-delay = <12500>;
  488. regulator-enable-ramp-delay = <200>;
  489. };
  490. // ...
  491. ldo_vibr {
  492. regulator-name = "vibr";
  493. regulator-min-microvolt = <1200000>;
  494. regulator-max-microvolt = <3300000>;
  495. regulator-enable-ramp-delay = <218>;
  496. };
  497. };
  498. rtc {
  499. compatible = "mediatek,mt6397-rtc";
  500. };
  501. };