xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt86518.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*b2d2a78aSEmmanuel Vadot
3*b2d2a78aSEmmanuel Vadot/dts-v1/;
4*b2d2a78aSEmmanuel Vadot
5*b2d2a78aSEmmanuel Vadot#include "msm8916-wingtech-wt865x8.dtsi"
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadot/ {
8*b2d2a78aSEmmanuel Vadot	model = "Lenovo A6000 (Wingtech WT86518)";
9*b2d2a78aSEmmanuel Vadot	compatible = "wingtech,wt86518", "qcom,msm8916";
10*b2d2a78aSEmmanuel Vadot	chassis-type = "handset";
11*b2d2a78aSEmmanuel Vadot
12*b2d2a78aSEmmanuel Vadot	speaker_amp: audio-amplifier {
13*b2d2a78aSEmmanuel Vadot		compatible = "awinic,aw8738";
14*b2d2a78aSEmmanuel Vadot
15*b2d2a78aSEmmanuel Vadot		pinctrl-0 = <&spk_ext_pa_default>;
16*b2d2a78aSEmmanuel Vadot		pinctrl-names = "default";
17*b2d2a78aSEmmanuel Vadot
18*b2d2a78aSEmmanuel Vadot		mode-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
19*b2d2a78aSEmmanuel Vadot		sound-name-prefix = "Speaker Amp";
20*b2d2a78aSEmmanuel Vadot		awinic,mode = <1>;
21*b2d2a78aSEmmanuel Vadot	};
22*b2d2a78aSEmmanuel Vadot};
23*b2d2a78aSEmmanuel Vadot
24*b2d2a78aSEmmanuel Vadot&blsp_i2c2 {
25*b2d2a78aSEmmanuel Vadot	accelerometer@e {
26*b2d2a78aSEmmanuel Vadot		compatible = "kionix,kxcj91008";
27*b2d2a78aSEmmanuel Vadot		reg = <0xe>;
28*b2d2a78aSEmmanuel Vadot
29*b2d2a78aSEmmanuel Vadot		vdd-supply = <&pm8916_l6>;
30*b2d2a78aSEmmanuel Vadot		vddio-supply = <&pm8916_l6>;
31*b2d2a78aSEmmanuel Vadot
32*b2d2a78aSEmmanuel Vadot		mount-matrix = "0", "-1", "0",
33*b2d2a78aSEmmanuel Vadot			       "-1", "0", "0",
34*b2d2a78aSEmmanuel Vadot			       "0",  "0", "1";
35*b2d2a78aSEmmanuel Vadot	};
36*b2d2a78aSEmmanuel Vadot};
37*b2d2a78aSEmmanuel Vadot
38*b2d2a78aSEmmanuel Vadot&headphones_switch {
39*b2d2a78aSEmmanuel Vadot	VCC-supply = <&pm8916_l17>;
40*b2d2a78aSEmmanuel Vadot};
41*b2d2a78aSEmmanuel Vadot
42*b2d2a78aSEmmanuel Vadot&pm8916_bms {
43*b2d2a78aSEmmanuel Vadot	power-supplies = <&pm8916_charger>;
44*b2d2a78aSEmmanuel Vadot};
45*b2d2a78aSEmmanuel Vadot
46*b2d2a78aSEmmanuel Vadot&pm8916_charger {
47*b2d2a78aSEmmanuel Vadot	qcom,fast-charge-safe-current = <900000>;
48*b2d2a78aSEmmanuel Vadot	qcom,fast-charge-safe-voltage = <4300000>;
49*b2d2a78aSEmmanuel Vadot
50*b2d2a78aSEmmanuel Vadot	monitored-battery = <&battery>;
51*b2d2a78aSEmmanuel Vadot
52*b2d2a78aSEmmanuel Vadot	status = "okay";
53*b2d2a78aSEmmanuel Vadot};
54*b2d2a78aSEmmanuel Vadot
55*b2d2a78aSEmmanuel Vadot&sound {
56*b2d2a78aSEmmanuel Vadot	model = "wt88047";
57*b2d2a78aSEmmanuel Vadot	widgets = "Speaker", "Speaker",
58*b2d2a78aSEmmanuel Vadot		  "Headphone", "Headphones";
59*b2d2a78aSEmmanuel Vadot	pin-switches = "Speaker", "Headphones";
60*b2d2a78aSEmmanuel Vadot	audio-routing =	"Speaker", "Speaker Amp OUT",
61*b2d2a78aSEmmanuel Vadot			"Speaker Amp IN", "HPH_R",
62*b2d2a78aSEmmanuel Vadot			"Headphones", "Headphones Switch OUTL",
63*b2d2a78aSEmmanuel Vadot			"Headphones", "Headphones Switch OUTR",
64*b2d2a78aSEmmanuel Vadot			"Headphones Switch INL", "HPH_L",
65*b2d2a78aSEmmanuel Vadot			"Headphones Switch INR", "HPH_R",
66*b2d2a78aSEmmanuel Vadot			"AMIC1", "MIC BIAS Internal1",
67*b2d2a78aSEmmanuel Vadot			"AMIC2", "MIC BIAS Internal2";
68*b2d2a78aSEmmanuel Vadot	aux-devs = <&speaker_amp>, <&headphones_switch>;
69*b2d2a78aSEmmanuel Vadot};
70*b2d2a78aSEmmanuel Vadot
71*b2d2a78aSEmmanuel Vadot&usb {
72*b2d2a78aSEmmanuel Vadot	dr_mode = "peripheral";
73*b2d2a78aSEmmanuel Vadot	extcon = <&pm8916_charger>;
74*b2d2a78aSEmmanuel Vadot};
75*b2d2a78aSEmmanuel Vadot
76*b2d2a78aSEmmanuel Vadot&usb_hs_phy {
77*b2d2a78aSEmmanuel Vadot	extcon = <&pm8916_charger>;
78*b2d2a78aSEmmanuel Vadot};
79*b2d2a78aSEmmanuel Vadot
80*b2d2a78aSEmmanuel Vadot&tlmm {
81*b2d2a78aSEmmanuel Vadot	spk_ext_pa_default: spk-ext-pa-default-state {
82*b2d2a78aSEmmanuel Vadot		pins = "gpio119";
83*b2d2a78aSEmmanuel Vadot		function = "gpio";
84*b2d2a78aSEmmanuel Vadot		drive-strength = <2>;
85*b2d2a78aSEmmanuel Vadot		bias-disable;
86*b2d2a78aSEmmanuel Vadot	};
87*b2d2a78aSEmmanuel Vadot};
88