1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2020-2023, Linaro Ltd.
10 #include "msm8939.dtsi"
11 #include "msm8939-pm8916.dtsi"
12 #include <dt-bindings/arm/qcom,ids.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
15 #include <dt-bindings/sound/apq8016-lpass.h>
18 model = "Square, Inc. T2 Devkit";
19 compatible = "square,apq8039-t2", "qcom,msm8939";
21 qcom,board-id = <0x53 0x54>;
22 qcom,msm-id = <QCOM_ID_APQ8039 0x30000>;
27 serial0 = &blsp_uart1;
28 serial1 = &blsp_uart2;
32 compatible = "gpio-backlight";
33 pinctrl-0 = <&pinctrl_backlight>;
34 pinctrl-names = "default";
35 gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
39 stdout-path = "serial1:115200n8";
42 vreg_lcd_avdd_reg: lcd-avdd-regulator {
43 compatible = "regulator-fixed";
44 regulator-name = "lcd_avdd";
45 regulator-min-microvolt = <5600000>;
46 regulator-max-microvolt = <5600000>;
47 pinctrl-0 = <&pinctrl_lcd_avdd_reg>;
48 pinctrl-names = "default";
49 gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
50 startup-delay-us = <300>;
54 vreg_lcd_avee_reg: lcd-avee-regulator {
55 compatible = "regulator-fixed";
56 regulator-name = "lcd_avee";
57 regulator-min-microvolt = <5600000>;
58 regulator-max-microvolt = <5600000>;
59 pinctrl-0 = <&pinctrl_lcd_avee_reg>;
60 pinctrl-names = "default";
61 gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
62 startup-delay-us = <300>;
66 vreg_lcd_iovcc_reg: lcd-iovcc-regulator {
67 compatible = "regulator-fixed";
68 regulator-name = "lcd_iovcc";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <1800000>;
71 pinctrl-0 = <&pinctrl_lcd_iovcc_reg>;
72 pinctrl-names = "default";
73 gpio = <&tlmm 9 GPIO_ACTIVE_HIGH>;
74 startup-delay-us = <300>;
91 compatible = "ti,tps6598x";
94 interrupt-parent = <&tlmm>;
95 interrupts = <107 IRQ_TYPE_LEVEL_LOW>;
96 interrupt-names = "irq";
98 pinctrl-names = "default";
99 pinctrl-0 = <&typec_irq>;
101 typec_con: connector {
102 compatible = "usb-c-connector";
107 remote-endpoint = <&otg_ep>;
122 &blsp_uart1_default {
123 pins = "gpio0", "gpio1";
127 pins = "gpio0", "gpio1";
151 qcom,hphl-jack-type-normally-open;
152 qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
153 qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
159 "PM_GPIO1", /* WIFI_GPIO1_PRE */
160 "PM_GPIO2", /* WIFI_GPIO2_PRE */
170 model = "apq8039-square-sndcard";
171 audio-routing = "AMIC2", "MIC BIAS Internal2";
172 pinctrl-names = "default", "sleep";
173 pinctrl-0 = <&cdc_pdm_default>;
174 pinctrl-1 = <&cdc_pdm_sleep>;
176 internal-codec-playback-dai-link {
179 sound-dai = <&lpass MI2S_PRIMARY>;
182 sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>;
186 internal-codec-capture-dai-link {
187 link-name = "WCD-Capture";
189 sound-dai = <&lpass MI2S_TERTIARY>;
192 sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>;
198 * Line names are taken from the schematic of T2, Ver X03.
199 * July 14, 2018. Page 4 in particular.
203 "APQ_UART1_TX", /* GPIO_0 */
213 "APQ_I2C3_SDA", /* GPIO_10 */
223 "APQ_USBC_SPI_MOSI", /* GPIO_20 */
231 "ACCELEROMETER_INT1",
233 "APQ_CAM_I2C0_SCL", /* GPIO_30 */
234 "ACCELEROMETER_INT2",
253 "PWR_GPIO_OUT", /* GPIO_50 */
283 "BOOT_CONFIG_0", /* GPIO_80 */
293 "APQ_DEBUG0", /* GPIO_90 */
303 "APQ_LCD_ID0", /* GPIO_100 */
310 "USBC_I2C_IRQ_1V8_L",
313 "APQ_USB_ID", /* GPIO_110 */
318 "APQ_CRQ_I2C_RDY_1V8",
323 "USBC_GPIO7_1V8", /* GPIO_120 */
326 pinctrl_backlight: backlight-state {
331 pinctrl_lcd_avdd_reg: lcd-avdd-reg-state {
336 pinctrl_lcd_avee_reg: lcd-avee-reg-state {
341 pinctrl_lcd_iovcc_reg: lcd-iovcc-reg-state {
346 pinctrl_lcd_rst: lcd-rst-state {
351 pinctrl_otg_default: otg-default-state {
357 pinctrl_otg_device: otg-device-state {
363 pinctrl_otg_host: otg-host-state {
369 typec_irq: typec-irq-state {
377 pinctrl-names = "default", "host", "device";
378 pinctrl-0 = <&pinctrl_otg_default>;
379 pinctrl-1 = <&pinctrl_otg_host>;
380 pinctrl-2 = <&pinctrl_otg_device>;
386 remote-endpoint = <&typec_ep>;
396 compatible = "qcom,wcn3680";