1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2017-2018 MediaTek Inc.
4 * Author: John Crispin <john@phrozen.org>
5 *	   Sean Wang <sean.wang@mediatek.com>
6 *
7 */
8
9&pwrap {
10	pmic: mt6323 {
11		compatible = "mediatek,mt6323";
12		interrupt-parent = <&pio>;
13		interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
14		interrupt-controller;
15		#interrupt-cells = <2>;
16
17		mt6323_leds: leds {
18			compatible = "mediatek,mt6323-led";
19			#address-cells = <1>;
20			#size-cells = <0>;
21			status = "disabled";
22		};
23
24		mt6323regulator: mt6323regulator{
25			compatible = "mediatek,mt6323-regulator";
26
27			mt6323_vproc_reg: buck_vproc{
28				regulator-name = "vproc";
29				regulator-min-microvolt = < 700000>;
30				regulator-max-microvolt = <1350000>;
31				regulator-ramp-delay = <12500>;
32				regulator-always-on;
33				regulator-boot-on;
34			};
35
36			mt6323_vsys_reg: buck_vsys{
37				regulator-name = "vsys";
38				regulator-min-microvolt = <1400000>;
39				regulator-max-microvolt = <2987500>;
40				regulator-ramp-delay = <25000>;
41				regulator-always-on;
42				regulator-boot-on;
43			};
44
45			mt6323_vpa_reg: buck_vpa{
46				regulator-name = "vpa";
47				regulator-min-microvolt = < 500000>;
48				regulator-max-microvolt = <3650000>;
49			};
50
51			mt6323_vtcxo_reg: ldo_vtcxo{
52				regulator-name = "vtcxo";
53				regulator-min-microvolt = <2800000>;
54				regulator-max-microvolt = <2800000>;
55				regulator-enable-ramp-delay = <90>;
56				regulator-always-on;
57				regulator-boot-on;
58			};
59
60			mt6323_vcn28_reg: ldo_vcn28{
61				regulator-name = "vcn28";
62				regulator-min-microvolt = <2800000>;
63				regulator-max-microvolt = <2800000>;
64				regulator-enable-ramp-delay = <185>;
65			};
66
67			mt6323_vcn33_bt_reg: ldo_vcn33_bt{
68				regulator-name = "vcn33_bt";
69				regulator-min-microvolt = <3300000>;
70				regulator-max-microvolt = <3600000>;
71				regulator-enable-ramp-delay = <185>;
72			};
73
74			mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
75				regulator-name = "vcn33_wifi";
76				regulator-min-microvolt = <3300000>;
77				regulator-max-microvolt = <3600000>;
78				regulator-enable-ramp-delay = <185>;
79			};
80
81			mt6323_va_reg: ldo_va{
82				regulator-name = "va";
83				regulator-min-microvolt = <2800000>;
84				regulator-max-microvolt = <2800000>;
85				regulator-enable-ramp-delay = <216>;
86				regulator-always-on;
87				regulator-boot-on;
88			};
89
90			mt6323_vcama_reg: ldo_vcama{
91				regulator-name = "vcama";
92				regulator-min-microvolt = <1500000>;
93				regulator-max-microvolt = <2800000>;
94				regulator-enable-ramp-delay = <216>;
95			};
96
97			mt6323_vio28_reg: ldo_vio28{
98				regulator-name = "vio28";
99				regulator-min-microvolt = <2800000>;
100				regulator-max-microvolt = <2800000>;
101				regulator-enable-ramp-delay = <216>;
102				regulator-always-on;
103				regulator-boot-on;
104			};
105
106			mt6323_vusb_reg: ldo_vusb{
107				regulator-name = "vusb";
108				regulator-min-microvolt = <3300000>;
109				regulator-max-microvolt = <3300000>;
110				regulator-enable-ramp-delay = <216>;
111				regulator-boot-on;
112			};
113
114			mt6323_vmc_reg: ldo_vmc{
115				regulator-name = "vmc";
116				regulator-min-microvolt = <1800000>;
117				regulator-max-microvolt = <3300000>;
118				regulator-enable-ramp-delay = <36>;
119				regulator-boot-on;
120			};
121
122			mt6323_vmch_reg: ldo_vmch{
123				regulator-name = "vmch";
124				regulator-min-microvolt = <3000000>;
125				regulator-max-microvolt = <3300000>;
126				regulator-enable-ramp-delay = <36>;
127				regulator-boot-on;
128			};
129
130			mt6323_vemc3v3_reg: ldo_vemc3v3{
131				regulator-name = "vemc3v3";
132				regulator-min-microvolt = <3000000>;
133				regulator-max-microvolt = <3300000>;
134				regulator-enable-ramp-delay = <36>;
135				regulator-boot-on;
136			};
137
138			mt6323_vgp1_reg: ldo_vgp1{
139				regulator-name = "vgp1";
140				regulator-min-microvolt = <1200000>;
141				regulator-max-microvolt = <3300000>;
142				regulator-enable-ramp-delay = <216>;
143			};
144
145			mt6323_vgp2_reg: ldo_vgp2{
146				regulator-name = "vgp2";
147				regulator-min-microvolt = <1200000>;
148				regulator-max-microvolt = <3000000>;
149				regulator-enable-ramp-delay = <216>;
150			};
151
152			mt6323_vgp3_reg: ldo_vgp3{
153				regulator-name = "vgp3";
154				regulator-min-microvolt = <1200000>;
155				regulator-max-microvolt = <1800000>;
156				regulator-enable-ramp-delay = <216>;
157			};
158
159			mt6323_vcn18_reg: ldo_vcn18{
160				regulator-name = "vcn18";
161				regulator-min-microvolt = <1800000>;
162				regulator-max-microvolt = <1800000>;
163				regulator-enable-ramp-delay = <216>;
164			};
165
166			mt6323_vsim1_reg: ldo_vsim1{
167				regulator-name = "vsim1";
168				regulator-min-microvolt = <1800000>;
169				regulator-max-microvolt = <3000000>;
170				regulator-enable-ramp-delay = <216>;
171			};
172
173			mt6323_vsim2_reg: ldo_vsim2{
174				regulator-name = "vsim2";
175				regulator-min-microvolt = <1800000>;
176				regulator-max-microvolt = <3000000>;
177				regulator-enable-ramp-delay = <216>;
178			};
179
180			mt6323_vrtc_reg: ldo_vrtc{
181				regulator-name = "vrtc";
182				regulator-min-microvolt = <2800000>;
183				regulator-max-microvolt = <2800000>;
184				regulator-always-on;
185				regulator-boot-on;
186			};
187
188			mt6323_vcamaf_reg: ldo_vcamaf{
189				regulator-name = "vcamaf";
190				regulator-min-microvolt = <1200000>;
191				regulator-max-microvolt = <3300000>;
192				regulator-enable-ramp-delay = <216>;
193			};
194
195			mt6323_vibr_reg: ldo_vibr{
196				regulator-name = "vibr";
197				regulator-min-microvolt = <1200000>;
198				regulator-max-microvolt = <3300000>;
199				regulator-enable-ramp-delay = <36>;
200			};
201
202			mt6323_vrf18_reg: ldo_vrf18{
203				regulator-name = "vrf18";
204				regulator-min-microvolt = <1825000>;
205				regulator-max-microvolt = <1825000>;
206				regulator-enable-ramp-delay = <187>;
207			};
208
209			mt6323_vm_reg: ldo_vm{
210				regulator-name = "vm";
211				regulator-min-microvolt = <1200000>;
212				regulator-max-microvolt = <1800000>;
213				regulator-enable-ramp-delay = <216>;
214				regulator-always-on;
215				regulator-boot-on;
216			};
217
218			mt6323_vio18_reg: ldo_vio18{
219				regulator-name = "vio18";
220				regulator-min-microvolt = <1800000>;
221				regulator-max-microvolt = <1800000>;
222				regulator-enable-ramp-delay = <216>;
223				regulator-always-on;
224				regulator-boot-on;
225			};
226
227			mt6323_vcamd_reg: ldo_vcamd{
228				regulator-name = "vcamd";
229				regulator-min-microvolt = <1200000>;
230				regulator-max-microvolt = <1800000>;
231				regulator-enable-ramp-delay = <216>;
232			};
233
234			mt6323_vcamio_reg: ldo_vcamio{
235				regulator-name = "vcamio";
236				regulator-min-microvolt = <1800000>;
237				regulator-max-microvolt = <1800000>;
238				regulator-enable-ramp-delay = <216>;
239			};
240		};
241
242		mt6323keys: mt6323keys {
243			compatible = "mediatek,mt6323-keys";
244			mediatek,long-press-mode = <1>;
245			power-off-time-sec = <0>;
246
247			power {
248				linux,keycodes = <116>;
249				wakeup-source;
250			};
251
252			home {
253				linux,keycodes = <114>;
254			};
255		};
256
257		codec: mt6397codec {
258			compatible = "mediatek,mt6397-codec";
259		};
260
261		power-controller {
262			compatible = "mediatek,mt6323-pwrc";
263		};
264
265		rtc {
266			compatible = "mediatek,mt6323-rtc";
267		};
268	};
269};
270