diff mbox series

[3/3] ARM: dts: samsung: exynos4210-i9100: Add accelerometer node

Message ID 20231206221556.15348-4-paul@crapouillou.net (mailing list archive)
State Accepted
Headers show
Series ARM: dts: samsung: exynos4210-i9100 updates | expand

Commit Message

Paul Cercueil Dec. 6, 2023, 10:15 p.m. UTC
Add a Device Tree node for the ST Microelectronics "K3D" accelerometer
chip found in the Galaxy S2.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/arm/boot/dts/samsung/exynos4210-i9100.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Krzysztof Kozlowski Dec. 8, 2023, 7:44 p.m. UTC | #1
On 06/12/2023 23:15, Paul Cercueil wrote:
> Add a Device Tree node for the ST Microelectronics "K3D" accelerometer
> chip found in the Galaxy S2.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/arm/boot/dts/samsung/exynos4210-i9100.dts | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
> index f03b03dbe9f2..7e57fe033e2b 100644
> --- a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
> +++ b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
> @@ -421,6 +421,23 @@ touchscreen@4a {
>  	};
>  };
>  
> +&i2c_1 {

Fixed placement, so nodes are ordered. If it was not the case in your
DTS, it means you worked on some old tree, which should be avoided.
Please work on mainline.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
index f03b03dbe9f2..7e57fe033e2b 100644
--- a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
+++ b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts
@@ -421,6 +421,23 @@  touchscreen@4a {
 	};
 };
 
+&i2c_1 {
+	status = "okay";
+
+	samsung,i2c-sda-delay = <100>;
+	samsung,i2c-slave-addr = <0x10>;
+	samsung,i2c-max-bus-freq = <100000>;
+
+	lis3dh: accelerometer@19 {
+		compatible = "st,lis3dh-accel";
+		reg = <0x19>;
+
+		mount-matrix = "0", "-1", "0",
+			       "1", "0", "0",
+			       "0", "0", "1";
+	};
+};
+
 &i2c_5 {
 	status = "okay";