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>
This commit is contained in:
Linus Walleij 2014-04-12 17:13:23 +02:00
parent 14cdf8cbc7
commit d0e3bc8133
3 changed files with 94 additions and 27 deletions

View File

@ -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>;
};
};
};
};
};
};

View File

@ -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,

View File

@ -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 {