Skip to content

Commit 2f7234e

Browse files
committed
add hall, imu, magnetometer and proximity sensor
Signed-off-by: Paul Adam <[email protected]>
1 parent 5ce62e3 commit 2f7234e

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

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

Lines changed: 88 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,44 @@
4661
status = "okay";
4762
};
4863

64+
&blsp_i2c2 {
65+
status = "okay";
66+
67+
magnetometer@c {
68+
compatible = "asahi-kasei,ak09911";
69+
reg = <0x0c>;
70+
vdd-supply = <&pm8916_l17>;
71+
vid-supply = <&pm8916_l6>;
72+
reset-gpios = <&tlmm 120 GPIO_ACTIVE_LOW>;
73+
pinctrl-0 = <&mag_reset_default>;
74+
pinctrl-names = "default";
75+
mount-matrix = "1", "0", "0",
76+
"0", "1", "0",
77+
"0", "0", "1";
78+
};
79+
80+
proximity@48 {
81+
compatible = "sensortek,stk3310"; // is it 3310?
82+
reg = <0x48>;
83+
interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>;
84+
pinctrl-names = "default";
85+
pinctrl-0 = <&proximity_int_default>;
86+
};
87+
88+
imu@68 {
89+
compatible = "invensense,mpu6880";
90+
reg = <0x68>;
91+
interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_FALLING>;
92+
vdd-supply = <&pm8916_l17>;
93+
vddio-supply = <&pm8916_l6>;
94+
pinctrl-0 = <&imu_int_default>; //??
95+
pinctrl-names = "default"; //??
96+
mount-matrix = "0", "-1", "0",
97+
"-1", "0", "0",
98+
"0", "0", "-1";
99+
};
100+
};
101+
49102
// make sure gcc is probed with display disabled.
50103
&gcc {
51104
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
@@ -56,6 +109,13 @@
56109
status = "okay";
57110
};
58111

112+
&pm8916_rpm_regulators {
113+
pm8916_l17: l17 {
114+
regulator-min-microvolt = <2850000>;
115+
regulator-max-microvolt = <2850000>;
116+
};
117+
};
118+
59119
&sdhc_1 {
60120
status = "okay";
61121
};
@@ -97,6 +157,34 @@
97157
bias-pull-up;
98158
};
99159

160+
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
161+
pins = "gpio117";
162+
function = "gpio";
163+
drive-strength = <6>;
164+
bias-pull-up;
165+
};
166+
167+
proximity_int_default: proximity-int-default-state {
168+
pins = "gpio113";
169+
function = "gpio";
170+
drive-strength = <6>;
171+
bias-pull-up;
172+
};
173+
174+
imu_int_default: imu-int-default-state {
175+
pins = "gpio115";
176+
function = "gpio";
177+
drive-strength = <2>;
178+
bias-disable;
179+
};
180+
181+
mag_reset_default: mag-reset-default-state {
182+
pins = "gpio120";
183+
function = "gpio";
184+
drive-strength = <2>;
185+
bias-disable;
186+
};
187+
100188
usb_id_default: usb-id-default-state {
101189
pins = "gpio110";
102190
function = "gpio";

0 commit comments

Comments
 (0)