boards: stm32: argonkey: Add dts support to sensors
This patch adds dts support to lps22hb/hts221/vl53l0x I2C sensors as well as lsm6dsl SPI sensor. Since some info, like gpio for irq triggering or SPI bus characteristics, may be provided through dts, they need to be made optional in the LSM6DSL driver by usage of macros like HAS_DTS_SPI_PINS or HAS_DTS_SPI_DEVICE. Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
36b0c321a7
commit
17c15ff182
4 changed files with 68 additions and 1 deletions
|
@ -53,6 +53,15 @@
|
|||
|
||||
&spi2 {
|
||||
status = "ok";
|
||||
|
||||
/* ST Microelectronics LSM6DSL accel/gyro sensor */
|
||||
lsm6dsl@1 {
|
||||
compatible = "st,lsm6dsl-spi";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <1000000>;
|
||||
irq-gpios = <&gpiob 1 0>;
|
||||
label = "LSM6DSL-SPI";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
|
@ -63,6 +72,24 @@
|
|||
&i2c2 {
|
||||
status = "ok";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
|
||||
hts221@5f {
|
||||
compatible = "st,hts221";
|
||||
reg = <0x5f>;
|
||||
label = "HTS221";
|
||||
};
|
||||
|
||||
lps22hb-press@5d {
|
||||
compatible = "st,lps22hb-press";
|
||||
reg = <0x5d>;
|
||||
label = "LPS22HB";
|
||||
};
|
||||
|
||||
vl53l0x@29 {
|
||||
compatible = "st,vl53l0x";
|
||||
reg = <0x29>;
|
||||
label = "VL53L0X";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue