Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/apq8016-schneider-hmibsc.dts

raw
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2024, Linaro Ltd.
5 */
6
7 /dts-v1/;
8
9 #include "msm8916-pm8916.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/leds/common.h>
13 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
14 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
15 #include <dt-bindings/sound/apq8016-lpass.h>
16
17 / {
18 model = "Schneider Electric HMIBSC Board";
19 compatible = "schneider,apq8016-hmibsc", "qcom,apq8016";
20
21 aliases {
22 i2c1 = &blsp_i2c6;
23 i2c3 = &blsp_i2c4;
24 i2c4 = &blsp_i2c3;
25 mmc0 = &sdhc_1; /* eMMC */
26 mmc1 = &sdhc_2; /* SD card */
27 serial0 = &blsp_uart1;
28 serial1 = &blsp_uart2;
29 spi0 = &blsp_spi5;
30 usid0 = &pm8916_0;
31 };
32
33 chosen {
34 stdout-path = "serial0";
35 };
36
37 hdmi-out {
38 compatible = "hdmi-connector";
39 type = "a";
40
41 port {
42 hdmi_con: endpoint {
43 remote-endpoint = <&adv7533_out>;
44 };
45 };
46 };
47
48 gpio-keys {
49 compatible = "gpio-keys";
50 autorepeat;
51 pinctrl-0 = <&msm_key_volp_n_default>;
52 pinctrl-names = "default";
53
54 button {
55 label = "Volume Up";
56 linux,code = <KEY_VOLUMEUP>;
57 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 leds {
62 compatible = "gpio-leds";
63 pinctrl-0 = <&pm8916_mpps_leds>;
64 pinctrl-names = "default";
65
66 led-1 {
67 function = LED_FUNCTION_WLAN;
68 color = <LED_COLOR_ID_YELLOW>;
69 gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
70 linux,default-trigger = "phy0tx";
71 default-state = "off";
72 };
73
74 led-2 {
75 function = LED_FUNCTION_BLUETOOTH;
76 color = <LED_COLOR_ID_BLUE>;
77 gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
78 linux,default-trigger = "bluetooth-power";
79 default-state = "off";
80 };
81 };
82
83 memory@80000000 {
84 reg = <0 0x80000000 0 0x40000000>;
85 };
86
87 reserved-memory {
88 ramoops@bff00000 {
89 compatible = "ramoops";
90 reg = <0x0 0xbff00000 0x0 0x100000>;
91 record-size = <0x20000>;
92 console-size = <0x20000>;
93 ftrace-size = <0x20000>;
94 ecc-size = <16>;
95 };
96 };
97
98 usb-hub {
99 compatible = "smsc,usb3503";
100 reset-gpios = <&pm8916_gpios 1 GPIO_ACTIVE_LOW>;
101 initial-mode = <1>;
102 };
103
104 usb_id: usb-id {
105 compatible = "linux,extcon-usb-gpio";
106 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
107 pinctrl-0 = <&usb_id_default>;
108 pinctrl-names = "default";
109 };
110 };
111
112 &blsp_i2c3 {
113 status = "okay";
114
115 eeprom@50 {
116 compatible = "atmel,24c32";
117 reg = <0x50>;
118 };
119 };
120
121 &blsp_i2c4 {
122 status = "okay";
123
124 adv_bridge: bridge@39 {
125 compatible = "adi,adv7533";
126 reg = <0x39>;
127 interrupts-extended = <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
128
129 adi,dsi-lanes = <4>;
130 clocks = <&rpmcc RPM_SMD_BB_CLK2>;
131 clock-names = "cec";
132 pd-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
133
134 avdd-supply = <&pm8916_l6>;
135 a2vdd-supply = <&pm8916_l6>;
136 dvdd-supply = <&pm8916_l6>;
137 pvdd-supply = <&pm8916_l6>;
138 v1p2-supply = <&pm8916_l6>;
139 v3p3-supply = <&pm8916_l17>;
140
141 pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
142 pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
143 pinctrl-names = "default","sleep";
144 #sound-dai-cells = <0>;
145
146 ports {
147 #address-cells = <1>;
148 #size-cells = <0>;
149
150 port@0 {
151 reg = <0>;
152 adv7533_in: endpoint {
153 remote-endpoint = <&mdss_dsi0_out>;
154 };
155 };
156
157 port@1 {
158 reg = <1>;
159 adv7533_out: endpoint {
160 remote-endpoint = <&hdmi_con>;
161 };
162 };
163 };
164 };
165 };
166
167 &blsp_i2c6 {
168 status = "okay";
169
170 rtc@30 {
171 compatible = "sii,s35390a";
172 reg = <0x30>;
173 };
174
175 eeprom@50 {
176 compatible = "atmel,24c256";
177 reg = <0x50>;
178 };
179 };
180
181 &blsp_spi5 {
182 cs-gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
183 status = "okay";
184
185 tpm@0 {
186 compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
187 reg = <0>;
188 spi-max-frequency = <500000>;
189 };
190 };
191
192 &blsp_uart1 {
193 pinctrl-0 = <&blsp_uart1_default>;
194 pinctrl-1 = <&blsp_uart1_sleep>;
195 pinctrl-names = "default", "sleep";
196 label = "UART0";
197 status = "okay";
198 };
199
200 &blsp_uart2 {
201 pinctrl-0 = <&blsp_uart2_default>;
202 pinctrl-1 = <&blsp_uart2_sleep>;
203 pinctrl-names = "default", "sleep";
204 label = "UART1";
205 status = "okay";
206 };
207
208 &lpass {
209 status = "okay";
210 };
211
212 &mdss {
213 status = "okay";
214 };
215
216 &mdss_dsi0_out {
217 data-lanes = <0 1 2 3>;
218 remote-endpoint = <&adv7533_in>;
219 };
220
221 &pm8916_codec {
222 qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
223 qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
224 status = "okay";
225 };
226
227 &pm8916_gpios {
228 gpio-line-names =
229 "USB_HUB_RESET_N_PM",
230 "USB_SW_SEL_PM",
231 "NC",
232 "NC";
233
234 usb_hub_reset_pm: usb-hub-reset-pm-state {
235 pins = "gpio1";
236 function = PMIC_GPIO_FUNC_NORMAL;
237 input-disable;
238 output-high;
239 };
240
241 usb_hub_reset_pm_device: usb-hub-reset-pm-device-state {
242 pins = "gpio1";
243 function = PMIC_GPIO_FUNC_NORMAL;
244 input-disable;
245 output-low;
246 };
247
248 usb_sw_sel_pm: usb-sw-sel-pm-state {
249 pins = "gpio2";
250 function = PMIC_GPIO_FUNC_NORMAL;
251 power-source = <PM8916_GPIO_VPH>;
252 input-disable;
253 output-high;
254 };
255
256 usb_sw_sel_pm_device: usb-sw-sel-pm-device-state {
257 pins = "gpio2";
258 function = PMIC_GPIO_FUNC_NORMAL;
259 power-source = <PM8916_GPIO_VPH>;
260 input-disable;
261 output-low;
262 };
263 };
264
265 &pm8916_mpps {
266 gpio-line-names =
267 "NC",
268 "WLAN_LED_CTRL",
269 "BT_LED_CTRL",
270 "NC";
271
272 pm8916_mpps_leds: pm8916-mpps-state {
273 pins = "mpp2", "mpp3";
274 function = "digital";
275 output-low;
276 };
277 };
278
279 &pm8916_resin {
280 linux,code = <KEY_POWER>;
281 status = "okay";
282 };
283
284 &pm8916_rpm_regulators {
285 pm8916_l17: l17 {
286 regulator-min-microvolt = <3300000>;
287 regulator-max-microvolt = <3300000>;
288 };
289 };
290
291 &sdhc_1 {
292 status = "okay";
293 };
294
295 &sdhc_2 {
296 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
297 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
298 pinctrl-names = "default", "sleep";
299 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
300 status = "okay";
301 };
302
303 &sound {
304 pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
305 pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
306 pinctrl-names = "default", "sleep";
307 model = "HMIBSC";
308 audio-routing =
309 "AMIC2", "MIC BIAS Internal2",
310 "AMIC3", "MIC BIAS External1";
311 status = "okay";
312
313 quaternary-dai-link {
314 link-name = "ADV7533";
315 cpu {
316 sound-dai = <&lpass MI2S_QUATERNARY>;
317 };
318 codec {
319 sound-dai = <&adv_bridge 0>;
320 };
321 };
322
323 primary-dai-link {
324 link-name = "WCD";
325 cpu {
326 sound-dai = <&lpass MI2S_PRIMARY>;
327 };
328 codec {
329 sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>;
330 };
331 };
332
333 tertiary-dai-link {
334 link-name = "WCD-Capture";
335 cpu {
336 sound-dai = <&lpass MI2S_TERTIARY>;
337 };
338 codec {
339 sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>;
340 };
341 };
342 };
343
344 &tlmm {
345 pinctrl-0 = <&uart1_mux0_rs232_high &uart1_mux1_rs232_low>;
346 pinctrl-names = "default";
347
348 adv7533_int_active: adv533-int-active-state {
349 pins = "gpio31";
350 function = "gpio";
351 drive-strength = <16>;
352 bias-disable;
353 };
354
355 adv7533_int_suspend: adv7533-int-suspend-state {
356 pins = "gpio31";
357 function = "gpio";
358 drive-strength = <2>;
359 bias-disable;
360 };
361
362 adv7533_switch_active: adv7533-switch-active-state {
363 pins = "gpio32";
364 function = "gpio";
365 drive-strength = <16>;
366 bias-disable;
367 };
368
369 adv7533_switch_suspend: adv7533-switch-suspend-state {
370 pins = "gpio32";
371 function = "gpio";
372 drive-strength = <2>;
373 bias-disable;
374 };
375
376 blsp_uart1_default: blsp-uart1-default-state {
377 /* TX, RX, CTS_N, RTS_N */
378 pins = "gpio0", "gpio1", "gpio2", "gpio3";
379 function = "blsp_uart1";
380 drive-strength = <16>;
381 bias-disable;
382 bootph-all;
383 };
384
385 blsp_uart1_sleep: blsp-uart1-sleep-state {
386 pins = "gpio0", "gpio1", "gpio2", "gpio3";
387 function = "gpio";
388 drive-strength = <2>;
389 bias-pull-down;
390 };
391
392 blsp_uart2_default: blsp-uart2-default-state {
393 /* TX, RX */
394 pins = "gpio4", "gpio5";
395 function = "blsp_uart2";
396 drive-strength = <16>;
397 bias-disable;
398 };
399
400 blsp_uart2_sleep: blsp-uart2-sleep-state {
401 pins = "gpio4", "gpio5";
402 function = "gpio";
403 drive-strength = <2>;
404 bias-pull-down;
405 };
406
407 msm_key_volp_n_default: msm-key-volp-n-default-state {
408 pins = "gpio107";
409 function = "gpio";
410 drive-strength = <8>;
411 bias-pull-up;
412 };
413
414 sdc2_cd_default: sdc2-cd-default-state {
415 pins = "gpio38";
416 function = "gpio";
417 drive-strength = <2>;
418 bias-disable;
419 };
420
421 /*
422 * UART1 being the debug console supports various modes of
423 * operation (RS-232/485/422) controlled via GPIOs configured
424 * mux as follows:
425 *
426 * gpio100 gpio99 UART mode
427 * 0 0 loopback
428 * 0 1 RS-232
429 * 1 0 RS-485
430 * 1 1 RS-422
431 *
432 * The default mode configured here is RS-232 mode.
433 */
434 uart1_mux0_rs232_high: uart1-mux0-rs232-state {
435 bootph-all;
436 pins = "gpio99";
437 function = "gpio";
438 drive-strength = <16>;
439 bias-disable;
440 output-high;
441 };
442
443 uart1_mux1_rs232_low: uart1-mux1-rs232-state {
444 bootph-all;
445 pins = "gpio100";
446 function = "gpio";
447 drive-strength = <16>;
448 bias-disable;
449 output-low;
450 };
451
452 usb_id_default: usb-id-default-state {
453 pins = "gpio110";
454 function = "gpio";
455 drive-strength = <8>;
456 bias-pull-up;
457 };
458 };
459
460 &usb {
461 extcon = <&usb_id>, <&usb_id>;
462 pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
463 pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
464 pinctrl-names = "default", "device";
465 status = "okay";
466 };
467
468 &usb_hs_phy {
469 extcon = <&usb_id>;
470 };
471
472 &wcnss {
473 firmware-name = "qcom/apq8016/wcnss.mbn";
474 status = "okay";
475 };
476
477 &wcnss_ctrl {
478 firmware-name = "qcom/apq8016/WCNSS_qcom_wlan_nv_sbc.bin";
479 };
480
481 &wcnss_iris {
482 compatible = "qcom,wcn3620";
483 };
484
485 &wcnss_mem {
486 status = "okay";
487 };
488
489 /* PINCTRL - additions to nodes defined in msm8916.dtsi */
490
491 /*
492 * 2mA drive strength is not enough when connecting multiple
493 * I2C devices with different pull up resistors.
494 */
495 &blsp_i2c4_default {
496 drive-strength = <16>;
497 };
498
499 &blsp_i2c6_default {
500 drive-strength = <16>;
501 };
502
503 /* Enable CoreSight */
504 &cti0 { status = "okay"; };
505 &cti1 { status = "okay"; };
506 &cti12 { status = "okay"; };
507 &cti13 { status = "okay"; };
508 &cti14 { status = "okay"; };
509 &cti15 { status = "okay"; };
510 &debug0 { status = "okay"; };
511 &debug1 { status = "okay"; };
512 &debug2 { status = "okay"; };
513 &debug3 { status = "okay"; };
514 &etf { status = "okay"; };
515 &etm0 { status = "okay"; };
516 &etm1 { status = "okay"; };
517 &etm2 { status = "okay"; };
518 &etm3 { status = "okay"; };
519 &etr { status = "okay"; };
520 &funnel0 { status = "okay"; };
521 &funnel1 { status = "okay"; };
522 &replicator { status = "okay"; };
523 &stm { status = "okay"; };
524 &tpiu { status = "okay"; };