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