arm64: dts: qcom: msm8916-samsung-j5-common: Add accelerometer

J5 and J5X have ST LIS2HH12 accelerometer.
Add support for it.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Co-developed-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Co-developed-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230904123123.2593-1-linmengbo0689@protonmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
Markuss Broks
2023-09-19 20:57:38 -07:00
committed by Bjorn Andersson
parent e96c4d53d4
commit 922c031eb2
3 changed files with 59 additions and 0 deletions
@@ -84,6 +84,31 @@
pinctrl-0 = <&muic_int_default>;
};
};
i2c_sensors: i2c-sensors {
compatible = "i2c-gpio";
sda-gpios = <&tlmm 31 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 32 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
pinctrl-0 = <&sensors_i2c_default>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
accelerometer: accelerometer@1d {
compatible = "st,lis2hh12";
reg = <0x1d>;
interrupts-extended = <&tlmm 115 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-0 = <&accel_int_default>;
pinctrl-names = "default";
st,drdy-int-pin = <1>;
};
};
};
&blsp_i2c5 {
@@ -147,6 +172,13 @@
};
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio115";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
pins = "gpio52";
function = "gpio";
@@ -187,6 +219,13 @@
bias-disable;
};
sensors_i2c_default: sensors-i2c-default-state {
pins = "gpio31", "gpio32";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tsp_int_default: tsp-int-default-state {
pins = "gpio13";
function = "gpio";
@@ -10,6 +10,11 @@
chassis-type = "handset";
};
&accelerometer {
vdd-supply = <&pm8916_l5>;
vddio-supply = <&pm8916_l5>;
};
&blsp_i2c5 {
status = "disabled";
};
@@ -23,6 +23,17 @@
};
};
&accelerometer {
interrupts-extended = <&tlmm 49 IRQ_TYPE_LEVEL_HIGH>;
vdd-supply = <&pm8916_l6>;
vddio-supply = <&pm8916_l6>;
mount-matrix = "0", "-1", "0",
"1", "0", "0",
"0", "0", "-1";
};
&muic {
interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
};
@@ -40,6 +51,10 @@
};
};
&accel_int_default {
pins = "gpio49";
};
&muic_int_default {
pins = "gpio121";
};