Linux Audio

Check our new training course

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