soc: stm32mp157: add I2c support

Add I2C support and I2C5 configuration for arduino connector.

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@linaro.org>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@linaro.org>
This commit is contained in:
Christophe Priouzeau 2019-06-25 08:54:37 +02:00 committed by Kumar Gala
commit 83fb969cfb
4 changed files with 37 additions and 1 deletions

View file

@ -47,4 +47,11 @@ config IPM_STM32_IPCC
endif # IPM
if I2C_STM32
config I2C_STM32_V2
default y
endif # I2C_STM32
endif # SOC_SERIES_STM32MP1X

View file

@ -313,4 +313,16 @@
DT_ST_STM32_UART_40019000_CLOCK_BUS
#define DT_UART_STM32_UART_8_HW_FLOW_CONTROL \
DT_ST_STM32_UART_40019000_HW_FLOW_CONTROL
#define DT_I2C_5_BASE_ADDRESS DT_ST_STM32_I2C_V2_40015000_BASE_ADDRESS
#define DT_I2C_5_EVENT_IRQ_PRI DT_ST_STM32_I2C_V2_40015000_IRQ_EVENT_PRIORITY
#define DT_I2C_5_ERROR_IRQ_PRI DT_ST_STM32_I2C_V2_40015000_IRQ_ERROR_PRIORITY
#define CONFIG_I2C_5_NAME DT_ST_STM32_I2C_V2_40015000_LABEL
#define DT_I2C_5_EVENT_IRQ DT_ST_STM32_I2C_V2_40015000_IRQ_EVENT
#define DT_I2C_5_ERROR_IRQ DT_ST_STM32_I2C_V2_40015000_IRQ_ERROR
#define DT_I2C_5_BITRATE DT_ST_STM32_I2C_V2_40015000_CLOCK_FREQUENCY
#define DT_I2C_5_CLOCK_BITS DT_ST_STM32_I2C_V2_40015000_CLOCK_BITS
#define DT_I2C_5_CLOCK_BUS DT_ST_STM32_I2C_V2_40015000_CLOCK_BUS
/* End of SoC Level DTS fixup file */

View file

@ -50,6 +50,10 @@
#include <stm32mp1xx_ll_ipcc.h>
#endif
#ifdef CONFIG_I2C
#include <stm32mp1xx_ll_i2c.h>
#endif
#endif /* !_ASMLANGUAGE */
#endif /* _STM32MP1SOC_H_ */