summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt86528.dts
blob: ec2c4dcd3eada9d9f7c0d35a1e1ab665c9d2081b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-wingtech-wt865x8.dtsi"

/ {
	model = "Lenovo A6010 (Wingtech WT86528)";
	compatible = "wingtech,wt86528", "qcom,msm8916";
	chassis-type = "handset";

	/* left AW8736 */
	speaker_amp_left: audio-amplifier-left {
		compatible = "awinic,aw8738";

		pinctrl-0 = <&spk_ext_pa_left_default>;
		pinctrl-names = "default";

		mode-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
		sound-name-prefix = "Speaker Amp L";
		awinic,mode = <3>;
	};

	/* right AW8736 */
	speaker_amp_right: audio-amplifier-right {
		compatible = "awinic,aw8738";

		pinctrl-0 = <&spk_ext_pa_right_default>;
		pinctrl-names = "default";

		mode-gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>;
		sound-name-prefix = "Speaker Amp R";
		awinic,mode = <3>;
	};

	gpio-leds {
		compatible = "gpio-leds";

		pinctrl-0 = <&gpio_leds_default>;
		pinctrl-names = "default";

		led-0 {
			gpios = <&tlmm 16 GPIO_ACTIVE_LOW>;
			label = "red";
			default-state = "off";
			retain-state-suspended;
		};

		led-1 {
			gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
			label = "green";
			default-state = "off";
			retain-state-suspended;
		};
	};

	usb_id: usb-id {
		compatible = "linux,extcon-usb-gpio";
		id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
		pinctrl-0 = <&usb_id_default>;
		pinctrl-names = "default";
	};
};

&blsp_i2c2 {
	magnetometer@c {
		compatible = "asahi-kasei,ak09911";
		reg = <0x0c>;

		vdd-supply = <&pm8916_l17>;
		vid-supply = <&pm8916_l6>;
	};

	imu@68 {
		compatible = "invensense,mpu6880";
		reg = <0x68>;

		interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_RISING>;

		vdd-supply = <&pm8916_l17>;
		vddio-supply = <&pm8916_l6>;

		pinctrl-0 = <&imu_default>;
		pinctrl-names = "default";

		mount-matrix = "1",  "0", "0",
			       "0", "-1", "0",
			       "0",  "0", "1";
	};
};

&pm8916_codec {
	qcom,micbias1-ext-cap;
};

&sound {
	model = "wt86528";
	widgets = "Speaker", "Speaker",
		  "Headphone", "Headphones";
	pin-switches = "Speaker", "Headphones";
	audio-routing = "Speaker", "Speaker Amp L OUT",
			"Speaker", "Speaker Amp R OUT",
			"Speaker Amp L IN", "HPH_L",
			"Speaker Amp R IN", "HPH_R",
			"Headphones", "Headphones Switch OUTL",
			"Headphones", "Headphones Switch OUTR",
			"Headphones Switch INL", "HPH_L",
			"Headphones Switch INR", "HPH_R",
			"AMIC1", "MIC BIAS External1",
			"AMIC2", "MIC BIAS Internal2",
			"AMIC3", "MIC BIAS External1";
	aux-devs = <&speaker_amp_left>, <&speaker_amp_right>, <&headphones_switch>;
};

&usb {
	extcon = <&usb_id>, <&usb_id>;
};

&usb_hs_phy {
	extcon = <&usb_id>;
};

&tlmm {
	gpio_leds_default: gpio-leds-default-state {
		pins = "gpio16", "gpio17";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	imu_default: imu-default-state {
		pins = "gpio115";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	spk_ext_pa_left_default: spk-ext-pa-left-default-state {
		pins = "gpio119";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	spk_ext_pa_right_default: spk-ext-pa-right-default-state {
		pins = "gpio121";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	usb_id_default: usb-id-default-state {
		pins = "gpio110";
		function = "gpio";
		drive-strength = <8>;
		bias-pull-up;
	};
};