xref: /linux/arch/arm64/boot/dts/sprd/sc2731.dtsi (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Spreadtrum SC2731 PMIC dts file
4 *
5 * Copyright (C) 2018, Spreadtrum Communications Inc.
6 */
7
8&adi_bus {
9	sc2731_pmic: pmic@0 {
10		compatible = "sprd,sc2731";
11		reg = <0>;
12		spi-max-frequency = <26000000>;
13		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
14		interrupt-controller;
15		#interrupt-cells = <1>;
16		#address-cells = <1>;
17		#size-cells = <0>;
18
19		charger@0 {
20			compatible = "sprd,sc2731-charger";
21			reg = <0x0>;
22			monitored-battery = <&bat>;
23		};
24
25		led-controller@200 {
26			compatible = "sprd,sc2731-bltc";
27			reg = <0x200>;
28			#address-cells = <1>;
29			#size-cells = <0>;
30
31			led@0 {
32				label = "red";
33				reg = <0x0>;
34			};
35
36			led@1 {
37				label = "green";
38				reg = <0x1>;
39			};
40
41			led@2 {
42				label = "blue";
43				reg = <0x2>;
44			};
45		};
46
47		rtc@280 {
48			compatible = "sprd,sc2731-rtc";
49			reg = <0x280>;
50			interrupt-parent = <&sc2731_pmic>;
51			interrupts = <2>;
52		};
53
54		pmic_eic: gpio@300 {
55			compatible = "sprd,sc2731-eic";
56			reg = <0x300>;
57			interrupt-parent = <&sc2731_pmic>;
58			interrupts = <5>;
59			gpio-controller;
60			#gpio-cells = <2>;
61			interrupt-controller;
62			#interrupt-cells = <2>;
63		};
64
65		efuse@380 {
66			compatible = "sprd,sc2731-efuse";
67			reg = <0x380>;
68			#address-cells = <1>;
69			#size-cells = <1>;
70			hwlocks = <&hwlock 12>;
71
72			fgu_calib: calib@6 {
73				reg = <0x6 0x2>;
74				bits = <0 9>;
75			};
76
77			adc_big_scale: calib@24 {
78				reg = <0x24 0x2>;
79			};
80
81			adc_small_scale: calib@26 {
82				reg = <0x26 0x2>;
83			};
84		};
85
86		pmic_adc: adc@480 {
87			compatible = "sprd,sc2731-adc";
88			reg = <0x480>;
89			interrupt-parent = <&sc2731_pmic>;
90			interrupts = <0>;
91			#io-channel-cells = <1>;
92			hwlocks = <&hwlock 4>;
93			nvmem-cell-names = "big_scale_calib", "small_scale_calib";
94			nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
95		};
96
97		fuel-gauge@a00 {
98			compatible = "sprd,sc2731-fgu";
99			reg = <0xa00>;
100			bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
101			io-channels = <&pmic_adc 3>, <&pmic_adc 6>;
102			io-channel-names = "bat-temp", "charge-vol";
103			monitored-battery = <&bat>;
104			nvmem-cell-names = "fgu_calib";
105			nvmem-cells = <&fgu_calib>;
106			interrupt-parent = <&sc2731_pmic>;
107			interrupts = <4>;
108		};
109
110		vibrator@ec8 {
111			compatible = "sprd,sc2731-vibrator";
112			reg = <0xec8>;
113		};
114
115		regulators {
116			compatible = "sprd,sc2731-regulator";
117
118			vddarm0: BUCK_CPU0 {
119				regulator-name = "vddarm0";
120				regulator-min-microvolt = <400000>;
121				regulator-max-microvolt = <1996875>;
122				regulator-ramp-delay = <25000>;
123				regulator-always-on;
124			};
125
126			vddarm1: BUCK_CPU1 {
127				regulator-name = "vddarm1";
128				regulator-min-microvolt = <400000>;
129				regulator-max-microvolt = <1996875>;
130				regulator-ramp-delay = <25000>;
131				regulator-always-on;
132			};
133
134			dcdcrf: BUCK_RF {
135				regulator-name = "dcdcrf";
136				regulator-min-microvolt = <600000>;
137				regulator-max-microvolt = <2196875>;
138				regulator-ramp-delay = <25000>;
139				regulator-enable-ramp-delay = <100>;
140				regulator-always-on;
141			};
142
143			vddcama0: LDO_CAMA0 {
144				regulator-name = "vddcama0";
145				regulator-min-microvolt = <1200000>;
146				regulator-max-microvolt = <3750000>;
147				regulator-enable-ramp-delay = <100>;
148			};
149
150			vddcama1: LDO_CAMA1 {
151				regulator-name = "vddcama1";
152				regulator-min-microvolt = <1200000>;
153				regulator-max-microvolt = <3750000>;
154				regulator-enable-ramp-delay = <100>;
155				regulator-ramp-delay = <25000>;
156			};
157
158			vddcammot: LDO_CAMMOT {
159				regulator-name = "vddcammot";
160				regulator-min-microvolt = <1200000>;
161				regulator-max-microvolt = <3750000>;
162				regulator-enable-ramp-delay = <100>;
163				regulator-ramp-delay = <25000>;
164			};
165
166			vddvldo: LDO_VLDO {
167				regulator-name = "vddvldo";
168				regulator-min-microvolt = <1200000>;
169				regulator-max-microvolt = <3750000>;
170				regulator-enable-ramp-delay = <100>;
171				regulator-ramp-delay = <25000>;
172			};
173
174			vddemmccore: LDO_EMMCCORE {
175				regulator-name = "vddemmccore";
176				regulator-min-microvolt = <1200000>;
177				regulator-max-microvolt = <3750000>;
178				regulator-enable-ramp-delay = <100>;
179				regulator-ramp-delay = <25000>;
180				regulator-boot-on;
181			};
182
183			vddsdcore: LDO_SDCORE {
184				regulator-name = "vddsdcore";
185				regulator-min-microvolt = <1200000>;
186				regulator-max-microvolt = <3750000>;
187				regulator-enable-ramp-delay = <100>;
188				regulator-ramp-delay = <25000>;
189			};
190
191			vddsdio: LDO_SDIO {
192				regulator-name = "vddsdio";
193				regulator-min-microvolt = <1200000>;
194				regulator-max-microvolt = <3750000>;
195				regulator-enable-ramp-delay = <100>;
196				regulator-ramp-delay = <25000>;
197			};
198
199			vddwifipa: LDO_WIFIPA {
200				regulator-name = "vddwifipa";
201				regulator-min-microvolt = <1200000>;
202				regulator-max-microvolt = <3750000>;
203				regulator-enable-ramp-delay = <100>;
204				regulator-ramp-delay = <25000>;
205			};
206
207			vddusb33: LDO_USB33 {
208				regulator-name = "vddusb33";
209				regulator-min-microvolt = <1200000>;
210				regulator-max-microvolt = <3750000>;
211				regulator-enable-ramp-delay = <100>;
212				regulator-ramp-delay = <25000>;
213			};
214
215			vddcamd0: LDO_CAMD0 {
216				regulator-name = "vddcamd0";
217				regulator-min-microvolt = <1000000>;
218				regulator-max-microvolt = <1793750>;
219				regulator-enable-ramp-delay = <100>;
220				regulator-ramp-delay = <25000>;
221			};
222
223			vddcamd1: LDO_CAMD1 {
224				regulator-name = "vddcamd1";
225				regulator-min-microvolt = <1000000>;
226				regulator-max-microvolt = <1793750>;
227				regulator-enable-ramp-delay = <100>;
228				regulator-ramp-delay = <25000>;
229			};
230
231			vddcon: LDO_CON {
232				regulator-name = "vddcon";
233				regulator-min-microvolt = <1000000>;
234				regulator-max-microvolt = <1793750>;
235				regulator-enable-ramp-delay = <100>;
236				regulator-ramp-delay = <25000>;
237			};
238
239			vddcamio: LDO_CAMIO {
240				regulator-name = "vddcamio";
241				regulator-min-microvolt = <1000000>;
242				regulator-max-microvolt = <1793750>;
243				regulator-enable-ramp-delay = <100>;
244				regulator-ramp-delay = <25000>;
245			};
246
247			vddsram: LDO_SRAM {
248				regulator-name = "vddsram";
249				regulator-min-microvolt = <1000000>;
250				regulator-max-microvolt = <1793750>;
251				regulator-enable-ramp-delay = <100>;
252				regulator-ramp-delay = <25000>;
253				regulator-always-on;
254			};
255		};
256	};
257};
258