[PATCH 8/8] arm64: dts: qcom: msm8916-samsung-gt5-common: add sensors

From: Nikita Travkin
Date: Thu Jan 05 2023 - 07:52:00 EST


From: Siddharth Manthan <siddharth.manthan@xxxxxxxxx>

This device has ST LIS2HH12 accelerometer and Capella CM3323 light sensor.
Add support for it.

Signed-off-by: Siddharth Manthan <siddharth.manthan@xxxxxxxxx>
Signed-off-by: Nikita Travkin <nikita@xxxxxxx>
---
.../dts/qcom/msm8916-samsung-gt5-common.dtsi | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
index 9f97a8129278..bb1b1e814d8a 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
@@ -82,6 +82,35 @@ fuelgauge@36 {
};
};

+&blsp_i2c2 {
+ status = "okay";
+
+ accelerometer@1d {
+ compatible = "st,lis2hh12";
+ reg = <0x1d>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l5>;
+
+ interrupt-parent = <&msmgpio>;
+ interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "INT1";
+
+ st,drdy-int-pin = <1>;
+ mount-matrix = "0", "1", "0",
+ "-1", "0", "0",
+ "0", "0", "1";
+
+ pinctrl-0 = <&accel_int_default>;
+ pinctrl-names = "default";
+ };
+
+ light-sensor@10 {
+ compatible = "capella,cm3323";
+ reg = <0x10>;
+ };
+};
+
&blsp1_uart2 {
status = "okay";
};
@@ -237,6 +266,14 @@ l18 {
};

&msmgpio {
+ accel_int_default: accel-int-default-state {
+ pins = "gpio115";
+ function = "gpio";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
fuelgauge_int_default: fuelgauge-int-default-state {
pins = "gpio121";
function = "gpio";
--
2.38.1