Linux Audio

Check our new training course

Loading...
v5.4
  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.10.11
 
  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
 74			sdcc3_cd_pin_a: sdcc3-cd-pin-active {
 75				pins = "gpio26";
 76				function = "gpio";
 77
 78				drive-strength = <2>;
 79				bias-disable;
 80			};
 81		};
 82
 83
 84		rpm@108000 {
 85			regulators {
 86				vin_l1_l2_l12_l18-supply = <&pm8921_s4>;
 87				vin_lvs_1_3_6-supply = <&pm8921_s4>;
 88				vin_lvs_4_5_7-supply = <&pm8921_s4>;
 89				vin_ncp-supply = <&pm8921_l6>;
 90				vin_lvs2-supply = <&pm8921_s4>;
 91				vin_l24-supply = <&pm8921_s1>;
 92				vin_l25-supply = <&pm8921_s1>;
 93				vin_l27-supply = <&pm8921_s7>;
 94				vin_l28-supply = <&pm8921_s7>;
 95
 96				/* Buck SMPS */
 97				s1 {
 98					regulator-always-on;
 99					regulator-min-microvolt = <1225000>;
100					regulator-max-microvolt = <1225000>;
101					qcom,switch-mode-frequency = <3200000>;
102					bias-pull-down;
103				};
104
105				s2 {
106					regulator-min-microvolt = <1300000>;
107					regulator-max-microvolt = <1300000>;
108					qcom,switch-mode-frequency = <1600000>;
109					bias-pull-down;
110				};
111
112				s3 {
113					regulator-min-microvolt = <500000>;
114					regulator-max-microvolt = <1150000>;
115					qcom,switch-mode-frequency = <4800000>;
116					bias-pull-down;
117				};
118
119				s4 {
120					regulator-always-on;
121					regulator-min-microvolt = <1800000>;
122					regulator-max-microvolt = <1800000>;
123					qcom,switch-mode-frequency = <1600000>;
124					bias-pull-down;
125					qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
126				};
127
128				s7 {
129					regulator-min-microvolt = <1300000>;
130					regulator-max-microvolt = <1300000>;
131					qcom,switch-mode-frequency = <3200000>;
132				};
133
134				s8 {
135					regulator-min-microvolt = <2200000>;
136					regulator-max-microvolt = <2200000>;
137					qcom,switch-mode-frequency = <1600000>;
138				};
139
140				/* PMOS LDO */
141				l1 {
142					regulator-always-on;
143					regulator-min-microvolt = <1100000>;
144					regulator-max-microvolt = <1100000>;
145					bias-pull-down;
146				};
147
148				l2 {
149					regulator-min-microvolt = <1200000>;
150					regulator-max-microvolt = <1200000>;
151					bias-pull-down;
152				};
153
154				l3 {
155					regulator-min-microvolt = <3075000>;
156					regulator-max-microvolt = <3075000>;
157					bias-pull-down;
158				};
159
160				l4 {
161					regulator-always-on;
162					regulator-min-microvolt = <1800000>;
163					regulator-max-microvolt = <1800000>;
164					bias-pull-down;
165				};
166
167				l5 {
168					regulator-min-microvolt = <2950000>;
169					regulator-max-microvolt = <2950000>;
170					bias-pull-down;
171				};
172
173				l6 {
174					regulator-min-microvolt = <2950000>;
175					regulator-max-microvolt = <2950000>;
176					bias-pull-down;
177				};
178
179				l7 {
180					regulator-min-microvolt = <1850000>;
181					regulator-max-microvolt = <2950000>;
182					bias-pull-down;
183				};
184
185				l8 {
186					regulator-min-microvolt = <2800000>;
187					regulator-max-microvolt = <2800000>;
188					bias-pull-down;
189				};
190
191				l9 {
192					regulator-min-microvolt = <3000000>;
193					regulator-max-microvolt = <3000000>;
194					bias-pull-down;
195				};
196
197				l10 {
198					regulator-min-microvolt = <2900000>;
199					regulator-max-microvolt = <2900000>;
200					bias-pull-down;
201				};
202
203				l11 {
204					regulator-min-microvolt = <3000000>;
205					regulator-max-microvolt = <3000000>;
206					bias-pull-down;
207				};
208
209				l12 {
210					regulator-min-microvolt = <1200000>;
211					regulator-max-microvolt = <1200000>;
212					bias-pull-down;
213				};
214
215				l14 {
216					regulator-min-microvolt = <1800000>;
217					regulator-max-microvolt = <1800000>;
218					bias-pull-down;
219				};
220
221				l15 {
222					regulator-min-microvolt = <1800000>;
223					regulator-max-microvolt = <2950000>;
224					bias-pull-down;
225				};
226
227				l16 {
228					regulator-min-microvolt = <2800000>;
229					regulator-max-microvolt = <2800000>;
230					bias-pull-down;
231				};
232
233				l17 {
234					regulator-min-microvolt = <2000000>;
235					regulator-max-microvolt = <2000000>;
236					bias-pull-down;
237				};
238
239				l18 {
240					regulator-min-microvolt = <1200000>;
241					regulator-max-microvolt = <1200000>;
242					bias-pull-down;
243				};
244
245				l21 {
246					regulator-min-microvolt = <1050000>;
247					regulator-max-microvolt = <1050000>;
248					bias-pull-down;
249				};
250
251				l22 {
252					regulator-min-microvolt = <2600000>;
253					regulator-max-microvolt = <2600000>;
254					bias-pull-down;
255				};
256
257				l23 {
258					regulator-min-microvolt = <1800000>;
259					regulator-max-microvolt = <1800000>;
260					bias-pull-down;
261				};
262
263				l24 {
264					regulator-min-microvolt = <750000>;
265					regulator-max-microvolt = <1150000>;
266					bias-pull-down;
267				};
268
269				l25 {
270					regulator-always-on;
271					regulator-min-microvolt = <1250000>;
272					regulator-max-microvolt = <1250000>;
273					bias-pull-down;
274				};
275
276				l27 {
277					regulator-min-microvolt = <1100000>;
278					regulator-max-microvolt = <1100000>;
279				};
280
281				l28 {
282					regulator-min-microvolt = <1050000>;
283					regulator-max-microvolt = <1050000>;
284					bias-pull-down;
285				};
286
287				l29 {
288					regulator-min-microvolt = <2000000>;
289					regulator-max-microvolt = <2000000>;
290					bias-pull-down;
291				};
292
293				/* Low Voltage Switch */
294				lvs1 {
295					bias-pull-down;
296				};
297
298				lvs2 {
299					bias-pull-down;
300				};
301
302				lvs3 {
303					bias-pull-down;
304				};
305
306				lvs4 {
307					bias-pull-down;
308				};
309
310				lvs5 {
311					bias-pull-down;
312				};
313
314				lvs6 {
315					bias-pull-down;
316				};
317
318				lvs7 {
319					bias-pull-down;
320				};
321
322				usb-switch {};
323
324				hdmi-switch {};
325
326				ncp {
327					regulator-min-microvolt = <1800000>;
328					regulator-max-microvolt = <1800000>;
329					qcom,switch-mode-frequency = <1600000>;
330				};
331			};
332		};
333
334		qcom,ssbi@500000 {
335			pmic@0 {
336				gpio@150 {
337					gpio_keys_pin_a: gpio-keys-pin-active {
338						pins = "gpio3", "gpio4", "gpio29", "gpio35";
339						function = "normal";
340
341						bias-pull-up;
342						drive-push-pull;
343						input-enable;
344						power-source = <2>;
345						qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
346						qcom,pull-up-strength = <0>;
347					};
348				};
349			};
350		};
351
352		phy@12500000 {
353			status		= "okay";
354			vddcx-supply	= <&pm8921_s3>;
355			v3p3-supply	= <&pm8921_l3>;
356			v1p8-supply	= <&pm8921_l4>;
357		};
358
359		gadget@12500000 {
360			status = "okay";
 
 
 
 
 
 
 
361		};
362
363		gsbi@1a200000 {
364			status = "ok";
365			qcom,mode = <GSBI_PROT_I2C_UART>;
366
367			serial@1a240000 {
368				status = "ok";
369
370				pinctrl-names = "default";
371				pinctrl-0 = <&gsbi5_uart_pin_a>;
372			};
373		};
374
375		amba {
376			sdcc1: sdcc@12400000 {
377				status = "okay";
378
379				vmmc-supply = <&pm8921_l5>;
380				vqmmc-supply = <&pm8921_s4>;
381			};
382
383			sdcc3: sdcc@12180000 {
384				status = "okay";
385
386				vmmc-supply = <&pm8921_l6>;
387				cd-gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
388
389				pinctrl-names = "default";
390				pinctrl-0 = <&sdcc3_pins>, <&sdcc3_cd_pin_a>;
391			};
 
 
 
 
 
 
 
392		};
393	};
394};