diff mbox series

arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer

Message ID 20230715204128.12612-1-linmengbo0689@protonmail.com
State Superseded
Headers show
Series arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer | expand

Commit Message

Lin, Meng-Bo July 15, 2023, 8:41 p.m. UTC
E5, E7 and Grand Max have ST LIS2HH12 accelerometer.
Add support for it.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 21 +++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

Comments

Konrad Dybcio July 17, 2023, 12:30 p.m. UTC | #1
On 15.07.2023 22:41, Lin, Meng-Bo wrote:
> E5, E7 and Grand Max have ST LIS2HH12 accelerometer.
> Add support for it.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---
Potentially missing Co-Developed-by?

>  .../qcom/msm8916-samsung-e2015-common.dtsi    | 21 +++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
> index 0cdd6af7817f..ef7c7ac40e05 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
> @@ -42,10 +42,27 @@ reg_touch_key: regulator-touch-key {
>  
>  &blsp_i2c2 {
>  	/* lis2hh12 accelerometer instead of BMC150 */
> -	status = "disabled";
> -
>  	/delete-node/ accelerometer@10;
>  	/delete-node/ magnetometer@12;
> +
> +	accelerometer@1d {
> +		compatible = "st,lis2hh12";
> +		reg = <0x1d>;
> +
> +		interrupt-parent = <&msmgpio>;
> +		interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
interrupts-extended = <&msmgpio 115 IRQ_TYPE_LEVEL_HIGH>;

Konrad
> +
> +		vdd-supply = <&pm8916_l5>;
> +		vddio-supply = <&pm8916_l5>;
> +
> +		st,drdy-int-pin = <1>;
> +		mount-matrix = "1", "0", "0",
> +			       "0", "-1", "0",
> +			       "0", "0", "1";
> +
> +		pinctrl-0 = <&accel_int_default>;
> +		pinctrl-names = "default";
> +	};
>  };
>  
>  &reg_motor_vdd {
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 0cdd6af7817f..ef7c7ac40e05 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -42,10 +42,27 @@  reg_touch_key: regulator-touch-key {
 
 &blsp_i2c2 {
 	/* lis2hh12 accelerometer instead of BMC150 */
-	status = "disabled";
-
 	/delete-node/ accelerometer@10;
 	/delete-node/ magnetometer@12;
+
+	accelerometer@1d {
+		compatible = "st,lis2hh12";
+		reg = <0x1d>;
+
+		interrupt-parent = <&msmgpio>;
+		interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
+
+		vdd-supply = <&pm8916_l5>;
+		vddio-supply = <&pm8916_l5>;
+
+		st,drdy-int-pin = <1>;
+		mount-matrix = "1", "0", "0",
+			       "0", "-1", "0",
+			       "0", "0", "1";
+
+		pinctrl-0 = <&accel_int_default>;
+		pinctrl-names = "default";
+	};
 };
 
 &reg_motor_vdd {