• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Common CPCAP configuration used on Motorola phones
4 */
5
6&mcspi1 {
7	cpcap: pmic@0 {
8		compatible = "motorola,cpcap", "st,6556002";
9		reg = <0>;	/* cs0 */
10		interrupt-parent = <&gpio1>;
11		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
12		interrupt-controller;
13		#interrupt-cells = <2>;
14		#address-cells = <1>;
15		#size-cells = <0>;
16		spi-max-frequency = <9600000>;
17		spi-cs-high;
18		spi-cpol;
19		spi-cpha;
20
21		cpcap_adc: adc {
22			compatible = "motorola,mapphone-cpcap-adc";
23			interrupts-extended = <&cpcap 8 0>;
24			interrupt-names = "adcdone";
25			#io-channel-cells = <1>;
26		};
27
28		cpcap_battery: battery {
29			compatible = "motorola,cpcap-battery";
30			interrupts-extended = <
31				&cpcap 6 0 &cpcap 5 0 &cpcap 3 0
32				&cpcap 20 0 &cpcap 54 0 &cpcap 57 0
33			>;
34			interrupt-names =
35				"eol", "lowbph", "lowbpl",
36				"chrgcurr1", "battdetb",
37				"cccal";
38			io-channels = <&cpcap_adc 0 &cpcap_adc 1
39				       &cpcap_adc 5 &cpcap_adc 6>;
40			io-channel-names = "battdetb", "battp",
41					   "chg_isense", "batti";
42			power-supplies = <&cpcap_charger>;
43		};
44
45		cpcap_charger: charger {
46			compatible = "motorola,mapphone-cpcap-charger";
47			interrupts-extended = <
48				&cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
49				&cpcap 22 0 &cpcap 21 0 &cpcap 20 0 &cpcap 19 0
50				&cpcap 54 0
51			>;
52			interrupt-names =
53				"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
54				"rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",
55				"battdetb";
56			mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
57				      &gpio3 23 GPIO_ACTIVE_LOW>;
58			io-channels = <&cpcap_adc 0 &cpcap_adc 1
59				       &cpcap_adc 2 &cpcap_adc 5
60				       &cpcap_adc 6>;
61			io-channel-names = "battdetb", "battp",
62					   "vbus", "chg_isense",
63					   "batti";
64		};
65
66		cpcap_regulator: regulator {
67			compatible = "motorola,mapphone-cpcap-regulator";
68
69			cpcap_regulators: regulators {
70			};
71		};
72
73		cpcap_audio: audio-codec {
74			#sound-dai-cells = <1>;
75
76			port@0 {
77				cpcap_audio_codec0: endpoint {
78				};
79			};
80			port@1 {
81				cpcap_audio_codec1: endpoint {
82				};
83			};
84		};
85
86		cpcap_rtc: rtc {
87			compatible = "motorola,cpcap-rtc";
88
89			interrupt-parent = <&cpcap>;
90			interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
91		};
92
93		power_button: button {
94			compatible = "motorola,cpcap-pwrbutton";
95
96			interrupts = <23 IRQ_TYPE_NONE>;
97		};
98
99		cpcap_usb2_phy: phy {
100			compatible = "motorola,mapphone-cpcap-usb-phy";
101			pinctrl-0 = <&usb_gpio_mux_sel1 &usb_gpio_mux_sel2>;
102			pinctrl-1 = <&usb_ulpi_pins>;
103			pinctrl-2 = <&usb_utmi_pins>;
104			pinctrl-3 = <&uart3_pins>;
105			pinctrl-names = "default", "ulpi", "utmi", "uart";
106			#phy-cells = <0>;
107			interrupts-extended = <
108				&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
109				&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
110				&cpcap 48 0
111			>;
112			interrupt-names =
113				"id_ground", "id_float", "se0conn", "vbusvld",
114				"sessvld", "sessend", "se1", "dm", "dp";
115			mode-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH
116				      &gpio1 0 GPIO_ACTIVE_HIGH>;
117			io-channels = <&cpcap_adc 2>, <&cpcap_adc 7>;
118			io-channel-names = "vbus", "id";
119			vusb-supply = <&vusb>;
120		};
121
122		led_red: led-red {
123			compatible = "motorola,cpcap-led-red";
124			vdd-supply = <&sw5>;
125			label = "status-led:red";
126		};
127
128		led_green: led-green {
129			compatible = "motorola,cpcap-led-green";
130			vdd-supply = <&sw5>;
131			label = "status-led:green";
132		};
133
134		led_blue: led-blue {
135			compatible = "motorola,cpcap-led-blue";
136			vdd-supply = <&sw5>;
137			label = "status-led:blue";
138		};
139
140		led_adl: led-adl {
141			compatible = "motorola,cpcap-led-adl";
142			vdd-supply = <&sw5>;
143			label = "button-backlight";
144		};
145
146		led_cp: led-cp {
147			compatible = "motorola,cpcap-led-cp";
148			vdd-supply = <&sw5>;
149			label = "shift-key-light";
150		};
151	};
152};
153
154&cpcap_regulators {
155	sw5: SW5 {
156		regulator-min-microvolt = <5050000>;
157		regulator-max-microvolt = <5050000>;
158		regulator-enable-ramp-delay = <50000>;
159		regulator-boot-on;
160	};
161
162	vcam: VCAM {
163		regulator-min-microvolt = <2900000>;
164		regulator-max-microvolt = <2900000>;
165		regulator-enable-ramp-delay = <1000>;
166	};
167
168	/* Used by DSS and is the "zerov_regulator" trigger for SoC off mode */
169	vcsi: VCSI {
170		regulator-min-microvolt = <1800000>;
171		regulator-max-microvolt = <1800000>;
172		regulator-enable-ramp-delay = <1000>;
173		regulator-always-on;
174	};
175
176	vdac: VDAC {
177		regulator-min-microvolt = <1800000>;
178		regulator-max-microvolt = <1800000>;
179		regulator-enable-ramp-delay = <1000>;
180	};
181
182	vdig: VDIG {
183		regulator-min-microvolt = <1875000>;
184		regulator-max-microvolt = <1875000>;
185		regulator-enable-ramp-delay = <1000>;
186	};
187
188	vfuse: VFUSE {
189		regulator-min-microvolt = <1500000>;
190		regulator-max-microvolt = <3150000>;
191		regulator-enable-ramp-delay = <1000>;
192	};
193
194	vhvio: VHVIO {
195		regulator-min-microvolt = <2775000>;
196		regulator-max-microvolt = <2775000>;
197		regulator-enable-ramp-delay = <1000>;
198		regulator-always-on;
199	};
200
201	/* Used by eMMC at mmc2 */
202	vsdio: VSDIO {
203		regulator-min-microvolt = <2900000>;
204		regulator-max-microvolt = <2900000>;
205		regulator-enable-ramp-delay = <1000>;
206	};
207
208	vpll: VPLL {
209		regulator-min-microvolt = <1200000>;
210		regulator-max-microvolt = <1800000>;
211		regulator-enable-ramp-delay = <100>;
212	};
213
214	vrf1: VRF1 {
215		regulator-min-microvolt = <2775000>;
216		regulator-max-microvolt = <2775000>;
217		regulator-enable-ramp-delay = <1000>;
218	};
219
220	vrf2: VRF2 {
221		regulator-min-microvolt = <2775000>;
222		regulator-max-microvolt = <2775000>;
223		regulator-enable-ramp-delay = <1000>;
224	};
225
226	vrfref: VRFREF {
227		regulator-min-microvolt = <2500000>;
228		regulator-max-microvolt = <2775000>;
229		regulator-enable-ramp-delay = <100>;
230	};
231
232	vwlan1: VWLAN1 {
233		regulator-min-microvolt = <1800000>;
234		regulator-max-microvolt = <1900000>;
235		regulator-enable-ramp-delay = <1000>;
236	};
237
238	/* Used by micro-SDIO at mmc1 */
239	vwlan2: VWLAN2 {
240		regulator-min-microvolt = <3000000>;
241		regulator-max-microvolt = <3000000>;
242		regulator-enable-ramp-delay = <1000>;
243	};
244
245	vsim: VSIM {
246		regulator-min-microvolt = <1800000>;
247		regulator-max-microvolt = <2900000>;
248		regulator-enable-ramp-delay = <1000>;
249	};
250
251	vsimcard: VSIMCARD {
252		regulator-min-microvolt = <1800000>;
253		regulator-max-microvolt = <2900000>;
254		regulator-enable-ramp-delay = <1000>;
255	};
256
257	vvib: VVIB {
258		regulator-min-microvolt = <1300000>;
259		regulator-max-microvolt = <3000000>;
260		regulator-enable-ramp-delay = <500>;
261	};
262
263	vusb: VUSB {
264		regulator-min-microvolt = <3300000>;
265		regulator-max-microvolt = <3300000>;
266		regulator-enable-ramp-delay = <1000>;
267	};
268
269	vaudio: VAUDIO {
270		regulator-min-microvolt = <2775000>;
271		regulator-max-microvolt = <2775000>;
272		regulator-enable-ramp-delay = <1000>;
273		regulator-initial-mode = <0x00>; /* NORMAL */
274	};
275};
276