diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-04-12 11:13:23 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-07 05:54:07 -0400 |
commit | d0e3bc813359360fb94098fec9403820846577f3 (patch) | |
tree | af540b8a1999005b5d1f563869b9c12557ee4fef /arch/arm | |
parent | 14cdf8cbc73caf205226acb20b4fdd02f0a17f70 (diff) |
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 @@ | |||
88 | }; | 88 | }; |
89 | }; | 89 | }; |
90 | }; | 90 | }; |
91 | /* Sensors mounted on this board variant */ | ||
92 | i2c@80128000 { | ||
93 | lsm303dlh@18 { | ||
94 | /* Accelerometer */ | ||
95 | compatible = "st,lsm303dlh-accel"; | ||
96 | st,drdy-int-pin = <1>; | ||
97 | reg = <0x18>; | ||
98 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
99 | vddio-supply = <&db8500_vsmps2_reg>; | ||
100 | pinctrl-names = "default"; | ||
101 | pinctrl-0 = <&accel_tvk_mode>; | ||
102 | }; | ||
103 | lsm303dlm@1e { | ||
104 | /* Magnetometer */ | ||
105 | compatible = "st,lsm303dlm-magn"; | ||
106 | reg = <0x1e>; | ||
107 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
108 | vddio-supply = <&db8500_vsmps2_reg>; | ||
109 | pinctrl-names = "default"; | ||
110 | pinctrl-0 = <&magneto_tvk_mode>; | ||
111 | }; | ||
112 | l3g4200d@68 { | ||
113 | /* Gyroscope */ | ||
114 | compatible = "st,l3g4200d-gyro"; | ||
115 | st,drdy-int-pin = <2>; | ||
116 | reg = <0x68>; | ||
117 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
118 | vddio-supply = <&db8500_vsmps2_reg>; | ||
119 | }; | ||
120 | lsp001wm@5c { | ||
121 | /* Barometer/pressure sensor */ | ||
122 | compatible = "st,lps001wp-press"; | ||
123 | reg = <0x5c>; | ||
124 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
125 | vddio-supply = <&db8500_vsmps2_reg>; | ||
126 | }; | ||
127 | }; | ||
91 | pinctrl { | 128 | pinctrl { |
92 | /* Pull up this GPIO pin */ | 129 | /* Pull up this GPIO pin */ |
93 | tc35893 { | 130 | tc35893 { |
@@ -114,6 +151,28 @@ | |||
114 | }; | 151 | }; |
115 | }; | 152 | }; |
116 | }; | 153 | }; |
154 | accelerometer { | ||
155 | accel_tvk_mode: accel_tvk { | ||
156 | /* Accelerometer interrupt lines 1 & 2 */ | ||
157 | tvk_cfg { | ||
158 | ste,pins = "GPIO82_C1", "GPIO83_D3"; | ||
159 | ste,config = <&gpio_in_pu>; | ||
160 | }; | ||
161 | }; | ||
162 | }; | ||
163 | magnetometer { | ||
164 | magneto_tvk_mode: magneto_tvk { | ||
165 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ | ||
166 | tvk_cfg1 { | ||
167 | ste,pins = "GPIO31_V3"; | ||
168 | ste,config = <&gpio_in_pu>; | ||
169 | }; | ||
170 | tvk_cfg2 { | ||
171 | ste,pins = "GPIO32_V2"; | ||
172 | ste,config = <&gpio_in_pd>; | ||
173 | }; | ||
174 | }; | ||
175 | }; | ||
117 | }; | 176 | }; |
118 | }; | 177 | }; |
119 | }; | 178 | }; |
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 @@ | |||
35 | */ | 35 | */ |
36 | pinctrl-names = "default"; | 36 | pinctrl-names = "default"; |
37 | pinctrl-0 = <&ipgpio_hrefv60_mode>, | 37 | pinctrl-0 = <&ipgpio_hrefv60_mode>, |
38 | <&accel_hrefv60_mode>, | ||
39 | <&magneto_hrefv60_mode>, | ||
40 | <&etm_hrefv60_mode>, | 38 | <&etm_hrefv60_mode>, |
41 | <&nahj_hrefv60_mode>, | 39 | <&nahj_hrefv60_mode>, |
42 | <&nfc_hrefv60_mode>, | 40 | <&nfc_hrefv60_mode>, |
@@ -83,28 +81,6 @@ | |||
83 | }; | 81 | }; |
84 | }; | 82 | }; |
85 | }; | 83 | }; |
86 | accelerometer { | ||
87 | accel_hrefv60_mode: accel_hrefv60 { | ||
88 | /* Accelerometer interrupt lines 1 & 2 */ | ||
89 | hrefv60_cfg1 { | ||
90 | ste,pins = "GPIO82_C1", "GPIO83_D3"; | ||
91 | ste,config = <&gpio_in_pu>; | ||
92 | }; | ||
93 | }; | ||
94 | }; | ||
95 | magnetometer { | ||
96 | magneto_hrefv60_mode: magneto_hrefv60 { | ||
97 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ | ||
98 | hrefv60_cfg1 { | ||
99 | ste,pins = "GPIO31_V3"; | ||
100 | ste,config = <&gpio_in_pu>; | ||
101 | }; | ||
102 | hrefv60_cfg2 { | ||
103 | ste,pins = "GPIO32_V2"; | ||
104 | ste,config = <&gpio_in_pd>; | ||
105 | }; | ||
106 | }; | ||
107 | }; | ||
108 | etm { | 84 | etm { |
109 | /* | 85 | /* |
110 | * Drive D19-D23 for the ETM PTM trace interface low, | 86 | * 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 @@ | |||
241 | pinctrl-names = "default","sleep"; | 241 | pinctrl-names = "default","sleep"; |
242 | pinctrl-0 = <&i2c2_default_mode>; | 242 | pinctrl-0 = <&i2c2_default_mode>; |
243 | pinctrl-1 = <&i2c2_sleep_mode>; | 243 | pinctrl-1 = <&i2c2_sleep_mode>; |
244 | lsm303dlh@18 { | ||
245 | /* Accelerometer */ | ||
246 | compatible = "st,lsm303dlh-accel"; | ||
247 | st,drdy-int-pin = <1>; | ||
248 | reg = <0x18>; | ||
249 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
250 | vddio-supply = <&db8500_vsmps2_reg>; | ||
251 | pinctrl-names = "default"; | ||
252 | pinctrl-0 = <&accel_snowball_mode>; | ||
253 | }; | ||
254 | lsm303dlm@1e { | ||
255 | /* Magnetometer */ | ||
256 | compatible = "st,lsm303dlm-magn"; | ||
257 | reg = <0x1e>; | ||
258 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
259 | vddio-supply = <&db8500_vsmps2_reg>; | ||
260 | pinctrl-names = "default"; | ||
261 | pinctrl-0 = <&magneto_snowball_mode>; | ||
262 | }; | ||
263 | l3g4200d@68 { | ||
264 | /* Gyroscope */ | ||
265 | compatible = "st,l3g4200d-gyro"; | ||
266 | st,drdy-int-pin = <2>; | ||
267 | reg = <0x68>; | ||
268 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
269 | vddio-supply = <&db8500_vsmps2_reg>; | ||
270 | }; | ||
271 | lsp001wm@5c { | ||
272 | /* Barometer/pressure sensor */ | ||
273 | compatible = "st,lps001wp-press"; | ||
274 | reg = <0x5c>; | ||
275 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
276 | vddio-supply = <&db8500_vsmps2_reg>; | ||
277 | }; | ||
244 | }; | 278 | }; |
245 | 279 | ||
246 | i2c@80110000 { | 280 | i2c@80110000 { |
@@ -361,9 +395,7 @@ | |||
361 | * can be moved over to being controlled by respective device. | 395 | * can be moved over to being controlled by respective device. |
362 | */ | 396 | */ |
363 | pinctrl-names = "default"; | 397 | pinctrl-names = "default"; |
364 | pinctrl-0 = <&accel_snowball_mode>, | 398 | pinctrl-0 = <&gbf_snowball_mode>, |
365 | <&magneto_snowball_mode>, | ||
366 | <&gbf_snowball_mode>, | ||
367 | <&wlan_snowball_mode>; | 399 | <&wlan_snowball_mode>; |
368 | 400 | ||
369 | ethernet { | 401 | ethernet { |