]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: ux500: add misc sensors to the device trees
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 12 Apr 2014 15:13:23 +0000 (17:13 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 7 Jul 2014 09:54:07 +0000 (11:54 +0200)
This adds the STMicroelectonics MEMS sensor devices to the Ux500
family device trees:

- Accelerometer
- Magnetometer
- Gyroscope
- Pressure (barometer)

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Denis CIOCCA <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-href-tvk1281618.dtsi
arch/arm/boot/dts/ste-hrefv60plus.dtsi
arch/arm/boot/dts/ste-snowball.dts

index c40565320978e78f71c7d798476ba2b9b4a62689..18b65d1b14f2e9197d7ccdfb31d63f84ab4fe75b 100644 (file)
@@ -88,6 +88,43 @@ tc3589x_keypad {
                                };
                        };
                };
+               /* Sensors mounted on this board variant */
+               i2c@80128000 {
+                       lsm303dlh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lsm303dlh-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                       };
+                       lsm303dlm@1e {
+                               /* Magnetometer */
+                               compatible = "st,lsm303dlm-magn";
+                               reg = <0x1e>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&magneto_tvk_mode>;
+                       };
+                       l3g4200d@68 {
+                               /* Gyroscope */
+                               compatible = "st,l3g4200d-gyro";
+                               st,drdy-int-pin = <2>;
+                               reg = <0x68>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       lsp001wm@5c {
+                               /* Barometer/pressure sensor */
+                               compatible = "st,lps001wp-press";
+                               reg = <0x5c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+               };
                pinctrl {
                        /* Pull up this GPIO pin */
                        tc35893 {
@@ -114,6 +151,28 @@ tvk_cfg {
                                        };
                                };
                        };
+                       accelerometer {
+                               accel_tvk_mode: accel_tvk {
+                                       /* Accelerometer interrupt lines 1 & 2 */
+                                       tvk_cfg {
+                                               ste,pins = "GPIO82_C1", "GPIO83_D3";
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                               };
+                       };
+                       magnetometer {
+                               magneto_tvk_mode: magneto_tvk {
+                                       /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
+                                       tvk_cfg1 {
+                                               ste,pins = "GPIO31_V3";
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                                       tvk_cfg2 {
+                                               ste,pins = "GPIO32_V2";
+                                               ste,config = <&gpio_in_pd>;
+                                       };
+                               };
+                       };
                };
        };
 };
index c2341061b943290bbd5c897158a4a8c6bdd441cc..bcc1f0c37f49c42b40dc197c6e5ffb9b1b29b0da 100644 (file)
@@ -35,8 +35,6 @@ pinctrl {
                         */
                        pinctrl-names = "default";
                        pinctrl-0 = <&ipgpio_hrefv60_mode>,
-                                 <&accel_hrefv60_mode>,
-                                 <&magneto_hrefv60_mode>,
                                  <&etm_hrefv60_mode>,
                                  <&nahj_hrefv60_mode>,
                                  <&nfc_hrefv60_mode>,
@@ -83,28 +81,6 @@ hrefv60_cfg3 {
                                        };
                                };
                        };
-                       accelerometer {
-                               accel_hrefv60_mode: accel_hrefv60 {
-                                       /* Accelerometer interrupt lines 1 & 2 */
-                                       hrefv60_cfg1 {
-                                               ste,pins = "GPIO82_C1", "GPIO83_D3";
-                                               ste,config = <&gpio_in_pu>;
-                                       };
-                               };
-                       };
-                       magnetometer {
-                               magneto_hrefv60_mode: magneto_hrefv60 {
-                                       /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
-                                       hrefv60_cfg1 {
-                                               ste,pins = "GPIO31_V3";
-                                               ste,config = <&gpio_in_pu>;
-                                       };
-                                       hrefv60_cfg2 {
-                                               ste,pins = "GPIO32_V2";
-                                               ste,config = <&gpio_in_pd>;
-                                       };
-                               };
-                       };
                        etm {
                                /*
                                 * Drive D19-D23 for the ETM PTM trace interface low,
index 474ef83229cd9b368a9604205d9e8c8a42c68972..4a2000c620ad7a6a77f3b7aec18efc9a79e3a94e 100644 (file)
@@ -241,6 +241,40 @@ i2c@80128000 {
                        pinctrl-names = "default","sleep";
                        pinctrl-0 = <&i2c2_default_mode>;
                        pinctrl-1 = <&i2c2_sleep_mode>;
+                       lsm303dlh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lsm303dlh-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_snowball_mode>;
+                       };
+                       lsm303dlm@1e {
+                               /* Magnetometer */
+                               compatible = "st,lsm303dlm-magn";
+                               reg = <0x1e>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&magneto_snowball_mode>;
+                       };
+                       l3g4200d@68 {
+                               /* Gyroscope */
+                               compatible = "st,l3g4200d-gyro";
+                               st,drdy-int-pin = <2>;
+                               reg = <0x68>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       lsp001wm@5c {
+                               /* Barometer/pressure sensor */
+                               compatible = "st,lps001wp-press";
+                               reg = <0x5c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
                };
 
                i2c@80110000 {
@@ -361,9 +395,7 @@ pinctrl {
                         * can be moved over to being controlled by respective device.
                         */
                        pinctrl-names = "default";
-                       pinctrl-0 = <&accel_snowball_mode>,
-                                 <&magneto_snowball_mode>,
-                                 <&gbf_snowball_mode>,
+                       pinctrl-0 = <&gbf_snowball_mode>,
                                  <&wlan_snowball_mode>;
 
                        ethernet {