diff mbox series

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

Message ID 20230105123240.1089375-9-nikita@trvn.ru (mailing list archive)
State Superseded
Headers show
Series Add support for Samsung Galaxy tab A (2015) tablets | expand

Commit Message

Nikita Travkin Jan. 5, 2023, 12:32 p.m. UTC
From: Siddharth Manthan <siddharth.manthan@gmail.com>

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

Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 .../dts/qcom/msm8916-samsung-gt5-common.dtsi  | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
diff mbox series

Patch

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";