boards: stm32_min_dev enable I2C_2

Add support of i2c peripheral for mini_dev boards

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
This commit is contained in:
Pavlo Hamov 2019-07-26 01:02:43 +03:00 committed by Kumar Gala
commit c78acb75e4
4 changed files with 22 additions and 0 deletions

View file

@ -23,6 +23,9 @@ if I2C
config I2C_1 config I2C_1
default y default y
config I2C_2
default y
endif # I2C endif # I2C
if PWM if PWM

View file

@ -108,6 +108,16 @@ The stm32_min_dev board configuration supports the following hardware features:
Other hardware features are not supported by the Zephyr kernel. Other hardware features are not supported by the Zephyr kernel.
I2C
===
The STM32 Minimum Development Board board supports two I2C devices. The default
I2C mapping for Zephyr is:
- I2C1_SCL : PB6
- I2C1_SDA : PB7
- I2C2_SCL : PB10
- I2C2_SDA : PB11
Programming and Debugging Programming and Debugging
************************* *************************

View file

@ -30,6 +30,10 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL},
{STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA}, {STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA},
#endif /* CONFIG_I2C_1 */ #endif /* CONFIG_I2C_1 */
#ifdef CONFIG_I2C_2
{STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL},
{STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA},
#endif /* CONFIG_I2C_2 */
#ifdef CONFIG_PWM_STM32_1 #ifdef CONFIG_PWM_STM32_1
{STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1}, {STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1},
#endif /* CONFIG_PWM_STM32_1 */ #endif /* CONFIG_PWM_STM32_1 */

View file

@ -55,6 +55,11 @@
clock-frequency = <I2C_BITRATE_FAST>; clock-frequency = <I2C_BITRATE_FAST>;
}; };
&i2c2 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};
&spi1 { &spi1 {
status = "okay"; status = "okay";
}; };