xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/msm8916-wingtech-wt865x8.dtsi (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include "msm8916-pm8916.dtsi"
4#include "msm8916-modem-qdsp6.dtsi"
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
8
9/ {
10	aliases {
11		mmc0 = &sdhc_1; /* eMMC */
12		mmc1 = &sdhc_2; /* SD card */
13		serial0 = &blsp_uart2;
14	};
15
16	chosen {
17		stdout-path = "serial0";
18	};
19
20	headphones_switch: audio-switch {
21		compatible = "simple-audio-amplifier";
22
23		pinctrl-0 = <&headphones_switch_default>;
24		pinctrl-names = "default";
25
26		enable-gpios = <&tlmm 120 GPIO_ACTIVE_HIGH>;
27		sound-name-prefix = "Headphones Switch";
28	};
29
30	backlight: backlight {
31		compatible = "pwm-backlight";
32		pwms = <&pm8916_pwm 0 100000>;
33
34		brightness-levels = <0 255>;
35		num-interpolated-steps = <255>;
36		default-brightness-level = <255>;
37	};
38
39	battery: battery {
40		compatible = "simple-battery";
41		voltage-min-design-microvolt = <3400000>;
42		voltage-max-design-microvolt = <4350000>;
43		energy-full-design-microwatt-hours = <8740000>;
44		charge-full-design-microamp-hours = <2300000>;
45
46		ocv-capacity-celsius = <25>;
47		ocv-capacity-table-0 = <4328000 100>, <4266000 95>, <4208000 90>,
48			<4154000 85>, <4102000 80>, <4062000 75>, <3992000 70>,
49			<3960000 65>, <3914000 60>, <3870000 55>, <3840000 50>,
50			<3818000 45>, <3800000 40>, <3784000 35>, <3770000 30>,
51			<3756000 25>, <3736000 20>, <3714000 16>, <3696000 13>,
52			<3690000 11>, <3689000 10>, <3688000 9>, <3686000 8>,
53			<3682000 7>, <3670000 6>, <3639000 5>, <3592000 4>,
54			<3530000 3>, <3448000 2>, <3320000 1>, <3000000 0>;
55	};
56
57	gpio-keys {
58		compatible = "gpio-keys";
59
60		pinctrl-0 = <&gpio_keys_default>;
61		pinctrl-names = "default";
62
63		label = "GPIO Buttons";
64
65		volume-up-button {
66			label = "Volume Up";
67			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
68			linux,code = <KEY_VOLUMEUP>;
69		};
70	};
71};
72
73&blsp_i2c5 {
74	status = "okay";
75
76	touchscreen@38 {
77		compatible = "edt,edt-ft5306";
78		reg = <0x38>;
79
80		interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>;
81
82		vcc-supply = <&pm8916_l17>;
83		iovcc-supply = <&pm8916_l6>;
84
85		reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
86
87		touchscreen-size-x = <720>;
88		touchscreen-size-y = <1280>;
89
90		pinctrl-0 = <&touchscreen_default>;
91		pinctrl-names = "default";
92	};
93};
94
95&blsp_uart2 {
96	pinctrl-0 = <&blsp_uart2_console_default>;
97	pinctrl-1 = <&blsp_uart2_console_sleep>;
98	pinctrl-names = "default", "sleep";
99	status = "okay";
100};
101
102&mpss_mem {
103	reg = <0x0 0x86800000 0x0 0x5500000>;
104};
105
106&pm8916_bms {
107	monitored-battery = <&battery>;
108	status = "okay";
109};
110
111&pm8916_codec {
112	qcom,micbias-lvl = <2800>;
113	qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
114	qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
115	qcom,hphl-jack-type-normally-open;
116};
117
118&pm8916_pwm {
119	pinctrl-0 = <&pwm_out>;
120	pinctrl-names = "default";
121	status = "okay";
122};
123
124&pm8916_resin {
125	linux,code = <KEY_VOLUMEDOWN>;
126	status = "okay";
127};
128
129&pm8916_rpm_regulators {
130	pm8916_l17: l17 {
131		regulator-min-microvolt = <2850000>;
132		regulator-max-microvolt = <2850000>;
133	};
134};
135
136&pm8916_vib {
137	status = "okay";
138};
139
140&sdhc_1 {
141	status = "okay";
142};
143
144&sdhc_2 {
145	pinctrl-0 = <&sdc2_default>;
146	pinctrl-1 = <&sdc2_sleep>;
147	pinctrl-names = "default", "sleep";
148
149	non-removable;
150
151	status = "okay";
152};
153
154&usb {
155	status = "okay";
156};
157
158&venus {
159	status = "okay";
160};
161
162&venus_mem {
163	status = "okay";
164};
165
166&wcnss {
167	status = "okay";
168};
169
170&wcnss_iris {
171	compatible = "qcom,wcn3620";
172};
173
174&wcnss_mem {
175	status = "okay";
176};
177
178&tlmm {
179	gpio_keys_default: gpio-keys-default-state {
180		pins = "gpio107";
181		function = "gpio";
182		drive-strength = <2>;
183		bias-pull-up;
184	};
185
186	headphones_switch_default: headphones-switch-default-state {
187		pins = "gpio120";
188		function = "gpio";
189		drive-strength = <2>;
190		bias-disable;
191	};
192
193	touchscreen_default: touchscreen-default-state {
194		touchscreen-pins {
195			pins = "gpio13";
196			function = "gpio";
197			drive-strength = <2>;
198			bias-pull-up;
199		};
200
201		reset-pins {
202			pins = "gpio12";
203			function = "gpio";
204			drive-strength = <2>;
205			bias-disable;
206		};
207	};
208};
209
210&pm8916_mpps {
211	pwm_out: mpp4-state {
212		pins = "mpp4";
213		function = "digital";
214		power-source = <PM8916_MPP_VPH>;
215		output-low;
216		qcom,dtest = <1>;
217	};
218};
219