Skip to content

Commit c36eab3

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

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

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

Lines changed: 71 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,34 @@
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+
interrupt-parent = <&tlmm>;
72+
interrupts = <113 IRQ_TYPE_EDGE_FALLING>;
73+
pinctrl-names = "default";
74+
pinctrl-0 = <&proximity_int_default>;
75+
};
76+
77+
imu@68 {
78+
compatible = "invensense,mpu6880";
79+
reg = <0x68>;
80+
interrupt-parent = <&tlmm>;
81+
interrupts = <115 IRQ_TYPE_EDGE_FALLING>;
82+
vdd-supply = <&pm8916_l17>;
83+
vddio-supply = <&pm8916_l6>;
84+
pinctrl-0 = <&imu_default>; //??
85+
pinctrl-names = "default"; //??
86+
mount-matrix = "0", "-1", "0",
87+
"-1", "0", "0",
88+
"0", "0", "-1";
89+
};
90+
};
91+
4992
// make sure gcc is probed with display disabled.
5093
&gcc {
5194
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
@@ -56,6 +99,13 @@
5699
status = "okay";
57100
};
58101

102+
&pm8916_rpm_regulators {
103+
pm8916_l17: l17 {
104+
regulator-min-microvolt = <2850000>;
105+
regulator-max-microvolt = <2850000>;
106+
};
107+
};
108+
59109
&sdhc_1 {
60110
status = "okay";
61111
};
@@ -97,6 +147,27 @@
97147
bias-pull-up;
98148
};
99149

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

0 commit comments

Comments
 (0)