Commit 922c031e authored by Markuss Broks's avatar Markuss Broks Committed by Bjorn Andersson

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

J5 and J5X have ST LIS2HH12 accelerometer.
Add support for it.
Signed-off-by: default avatarMarkuss Broks <markuss.broks@gmail.com>
Co-developed-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Co-developed-by: default avatarLin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: default avatarLin, Meng-Bo <linmengbo0689@protonmail.com>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230904123123.2593-1-linmengbo0689@protonmail.comSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent e96c4d53
......@@ -84,6 +84,31 @@ muic: extcon@25 {
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 @@ &wcnss_iris {
};
&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 @@ sdc2_cd_default: sdc2-cd-default-state {
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 @@ reg_vdd_tsp_a: regulator-vdd-tsp-a {
};
};
&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 @@ tsp_ldo_en_default: tsp-ldo-en-default-state {
};
};
&accel_int_default {
pins = "gpio49";
};
&muic_int_default {
pins = "gpio121";
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment