diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-04-12 19:13:23 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-07 13:54:07 +0400 |
commit | d0e3bc813359360fb94098fec9403820846577f3 (patch) | |
tree | af540b8a1999005b5d1f563869b9c12557ee4fef /arch/arm | |
parent | 14cdf8cbc73caf205226acb20b4fdd02f0a17f70 (diff) | |
download | linux-d0e3bc813359360fb94098fec9403820846577f3.tar.xz |
ARM: ux500: add misc sensors to the device trees
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/ste-href-tvk1281618.dtsi | 59 | ||||
-rw-r--r-- | arch/arm/boot/dts/ste-hrefv60plus.dtsi | 24 | ||||
-rw-r--r-- | arch/arm/boot/dts/ste-snowball.dts | 38 |
3 files changed, 94 insertions, 27 deletions
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi index c40565320978..18b65d1b14f2 100644 --- a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi +++ b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi @@ -88,6 +88,43 @@ }; }; }; + /* 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 @@ }; }; }; + 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>; + }; + }; + }; }; }; }; diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi index c2341061b943..bcc1f0c37f49 100644 --- a/arch/arm/boot/dts/ste-hrefv60plus.dtsi +++ b/arch/arm/boot/dts/ste-hrefv60plus.dtsi @@ -35,8 +35,6 @@ */ 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 @@ }; }; }; - 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, diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 474ef83229cd..4a2000c620ad 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts @@ -241,6 +241,40 @@ 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 @@ * 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 { |