board: disco_l475_iot1: Provide sensor configuration settings
Provide default settings in disco_l475_iot board for following
sensors: LSM6DSL, LIS3MDL, LPS22HB, HTS221.
Sensors are disabled by default.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
diff --git a/boards/arm/disco_l475_iot1/Kconfig.defconfig b/boards/arm/disco_l475_iot1/Kconfig.defconfig
index ec19c62..aa88dcf 100644
--- a/boards/arm/disco_l475_iot1/Kconfig.defconfig
+++ b/boards/arm/disco_l475_iot1/Kconfig.defconfig
@@ -46,6 +46,18 @@
endif # SERIAL
+if I2C
+
+config I2C_0
+ def_bool n
+
+config I2C_1
+ def_bool n
+
+config I2C_2
+ def_bool y
+
+endif # I2C
if PWM
@@ -56,4 +68,47 @@
def_bool y
endif # PWM
+
+if LSM6DSL
+
+config LSM6DSL_I2C_MASTER_DEV_NAME
+ default "I2C_2"
+
+endif #LSM6DSL
+
+if LPS22HB
+
+config LPS22HB_I2C_MASTER_DEV_NAME
+ default "I2C_2"
+
+config LPS22HB_I2C_ADDR
+ default 0x5D
+
+endif #LPS22HB
+
+if LIS3MDL
+
+config LIS3MDL_I2C_MASTER_DEV_NAME
+ default "I2C_2"
+
+choice LIS3MDL_TRIGGER_MODE
+ default LIS3MDL_TRIGGER_NONE
+endchoice
+
+config LIS3MDL_I2C_ADDR
+ default 0x1E
+
+endif #LIS3MDL
+
+if HTS221
+
+config HTS221_I2C_MASTER_DEV_NAME
+ default "I2C_2"
+
+choice HTS221_TRIGGER_MODE
+ default HTS221_TRIGGER_NONE
+endchoice
+
+endif #HTS221
+
endif # BOARD_DISCO_L475_IOT1
diff --git a/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig b/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig
index 2d00351..5d29949 100644
--- a/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig
+++ b/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig
@@ -50,10 +50,6 @@
CONFIG_I2C=y
CONFIG_I2C_STM32_V2=y
-#configure HTS221 sensor
-CONFIG_HTS221_I2C_MASTER_DEV_NAME="I2C_2"
-CONFIG_HTS221_TRIGGER_NONE=y
-
CONFIG_SPI=y
CONFIG_SPI_STM32=y
CONFIG_SPI_STM32_INTERRUPT=y