1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
8 #include "msm8916-pm8916.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
12 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
13 #include <dt-bindings/sound/apq8016-lpass.h>
16 model = "Qualcomm Technologies, Inc. APQ 8016 SBC";
17 compatible = "qcom,apq8016-sbc", "qcom,apq8016";
20 serial0 = &blsp1_uart2;
21 serial1 = &blsp1_uart1;
31 stdout-path = "serial0";
34 camera_vdddo_1v8: camera-vdddo-1v8 {
35 compatible = "regulator-fixed";
36 regulator-name = "camera_vdddo";
37 regulator-min-microvolt = <1800000>;
38 regulator-max-microvolt = <1800000>;
42 camera_vdda_2v8: camera-vdda-2v8 {
43 compatible = "regulator-fixed";
44 regulator-name = "camera_vdda";
45 regulator-min-microvolt = <2800000>;
46 regulator-max-microvolt = <2800000>;
50 camera_vddd_1v5: camera-vddd-1v5 {
51 compatible = "regulator-fixed";
52 regulator-name = "camera_vddd";
53 regulator-min-microvolt = <1500000>;
54 regulator-max-microvolt = <1500000>;
60 compatible = "ramoops";
61 reg = <0x0 0xbff00000 0x0 0x100000>;
63 record-size = <0x20000>;
64 console-size = <0x20000>;
65 ftrace-size = <0x20000>;
70 compatible = "smsc,usb3503";
71 reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
76 compatible = "linux,extcon-usb-gpio";
77 id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&usb_id_default>;
83 compatible = "hdmi-connector";
88 remote-endpoint = <&adv7533_out>;
94 compatible = "gpio-keys";
99 pinctrl-names = "default";
100 pinctrl-0 = <&msm_key_volp_n_default>;
104 linux,code = <KEY_VOLUMEUP>;
105 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&msmgpio_leds>,
112 <&pm8916_gpios_leds>,
115 compatible = "gpio-leds";
118 label = "apq8016-sbc:green:user1";
119 gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
120 linux,default-trigger = "heartbeat";
121 default-state = "off";
125 label = "apq8016-sbc:green:user2";
126 gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
127 linux,default-trigger = "mmc0";
128 default-state = "off";
132 label = "apq8016-sbc:green:user3";
133 gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
134 linux,default-trigger = "mmc1";
135 default-state = "off";
139 label = "apq8016-sbc:green:user4";
140 gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
141 linux,default-trigger = "none";
143 default-state = "off";
147 label = "apq8016-sbc:yellow:wlan";
148 gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
149 linux,default-trigger = "phy0tx";
150 default-state = "off";
154 label = "apq8016-sbc:blue:bt";
155 gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
156 linux,default-trigger = "bluetooth-power";
157 default-state = "off";
167 /* On Low speed expansion */
173 /* On High speed expansion */
177 adv_bridge: bridge@39 {
180 compatible = "adi,adv7533";
183 interrupt-parent = <&msmgpio>;
184 interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
187 clocks = <&rpmcc RPM_SMD_BB_CLK2>;
190 pd-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
192 avdd-supply = <&pm8916_l6>;
193 v1p2-supply = <&pm8916_l6>;
194 v3p3-supply = <&pm8916_l17>;
196 pinctrl-names = "default","sleep";
197 pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
198 pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
199 #sound-dai-cells = <1>;
202 #address-cells = <1>;
207 adv7533_in: endpoint {
208 remote-endpoint = <&dsi0_out>;
214 adv7533_out: endpoint {
215 remote-endpoint = <&hdmi_con>;
223 /* On Low speed expansion */
229 /* On High speed expansion */
235 /* On Low speed expansion */
255 csiphy0_ep: endpoint {
258 remote-endpoint = <&ov5640_ep>;
271 compatible = "ovti,ov5640";
274 enable-gpios = <&msmgpio 34 GPIO_ACTIVE_HIGH>;
275 reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
276 pinctrl-names = "default";
277 pinctrl-0 = <&camera_rear_default>;
279 clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
280 clock-names = "xclk";
281 clock-frequency = <23880000>;
283 vdddo-supply = <&camera_vdddo_1v8>;
284 vdda-supply = <&camera_vdda_2v8>;
285 vddd-supply = <&camera_vddd_1v5>;
287 /* No camera mezzanine by default */
291 ov5640_ep: endpoint {
294 remote-endpoint = <&csiphy0_ep>;
301 data-lanes = <0 1 2 3>;
302 remote-endpoint = <&adv7533_in>;
316 firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn";
321 linux,code = <KEY_VOLUMEDOWN>;
327 firmware-name = "qcom/apq8016/wcnss.mbn";
333 pinctrl-names = "default", "sleep";
334 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
335 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
341 pinctrl-names = "default", "sleep";
342 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
343 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
345 cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
351 pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
352 pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
353 pinctrl-names = "default", "sleep";
354 qcom,model = "DB410c";
356 "AMIC2", "MIC BIAS Internal2",
357 "AMIC3", "MIC BIAS External1";
359 external-dai-link@0 {
360 link-name = "ADV7533";
362 sound-dai = <&lpass MI2S_QUATERNARY>;
365 sound-dai = <&adv_bridge 0>;
369 internal-codec-playback-dai-link@0 {
372 sound-dai = <&lpass MI2S_PRIMARY>;
375 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
379 internal-codec-capture-dai-link@0 {
380 link-name = "WCD-Capture";
382 sound-dai = <&lpass MI2S_TERTIARY>;
385 sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
392 extcon = <&usb_id>, <&usb_id>;
394 pinctrl-names = "default", "device";
395 pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
396 pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
404 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
405 clock-names = "mclk";
406 qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
407 qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
411 firmware-name = "qcom/apq8016/WCNSS_qcom_wlan_nv_sbc.bin";
414 /* Enable CoreSight */
415 &cti0 { status = "okay"; };
416 &cti1 { status = "okay"; };
417 &cti12 { status = "okay"; };
418 &cti13 { status = "okay"; };
419 &cti14 { status = "okay"; };
420 &cti15 { status = "okay"; };
421 &debug0 { status = "okay"; };
422 &debug1 { status = "okay"; };
423 &debug2 { status = "okay"; };
424 &debug3 { status = "okay"; };
425 &etf { status = "okay"; };
426 &etm0 { status = "okay"; };
427 &etm1 { status = "okay"; };
428 &etm2 { status = "okay"; };
429 &etm3 { status = "okay"; };
430 &etr { status = "okay"; };
431 &funnel0 { status = "okay"; };
432 &funnel1 { status = "okay"; };
433 &replicator { status = "okay"; };
434 &stm { status = "okay"; };
435 &tpiu { status = "okay"; };
437 &smd_rpm_regulators {
438 vdd_l1_l2_l3-supply = <&pm8916_s3>;
439 vdd_l4_l5_l6-supply = <&pm8916_s4>;
440 vdd_l7-supply = <&pm8916_s4>;
443 regulator-min-microvolt = <375000>;
444 regulator-max-microvolt = <1562000>;
448 regulator-min-microvolt = <1800000>;
449 regulator-max-microvolt = <1800000>;
456 regulator-min-microvolt = <375000>;
457 regulator-max-microvolt = <1525000>;
461 regulator-min-microvolt = <1200000>;
462 regulator-max-microvolt = <1200000>;
466 regulator-min-microvolt = <1750000>;
467 regulator-max-microvolt = <3337000>;
471 regulator-min-microvolt = <1750000>;
472 regulator-max-microvolt = <3337000>;
476 regulator-min-microvolt = <1800000>;
477 regulator-max-microvolt = <1800000>;
481 regulator-min-microvolt = <1750000>;
482 regulator-max-microvolt = <3337000>;
486 regulator-min-microvolt = <1750000>;
487 regulator-max-microvolt = <3337000>;
491 regulator-min-microvolt = <1750000>;
492 regulator-max-microvolt = <3337000>;
496 regulator-min-microvolt = <1750000>;
497 regulator-max-microvolt = <3337000>;
501 regulator-min-microvolt = <1750000>;
502 regulator-max-microvolt = <3337000>;
503 regulator-allow-set-load;
504 regulator-system-load = <200000>;
508 regulator-min-microvolt = <1750000>;
509 regulator-max-microvolt = <3337000>;
513 regulator-min-microvolt = <1750000>;
514 regulator-max-microvolt = <3337000>;
518 regulator-min-microvolt = <1750000>;
519 regulator-max-microvolt = <3337000>;
523 * 1.8v required on LS expansion
524 * for mezzanine boards
527 regulator-min-microvolt = <1750000>;
528 regulator-max-microvolt = <3337000>;
533 regulator-min-microvolt = <1750000>;
534 regulator-max-microvolt = <3337000>;
538 regulator-min-microvolt = <3300000>;
539 regulator-max-microvolt = <3300000>;
543 regulator-min-microvolt = <1750000>;
544 regulator-max-microvolt = <3337000>;
549 * 2mA drive strength is not enough when connecting multiple
550 * I2C devices with different pull up resistors.
553 drive-strength = <16>;
557 drive-strength = <16>;
561 drive-strength = <16>;
565 * GPIO name legend: proper name = the GPIO line is used as GPIO
566 * NC = not connected (pin out but not routed from the chip to
567 * anything the board)
568 * "[PER]" = pin is muxed for [peripheral] (not GPIO)
569 * LSEC = Low Speed External Connector
570 * HSEC = High Speed External Connector
572 * Line names are taken from the schematic "DragonBoard410c"
573 * dated monday, august 31, 2015. Page 5 in particular.
575 * For the lines routed to the external connectors the
576 * lines are named after the 96Boards CE Specification 1.0,
577 * Appendix "Expansion Connector Signal Description".
579 * When the 96Board naming of a line and the schematic name of
580 * the same line are in conflict, the 96Board specification
581 * takes precedence, which means that the external UART on the
582 * LSEC is named UART0 while the schematic and SoC names this
583 * UART3. This is only for the informational lines i.e. "[FOO]",
584 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
585 * ones actually used for GPIO.
590 "[UART0_TX]", /* GPIO_0, LSEC pin 5 */
591 "[UART0_RX]", /* GPIO_1, LSEC pin 7 */
592 "[UART0_CTS_N]", /* GPIO_2, LSEC pin 3 */
593 "[UART0_RTS_N]", /* GPIO_3, LSEC pin 9 */
594 "[UART1_TX]", /* GPIO_4, LSEC pin 11 */
595 "[UART1_RX]", /* GPIO_5, LSEC pin 13 */
596 "[I2C0_SDA]", /* GPIO_8, LSEC pin 17 */
597 "[I2C0_SCL]", /* GPIO_7, LSEC pin 15 */
598 "[SPI1_DOUT]", /* SPI1_MOSI, HSEC pin 1 */
599 "[SPI1_DIN]", /* SPI1_MISO, HSEC pin 11 */
600 "[SPI1_CS]", /* SPI1_CS_N, HSEC pin 7 */
601 "[SPI1_SCLK]", /* SPI1_CLK, HSEC pin 9 */
602 "GPIO-B", /* LS_EXP_GPIO_B, LSEC pin 24 */
603 "GPIO-C", /* LS_EXP_GPIO_C, LSEC pin 25 */
604 "[I2C3_SDA]", /* HSEC pin 38 */
605 "[I2C3_SCL]", /* HSEC pin 36 */
606 "[SPI0_MOSI]", /* LSEC pin 14 */
607 "[SPI0_MISO]", /* LSEC pin 10 */
608 "[SPI0_CS_N]", /* LSEC pin 12 */
609 "[SPI0_CLK]", /* LSEC pin 8 */
610 "HDMI_HPD_N", /* GPIO 20 */
612 "[I2C1_SDA]", /* GPIO_22, LSEC pin 21 */
613 "[I2C1_SCL]", /* GPIO_23, LSEC pin 19 */
614 "GPIO-G", /* LS_EXP_GPIO_G, LSEC pin 29 */
615 "GPIO-H", /* LS_EXP_GPIO_H, LSEC pin 30 */
616 "[CSI0_MCLK]", /* HSEC pin 15 */
617 "[CSI1_MCLK]", /* HSEC pin 17 */
618 "GPIO-K", /* LS_EXP_GPIO_K, LSEC pin 33 */
619 "[I2C2_SDA]", /* HSEC pin 34 */
620 "[I2C2_SCL]", /* HSEC pin 32 */
623 "GPIO-L", /* LS_EXP_GPIO_L, LSEC pin 34 */
624 "GPIO-J", /* LS_EXP_GPIO_J, LSEC pin 32 */
625 "GPIO-I", /* LS_EXP_GPIO_I, LSEC pin 31 */
626 "GPIO-A", /* LS_EXP_GPIO_A, LSEC pin 23 */
630 "[WCSS_WLAN_DATA_2]", /* GPIO 40 */
631 "[WCSS_WLAN_DATA_1]",
632 "[WCSS_WLAN_DATA_0]",
659 "GPIO-D", /* LS_EXP_GPIO_D, LSEC pin 26 */
670 "BOOT_CONFIG_0", /* GPIO 80 */
700 "[LS_EXP_MI2S_WS]", /* GPIO 110 */
704 "[LS_EXP_MI2S_DATA0]",
705 "GPIO-E", /* LS_EXP_GPIO_E, LSEC pin 27 */
707 "[DSI2HDMI_MI2S_WS]",
708 "[DSI2HDMI_MI2S_SCK]",
709 "[DSI2HDMI_MI2S_DATA0]",
710 "USR_LED_2_CTRL", /* GPIO 120 */
713 msmgpio_leds: msmgpio-leds {
714 pins = "gpio21", "gpio120";
720 usb_id_default: usb-id-default {
724 drive-strength = <8>;
729 adv7533_int_active: adv533-int-active {
733 drive-strength = <16>;
737 adv7533_int_suspend: adv7533-int-suspend {
741 drive-strength = <2>;
745 adv7533_switch_active: adv7533-switch-active {
749 drive-strength = <16>;
753 adv7533_switch_suspend: adv7533-switch-suspend {
757 drive-strength = <2>;
761 msm_key_volp_n_default: msm-key-volp-n-default {
765 drive-strength = <8>;
775 "USB_HUB_RESET_N_PM",
778 usb_hub_reset_pm: usb-hub-reset-pm {
780 function = PMIC_GPIO_FUNC_NORMAL;
786 usb_hub_reset_pm_device: usb-hub-reset-pm-device {
788 function = PMIC_GPIO_FUNC_NORMAL;
793 usb_sw_sel_pm: usb-sw-sel-pm {
795 function = PMIC_GPIO_FUNC_NORMAL;
797 power-source = <PM8916_GPIO_VPH>;
802 usb_sw_sel_pm_device: usb-sw-sel-pm-device {
804 function = PMIC_GPIO_FUNC_NORMAL;
806 power-source = <PM8916_GPIO_VPH>;
811 pm8916_gpios_leds: pm8916-gpios-leds {
812 pins = "gpio1", "gpio2";
813 function = PMIC_GPIO_FUNC_NORMAL;
824 "GPIO-F"; /* LS_EXP_GPIO_F, LSEC pin 28 */
826 pinctrl-names = "default";
827 pinctrl-0 = <&ls_exp_gpio_f>;
829 ls_exp_gpio_f: pm8916-mpp4-state {
831 function = "digital";
834 power-source = <PM8916_MPP_L5>; // 1.8V
837 pm8916_mpps_leds: pm8916-mpps-state {
838 pins = "mpp2", "mpp3";
839 function = "digital";