From 032c18c566ead5bfda62acf1a5af5ce79e2cd8e0 Mon Sep 17 00:00:00 2001 From: Stephan Gerhold Date: Thu, 19 Dec 2019 21:20:48 +0100 Subject: [PATCH] ARM: dts: ux500: samsung-golden: Add IMU (accelerometer + gyroscope) samsung-golden has a InvenSense MPU-6051M IMU that provides an accelerometer and gyroscope. It seems to be functionally compatible with MPU-6050 so we can easily enable it by adding the necessary device tree nodes. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-6-stephan@gerhold.net Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-ux500-samsung-golden.dts | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts index 51f2afe..14a084e 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts @@ -6,6 +6,7 @@ #include "ste-dbx5x0-pinctrl.dtsi" #include #include +#include /* * Note: This device tree cannot be booted directly with the Samsung bootloader. @@ -114,6 +115,33 @@ pinctrl-1 = <&u2rxtx_c_1_sleep>; }; + i2c@80128000 { + status = "okay"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_b_2_default>; + pinctrl-1 = <&i2c2_b_2_sleep>; + + imu@68 { + compatible = "invensense,mpu6050"; + reg = <0x68>; + + /* GPIO206 (ACC_INT) */ + interrupt-parent = <&gpio6>; + interrupts = <14 IRQ_TYPE_EDGE_RISING>; + + mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "1"; + + vdd-supply = <&ab8500_ldo_aux1_reg>; + vddio-supply = <&ab8500_ldo_aux8_reg>; + + pinctrl-names = "default"; + pinctrl-0 = <&imu_default>; + }; + }; + prcmu@80157000 { ab8505 { ab8500_usb { @@ -272,6 +300,15 @@ }; }; + imu { + imu_default: imu_default { + golden_cfg1 { + pins = "GPIO206_AG24"; /* ACC_INT */ + ste,config = <&gpio_in_pd>; + }; + }; + }; + vibrator { vibrator_default: vibrator_default { golden_cfg1 { -- 2.7.4