diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2019-12-19 23:20:48 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-12-26 02:11:09 +0300 |
commit | 032c18c566ead5bfda62acf1a5af5ce79e2cd8e0 (patch) | |
tree | f268d0974fc6d3658742888b97b033dce02310c0 /arch/arm/boot/dts/ste-ux500-samsung-golden.dts | |
parent | b952efeb7ad4cc81f2da55bde6fdd27716fceb13 (diff) | |
download | linux-032c18c566ead5bfda62acf1a5af5ce79e2cd8e0.tar.xz |
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 <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20191219202052.19039-6-stephan@gerhold.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/ste-ux500-samsung-golden.dts')
-rw-r--r-- | arch/arm/boot/dts/ste-ux500-samsung-golden.dts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts index 51f2afe42c1c..14a084e1846b 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 <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> /* * 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 { |