Linux Audio

Check our new training course

Loading...
v4.17
  1// SPDX-License-Identifier: GPL-2.0
  2#include "qcom-apq8064-v2.0.dtsi"
  3#include <dt-bindings/gpio/gpio.h>
  4#include <dt-bindings/input/input.h>
  5#include <dt-bindings/mfd/qcom-rpm.h>
  6#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  7
  8/ {
  9	model = "Sony Xperia Z";
 10	compatible = "sony,xperia-yuga", "qcom,apq8064";
 11
 12	aliases {
 13		serial0 = &gsbi5_serial;
 14	};
 15
 16	chosen {
 17		stdout-path = "serial0:115200n8";
 18	};
 19
 20	gpio-keys {
 21		compatible = "gpio-keys";
 22		input-name = "gpio-keys";
 23
 24		pinctrl-names = "default";
 25		pinctrl-0 = <&gpio_keys_pin_a>;
 26
 27		camera-focus {
 28			label = "camera_focus";
 29			gpios = <&pm8921_gpio 3 GPIO_ACTIVE_LOW>;
 30			linux,input-type = <1>;
 31			linux,code = <KEY_CAMERA_FOCUS>;
 32		};
 33
 34		camera-snapshot {
 35			label = "camera_snapshot";
 36			gpios = <&pm8921_gpio 4 GPIO_ACTIVE_LOW>;
 37			linux,input-type = <1>;
 38			linux,code = <KEY_CAMERA>;
 39		};
 40
 41		volume-down {
 42			label = "volume_down";
 43			gpios = <&pm8921_gpio 29 GPIO_ACTIVE_LOW>;
 44			linux,input-type = <1>;
 45			linux,code = <KEY_VOLUMEDOWN>;
 46		};
 47
 48		volume-up {
 49			label = "volume_up";
 50			gpios = <&pm8921_gpio 35 GPIO_ACTIVE_LOW>;
 51			linux,input-type = <1>;
 52			linux,code = <KEY_VOLUMEUP>;
 53		};
 54	};
 55
 56	soc {
 57		pinctrl@800000 {
 58			gsbi5_uart_pin_a: gsbi5-uart-pin-active {
 59				rx {
 60					pins = "gpio52";
 61					function = "gsbi5";
 62					drive-strength = <2>;
 63					bias-pull-up;
 64				};
 65
 66				tx {
 67					pins = "gpio51";
 68					function = "gsbi5";
 69					drive-strength = <4>;
 70					bias-disable;
 71				};
 72			};
 73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 74
 75			sdcc3_cd_pin_a: sdcc3-cd-pin-active {
 76				pins = "gpio26";
 77				function = "gpio";
 78
 79				drive-strength = <2>;
 80				bias-disable;
 81			};
 82		};
 83
 84
 85		rpm@108000 {
 86			regulators {
 87				vin_l1_l2_l12_l18-supply = <&pm8921_s4>;
 88				vin_lvs_1_3_6-supply = <&pm8921_s4>;
 89				vin_lvs_4_5_7-supply = <&pm8921_s4>;
 90				vin_ncp-supply = <&pm8921_l6>;
 91				vin_lvs2-supply = <&pm8921_s4>;
 92				vin_l24-supply = <&pm8921_s1>;
 93				vin_l25-supply = <&pm8921_s1>;
 94				vin_l27-supply = <&pm8921_s7>;
 95				vin_l28-supply = <&pm8921_s7>;
 96
 97				/* Buck SMPS */
 98				s1 {
 99					regulator-always-on;
100					regulator-min-microvolt = <1225000>;
101					regulator-max-microvolt = <1225000>;
102					qcom,switch-mode-frequency = <3200000>;
103					bias-pull-down;
104				};
105
106				s2 {
107					regulator-min-microvolt = <1300000>;
108					regulator-max-microvolt = <1300000>;
109					qcom,switch-mode-frequency = <1600000>;
110					bias-pull-down;
111				};
112
113				s3 {
114					regulator-min-microvolt = <500000>;
115					regulator-max-microvolt = <1150000>;
116					qcom,switch-mode-frequency = <4800000>;
117					bias-pull-down;
118				};
119
120				s4 {
121					regulator-always-on;
122					regulator-min-microvolt = <1800000>;
123					regulator-max-microvolt = <1800000>;
124					qcom,switch-mode-frequency = <1600000>;
125					bias-pull-down;
126					qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
127				};
128
129				s7 {
130					regulator-min-microvolt = <1300000>;
131					regulator-max-microvolt = <1300000>;
132					qcom,switch-mode-frequency = <3200000>;
133				};
134
135				s8 {
136					regulator-min-microvolt = <2200000>;
137					regulator-max-microvolt = <2200000>;
138					qcom,switch-mode-frequency = <1600000>;
139				};
140
141				/* PMOS LDO */
142				l1 {
143					regulator-always-on;
144					regulator-min-microvolt = <1100000>;
145					regulator-max-microvolt = <1100000>;
146					bias-pull-down;
147				};
148
149				l2 {
150					regulator-min-microvolt = <1200000>;
151					regulator-max-microvolt = <1200000>;
152					bias-pull-down;
153				};
154
155				l3 {
156					regulator-min-microvolt = <3075000>;
157					regulator-max-microvolt = <3075000>;
158					bias-pull-down;
159				};
160
161				l4 {
162					regulator-always-on;
163					regulator-min-microvolt = <1800000>;
164					regulator-max-microvolt = <1800000>;
165					bias-pull-down;
166				};
167
168				l5 {
169					regulator-min-microvolt = <2950000>;
170					regulator-max-microvolt = <2950000>;
171					bias-pull-down;
172				};
173
174				l6 {
175					regulator-min-microvolt = <2950000>;
176					regulator-max-microvolt = <2950000>;
177					bias-pull-down;
178				};
179
180				l7 {
181					regulator-min-microvolt = <1850000>;
182					regulator-max-microvolt = <2950000>;
183					bias-pull-down;
184				};
185
186				l8 {
187					regulator-min-microvolt = <2800000>;
188					regulator-max-microvolt = <2800000>;
189					bias-pull-down;
190				};
191
192				l9 {
193					regulator-min-microvolt = <3000000>;
194					regulator-max-microvolt = <3000000>;
195					bias-pull-down;
196				};
197
198				l10 {
199					regulator-min-microvolt = <2900000>;
200					regulator-max-microvolt = <2900000>;
201					bias-pull-down;
202				};
203
204				l11 {
205					regulator-min-microvolt = <3000000>;
206					regulator-max-microvolt = <3000000>;
207					bias-pull-down;
208				};
209
210				l12 {
211					regulator-min-microvolt = <1200000>;
212					regulator-max-microvolt = <1200000>;
213					bias-pull-down;
214				};
215
216				l14 {
217					regulator-min-microvolt = <1800000>;
218					regulator-max-microvolt = <1800000>;
219					bias-pull-down;
220				};
221
222				l15 {
223					regulator-min-microvolt = <1800000>;
224					regulator-max-microvolt = <2950000>;
225					bias-pull-down;
226				};
227
228				l16 {
229					regulator-min-microvolt = <2800000>;
230					regulator-max-microvolt = <2800000>;
231					bias-pull-down;
232				};
233
234				l17 {
235					regulator-min-microvolt = <2000000>;
236					regulator-max-microvolt = <2000000>;
237					bias-pull-down;
238				};
239
240				l18 {
241					regulator-min-microvolt = <1200000>;
242					regulator-max-microvolt = <1200000>;
243					bias-pull-down;
244				};
245
246				l21 {
247					regulator-min-microvolt = <1050000>;
248					regulator-max-microvolt = <1050000>;
249					bias-pull-down;
250				};
251
252				l22 {
253					regulator-min-microvolt = <2600000>;
254					regulator-max-microvolt = <2600000>;
255					bias-pull-down;
256				};
257
258				l23 {
259					regulator-min-microvolt = <1800000>;
260					regulator-max-microvolt = <1800000>;
261					bias-pull-down;
262				};
263
264				l24 {
265					regulator-min-microvolt = <750000>;
266					regulator-max-microvolt = <1150000>;
267					bias-pull-down;
268				};
269
270				l25 {
271					regulator-always-on;
272					regulator-min-microvolt = <1250000>;
273					regulator-max-microvolt = <1250000>;
274					bias-pull-down;
275				};
276
277				l27 {
278					regulator-min-microvolt = <1100000>;
279					regulator-max-microvolt = <1100000>;
280				};
281
282				l28 {
283					regulator-min-microvolt = <1050000>;
284					regulator-max-microvolt = <1050000>;
285					bias-pull-down;
286				};
287
288				l29 {
289					regulator-min-microvolt = <2000000>;
290					regulator-max-microvolt = <2000000>;
291					bias-pull-down;
292				};
293
294				/* Low Voltage Switch */
295				lvs1 {
296					bias-pull-down;
297				};
298
299				lvs2 {
300					bias-pull-down;
301				};
302
303				lvs3 {
304					bias-pull-down;
305				};
306
307				lvs4 {
308					bias-pull-down;
309				};
310
311				lvs5 {
312					bias-pull-down;
313				};
314
315				lvs6 {
316					bias-pull-down;
317				};
318
319				lvs7 {
320					bias-pull-down;
321				};
322
323				usb-switch {};
324
325				hdmi-switch {};
326
327				ncp {
328					regulator-min-microvolt = <1800000>;
329					regulator-max-microvolt = <1800000>;
330					qcom,switch-mode-frequency = <1600000>;
331				};
332			};
333		};
334
335		qcom,ssbi@500000 {
336			pmic@0 {
337				gpio@150 {
338					gpio_keys_pin_a: gpio-keys-pin-active {
339						pins = "gpio3", "gpio4", "gpio29", "gpio35";
340						function = "normal";
341
342						bias-pull-up;
343						drive-push-pull;
344						input-enable;
345						power-source = <2>;
346						qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
347						qcom,pull-up-strength = <0>;
348					};
349				};
350			};
351		};
352
353		usb@12500000 {
 
 
 
 
 
 
 
354			status = "okay";
355			dr_mode = "otg";
356			ulpi {
357				phy {
358					v3p3-supply = <&pm8921_l3>;
359					v1p8-supply = <&pm8921_l4>;
360				};
361			};
362		};
363
364		gsbi@1a200000 {
365			status = "ok";
366			qcom,mode = <GSBI_PROT_I2C_UART>;
367
368			serial@1a240000 {
369				status = "ok";
370
371				pinctrl-names = "default";
372				pinctrl-0 = <&gsbi5_uart_pin_a>;
373			};
374		};
375
376		amba {
377			sdcc1: sdcc@12400000 {
378				status = "okay";
379
380				vmmc-supply = <&pm8921_l5>;
381				vqmmc-supply = <&pm8921_s4>;
 
 
 
382			};
383
384			sdcc3: sdcc@12180000 {
385				status = "okay";
386
387				vmmc-supply = <&pm8921_l6>;
388				cd-gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
389
390				pinctrl-names = "default";
391				pinctrl-0 = <&sdcc3_pins>, <&sdcc3_cd_pin_a>;
392			};
393		};
394
395		riva-pil@3204000 {
396			status = "okay";
397
398			pinctrl-names = "default";
399			pinctrl-0 = <&riva_wlan_pin_a>, <&riva_bt_pin_a>, <&riva_fm_pin_a>;
400		};
401	};
402};
v4.6
 
  1#include "qcom-apq8064-v2.0.dtsi"
  2#include <dt-bindings/gpio/gpio.h>
  3#include <dt-bindings/input/input.h>
  4#include <dt-bindings/mfd/qcom-rpm.h>
  5#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  6
  7/ {
  8	model = "Sony Xperia Z";
  9	compatible = "sony,xperia-yuga", "qcom,apq8064";
 10
 11	aliases {
 12		serial0 = &gsbi5_serial;
 13	};
 14
 15	chosen {
 16		stdout-path = "serial0:115200n8";
 17	};
 18
 19	gpio-keys {
 20		compatible = "gpio-keys";
 21		input-name = "gpio-keys";
 22
 23		pinctrl-names = "default";
 24		pinctrl-0 = <&gpio_keys_pin_a>;
 25
 26		camera-focus {
 27			label = "camera_focus";
 28			gpios = <&pm8921_gpio 3 GPIO_ACTIVE_LOW>;
 29			linux,input-type = <1>;
 30			linux,code = <KEY_CAMERA_FOCUS>;
 31		};
 32
 33		camera-snapshot {
 34			label = "camera_snapshot";
 35			gpios = <&pm8921_gpio 4 GPIO_ACTIVE_LOW>;
 36			linux,input-type = <1>;
 37			linux,code = <KEY_CAMERA>;
 38		};
 39
 40		volume-down {
 41			label = "volume_down";
 42			gpios = <&pm8921_gpio 29 GPIO_ACTIVE_LOW>;
 43			linux,input-type = <1>;
 44			linux,code = <KEY_VOLUMEDOWN>;
 45		};
 46
 47		volume-up {
 48			label = "volume_up";
 49			gpios = <&pm8921_gpio 35 GPIO_ACTIVE_LOW>;
 50			linux,input-type = <1>;
 51			linux,code = <KEY_VOLUMEUP>;
 52		};
 53	};
 54
 55	soc {
 56		pinctrl@800000 {
 57			gsbi5_uart_pin_a: gsbi5-uart-pin-active {
 58				rx {
 59					pins = "gpio52";
 60					function = "gsbi5";
 61					drive-strength = <2>;
 62					bias-pull-up;
 63				};
 64
 65				tx {
 66					pins = "gpio51";
 67					function = "gsbi5";
 68					drive-strength = <4>;
 69					bias-disable;
 70				};
 71			};
 72
 73			sdcc1_pin_a: sdcc1-pin-active {
 74				clk {
 75					pins = "sdc1_clk";
 76					drive-strengh = <16>;
 77					bias-disable;
 78				};
 79
 80				cmd {
 81					pins = "sdc1_cmd";
 82					drive-strengh = <10>;
 83					bias-pull-up;
 84				};
 85
 86				data {
 87					pins = "sdc1_data";
 88					drive-strengh = <10>;
 89					bias-pull-up;
 90				};
 91			};
 92
 93			sdcc3_pin_a: sdcc3-pin-active {
 94				clk {
 95					pins = "sdc3_clk";
 96					drive-strengh = <8>;
 97					bias-disable;
 98				};
 99
100				cmd {
101					pins = "sdc3_cmd";
102					drive-strengh = <8>;
103					bias-pull-up;
104				};
105
106				data {
107					pins = "sdc3_data";
108					drive-strengh = <8>;
109					bias-pull-up;
110				};
111			};
112
113			sdcc3_cd_pin_a: sdcc3-cd-pin-active {
114				pins = "gpio26";
115				function = "gpio";
116
117				drive-strength = <2>;
118				bias-disable;
119			};
120		};
121
122
123		rpm@108000 {
124			regulators {
125				vin_l1_l2_l12_l18-supply = <&pm8921_s4>;
126				vin_lvs_1_3_6-supply = <&pm8921_s4>;
127				vin_lvs_4_5_7-supply = <&pm8921_s4>;
128				vin_ncp-supply = <&pm8921_l6>;
129				vin_lvs2-supply = <&pm8921_s4>;
130				vin_l24-supply = <&pm8921_s1>;
131				vin_l25-supply = <&pm8921_s1>;
132				vin_l27-supply = <&pm8921_s7>;
133				vin_l28-supply = <&pm8921_s7>;
134
135				/* Buck SMPS */
136				s1 {
137					regulator-always-on;
138					regulator-min-microvolt = <1225000>;
139					regulator-max-microvolt = <1225000>;
140					qcom,switch-mode-frequency = <3200000>;
141					bias-pull-down;
142				};
143
144				s2 {
145					regulator-min-microvolt = <1300000>;
146					regulator-max-microvolt = <1300000>;
147					qcom,switch-mode-frequency = <1600000>;
148					bias-pull-down;
149				};
150
151				s3 {
152					regulator-min-microvolt = <500000>;
153					regulator-max-microvolt = <1150000>;
154					qcom,switch-mode-frequency = <4800000>;
155					bias-pull-down;
156				};
157
158				s4 {
159					regulator-always-on;
160					regulator-min-microvolt = <1800000>;
161					regulator-max-microvolt = <1800000>;
162					qcom,switch-mode-frequency = <1600000>;
163					bias-pull-down;
164					qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
165				};
166
167				s7 {
168					regulator-min-microvolt = <1300000>;
169					regulator-max-microvolt = <1300000>;
170					qcom,switch-mode-frequency = <3200000>;
171				};
172
173				s8 {
174					regulator-min-microvolt = <2200000>;
175					regulator-max-microvolt = <2200000>;
176					qcom,switch-mode-frequency = <1600000>;
177				};
178
179				/* PMOS LDO */
180				l1 {
181					regulator-always-on;
182					regulator-min-microvolt = <1100000>;
183					regulator-max-microvolt = <1100000>;
184					bias-pull-down;
185				};
186
187				l2 {
188					regulator-min-microvolt = <1200000>;
189					regulator-max-microvolt = <1200000>;
190					bias-pull-down;
191				};
192
193				l3 {
194					regulator-min-microvolt = <3075000>;
195					regulator-max-microvolt = <3075000>;
196					bias-pull-down;
197				};
198
199				l4 {
200					regulator-always-on;
201					regulator-min-microvolt = <1800000>;
202					regulator-max-microvolt = <1800000>;
203					bias-pull-down;
204				};
205
206				l5 {
207					regulator-min-microvolt = <2950000>;
208					regulator-max-microvolt = <2950000>;
209					bias-pull-down;
210				};
211
212				l6 {
213					regulator-min-microvolt = <2950000>;
214					regulator-max-microvolt = <2950000>;
215					bias-pull-down;
216				};
217
218				l7 {
219					regulator-min-microvolt = <1850000>;
220					regulator-max-microvolt = <2950000>;
221					bias-pull-down;
222				};
223
224				l8 {
225					regulator-min-microvolt = <2800000>;
226					regulator-max-microvolt = <2800000>;
227					bias-pull-down;
228				};
229
230				l9 {
231					regulator-min-microvolt = <3000000>;
232					regulator-max-microvolt = <3000000>;
233					bias-pull-down;
234				};
235
236				l10 {
237					regulator-min-microvolt = <2900000>;
238					regulator-max-microvolt = <2900000>;
239					bias-pull-down;
240				};
241
242				l11 {
243					regulator-min-microvolt = <3000000>;
244					regulator-max-microvolt = <3000000>;
245					bias-pull-down;
246				};
247
248				l12 {
249					regulator-min-microvolt = <1200000>;
250					regulator-max-microvolt = <1200000>;
251					bias-pull-down;
252				};
253
254				l14 {
255					regulator-min-microvolt = <1800000>;
256					regulator-max-microvolt = <1800000>;
257					bias-pull-down;
258				};
259
260				l15 {
261					regulator-min-microvolt = <1800000>;
262					regulator-max-microvolt = <2950000>;
263					bias-pull-down;
264				};
265
266				l16 {
267					regulator-min-microvolt = <2800000>;
268					regulator-max-microvolt = <2800000>;
269					bias-pull-down;
270				};
271
272				l17 {
273					regulator-min-microvolt = <2000000>;
274					regulator-max-microvolt = <2000000>;
275					bias-pull-down;
276				};
277
278				l18 {
279					regulator-min-microvolt = <1200000>;
280					regulator-max-microvolt = <1200000>;
281					bias-pull-down;
282				};
283
284				l21 {
285					regulator-min-microvolt = <1050000>;
286					regulator-max-microvolt = <1050000>;
287					bias-pull-down;
288				};
289
290				l22 {
291					regulator-min-microvolt = <2600000>;
292					regulator-max-microvolt = <2600000>;
293					bias-pull-down;
294				};
295
296				l23 {
297					regulator-min-microvolt = <1800000>;
298					regulator-max-microvolt = <1800000>;
299					bias-pull-down;
300				};
301
302				l24 {
303					regulator-min-microvolt = <750000>;
304					regulator-max-microvolt = <1150000>;
305					bias-pull-down;
306				};
307
308				l25 {
309					regulator-always-on;
310					regulator-min-microvolt = <1250000>;
311					regulator-max-microvolt = <1250000>;
312					bias-pull-down;
313				};
314
315				l27 {
316					regulator-min-microvolt = <1100000>;
317					regulator-max-microvolt = <1100000>;
318				};
319
320				l28 {
321					regulator-min-microvolt = <1050000>;
322					regulator-max-microvolt = <1050000>;
323					bias-pull-down;
324				};
325
326				l29 {
327					regulator-min-microvolt = <2000000>;
328					regulator-max-microvolt = <2000000>;
329					bias-pull-down;
330				};
331
332				/* Low Voltage Switch */
333				lvs1 {
334					bias-pull-down;
335				};
336
337				lvs2 {
338					bias-pull-down;
339				};
340
341				lvs3 {
342					bias-pull-down;
343				};
344
345				lvs4 {
346					bias-pull-down;
347				};
348
349				lvs5 {
350					bias-pull-down;
351				};
352
353				lvs6 {
354					bias-pull-down;
355				};
356
357				lvs7 {
358					bias-pull-down;
359				};
360
361				usb-switch {};
362
363				hdmi-switch {};
364
365				ncp {
366					regulator-min-microvolt = <1800000>;
367					regulator-max-microvolt = <1800000>;
368					qcom,switch-mode-frequency = <1600000>;
369				};
370			};
371		};
372
373		qcom,ssbi@500000 {
374			pmic@0 {
375				gpio@150 {
376					gpio_keys_pin_a: gpio-keys-pin-active {
377						pins = "gpio3", "gpio4", "gpio29", "gpio35";
378						function = "normal";
379
380						bias-pull-up;
381						drive-push-pull;
382						input-enable;
383						power-source = <2>;
384						qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
385						qcom,pull-up-strength = <0>;
386					};
387				};
388			};
389		};
390
391		phy@12500000 {
392			status		= "okay";
393			vddcx-supply	= <&pm8921_s3>;
394			v3p3-supply	= <&pm8921_l3>;
395			v1p8-supply	= <&pm8921_l4>;
396		};
397
398		gadget@12500000 {
399			status = "okay";
 
 
 
 
 
 
 
400		};
401
402		gsbi@1a200000 {
403			status = "ok";
404			qcom,mode = <GSBI_PROT_I2C_UART>;
405
406			serial@1a240000 {
407				status = "ok";
408
409				pinctrl-names = "default";
410				pinctrl-0 = <&gsbi5_uart_pin_a>;
411			};
412		};
413
414		amba {
415			sdcc1: sdcc@12400000 {
416				status = "okay";
417
418				vmmc-supply = <&pm8921_l5>;
419				vqmmc-supply = <&pm8921_s4>;
420
421				pinctrl-names = "default";
422				pinctrl-0 = <&sdcc1_pin_a>;
423			};
424
425			sdcc3: sdcc@12180000 {
426				status = "okay";
427
428				vmmc-supply = <&pm8921_l6>;
429				cd-gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
430
431				pinctrl-names = "default";
432				pinctrl-0 = <&sdcc3_pin_a>, <&sdcc3_cd_pin_a>;
433			};
 
 
 
 
 
 
 
434		};
435	};
436};