Skip to content

Commit a0e2ab4

Browse files
committed
add hall, imu and proximity sensors
Signed-off-by: Paul Adam <adamp@posteo.de>
1 parent 5ce62e3 commit a0e2ab4

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

arch/arm64/boot/dts/qcom/msm8916-wiko-chuppito.dts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@
3434
};
3535
};
3636

37+
gpio-hall-sensor {
38+
compatible = "gpio-keys";
39+
pinctrl-0 = <&gpio_hall_sensor_default>;
40+
pinctrl-names = "default";
41+
label = "GPIO Hall Effect Sensor";
42+
43+
event-hall-sensor {
44+
label = "Hall Effect Sensor";
45+
gpios = <&tlmm 117 GPIO_ACTIVE_LOW>;
46+
linux,input-type = <EV_SW>;
47+
linux,code = <SW_LID>;
48+
linux,can-disable;
49+
};
50+
};
51+
3752
usb_id: usb-id {
3853
compatible = "linux,extcon-usb-gpio";
3954
id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
@@ -46,6 +61,32 @@
4661
status = "okay";
4762
};
4863

64+
&blsp_i2c2 {
65+
status = "okay";
66+
67+
proximity@48 {
68+
compatible = "sensortek,stk3310"; // is it 3310?
69+
reg = <0x48>;
70+
proximity-near-level = <25>;
71+
interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>;
72+
pinctrl-names = "default";
73+
pinctrl-0 = <&proximity_int_default>;
74+
};
75+
76+
imu@68 {
77+
compatible = "invensense,mpu6880";
78+
reg = <0x68>;
79+
interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_FALLING>;
80+
vdd-supply = <&pm8916_l17>;
81+
vddio-supply = <&pm8916_l6>;
82+
pinctrl-0 = <&imu_int_default>; //??
83+
pinctrl-names = "default"; //??
84+
mount-matrix = "0", "-1", "0",
85+
"-1", "0", "0",
86+
"0", "0", "-1";
87+
};
88+
};
89+
4990
// make sure gcc is probed with display disabled.
5091
&gcc {
5192
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
@@ -56,6 +97,13 @@
5697
status = "okay";
5798
};
5899

100+
&pm8916_rpm_regulators {
101+
pm8916_l17: l17 {
102+
regulator-min-microvolt = <2850000>;
103+
regulator-max-microvolt = <2850000>;
104+
};
105+
};
106+
59107
&sdhc_1 {
60108
status = "okay";
61109
};
@@ -97,6 +145,27 @@
97145
bias-pull-up;
98146
};
99147

148+
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
149+
pins = "gpio117";
150+
function = "gpio";
151+
drive-strength = <6>;
152+
bias-pull-up;
153+
};
154+
155+
proximity_int_default: proximity-int-default-state {
156+
pins = "gpio113";
157+
function = "gpio";
158+
drive-strength = <6>;
159+
bias-pull-up;
160+
};
161+
162+
imu_int_default: imu-int-default-state {
163+
pins = "gpio115";
164+
function = "gpio";
165+
drive-strength = <2>;
166+
bias-disable;
167+
};
168+
100169
usb_id_default: usb-id-default-state {
101170
pins = "gpio110";
102171
function = "gpio";

0 commit comments

Comments
 (0)