summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt86518.dts
blob: 3cfa80e38a9e3e39214e65aef041a5dab4830c8b (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
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-wingtech-wt865x8.dtsi"

/ {
	model = "Lenovo A6000 (Wingtech WT86518)";
	compatible = "wingtech,wt86518", "qcom,msm8916";
	chassis-type = "handset";

	speaker_amp: audio-amplifier {
		compatible = "awinic,aw8738";

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

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

&blsp_i2c2 {
	accelerometer@e {
		compatible = "kionix,kxcj91008";
		reg = <0xe>;

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

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

&headphones_switch {
	VCC-supply = <&pm8916_l17>;
};

&pm8916_bms {
	power-supplies = <&pm8916_charger>;
};

&pm8916_charger {
	qcom,fast-charge-safe-current = <900000>;
	qcom,fast-charge-safe-voltage = <4300000>;

	monitored-battery = <&battery>;

	status = "okay";
};

&sound {
	model = "wt88047";
	widgets = "Speaker", "Speaker",
		  "Headphone", "Headphones";
	pin-switches = "Speaker", "Headphones";
	audio-routing =	"Speaker", "Speaker Amp OUT",
			"Speaker Amp IN", "HPH_R",
			"Headphones", "Headphones Switch OUTL",
			"Headphones", "Headphones Switch OUTR",
			"Headphones Switch INL", "HPH_L",
			"Headphones Switch INR", "HPH_R",
			"AMIC1", "MIC BIAS Internal1",
			"AMIC2", "MIC BIAS Internal2";
	aux-devs = <&speaker_amp>, <&headphones_switch>;
};

&usb {
	dr_mode = "peripheral";
	extcon = <&pm8916_charger>;
};

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

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