From b6b44b2feae5f5861ad65afe30a141943972ad07 Mon Sep 17 00:00:00 2001 From: Armando Visconti Date: Mon, 27 Jan 2020 11:47:45 +0100 Subject: [PATCH] boards/nucleo_f411re: Enable I2S support I2S may be needed by any shield mounted on this nucleo. So change pinmux and dts file. Signed-off-by: Armando Visconti --- boards/arm/nucleo_f411re/arduino_r3_connector.dtsi | 1 + boards/arm/nucleo_f411re/doc/index.rst | 6 +++++- boards/arm/nucleo_f411re/nucleo_f411re.yaml | 1 + boards/arm/nucleo_f411re/pinmux.c | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/boards/arm/nucleo_f411re/arduino_r3_connector.dtsi b/boards/arm/nucleo_f411re/arduino_r3_connector.dtsi index bccf9e6206..9145f689fd 100644 --- a/boards/arm/nucleo_f411re/arduino_r3_connector.dtsi +++ b/boards/arm/nucleo_f411re/arduino_r3_connector.dtsi @@ -36,4 +36,5 @@ }; arduino_i2c: &i2c1 {}; +arduino_i2s: &i2s1 {}; arduino_spi: &spi1 {}; diff --git a/boards/arm/nucleo_f411re/doc/index.rst b/boards/arm/nucleo_f411re/doc/index.rst index c2b30c13e8..c60f540727 100644 --- a/boards/arm/nucleo_f411re/doc/index.rst +++ b/boards/arm/nucleo_f411re/doc/index.rst @@ -52,7 +52,7 @@ Nucleo F411RE provides the following hardware components: - SysTick timer - USART/UART (3) - I2C (3) -- SPI (5) +- SPI/I2S (5) - SDIO - USB 2.0 OTG FS - DMA Controller @@ -83,6 +83,8 @@ The Zephyr nucleo_f411re board configuration supports the following hardware fea +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ +| I2S | on-chip | i2s | ++-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ @@ -122,9 +124,11 @@ Default Zephyr Peripheral Mapping: - I2C2 SCL/SDA : PB10/PB3 - I2C1 SCL/SDA : PA8/B4 - SPI1 CS/SCK/MISO/MOSI : PA4/PA5/PA6/PA7 (Arduino SPI) +- I2S1 SCK/SD : PA5/PA7 (Arduino I2S) - USER_PB : PC13 - LD2 : PA5 +.. note:: Please note that SPI1 and I2S1 are connected to the same mcu pins, as the h/w controller is the same one. System Clock ------------ diff --git a/boards/arm/nucleo_f411re/nucleo_f411re.yaml b/boards/arm/nucleo_f411re/nucleo_f411re.yaml index e29b070598..1a7a9fafa5 100644 --- a/boards/arm/nucleo_f411re/nucleo_f411re.yaml +++ b/boards/arm/nucleo_f411re/nucleo_f411re.yaml @@ -9,6 +9,7 @@ toolchain: supported: - arduino_gpio - arduino_i2c + - arduino_i2s - arduino_spi - counter - gpio diff --git a/boards/arm/nucleo_f411re/pinmux.c b/boards/arm/nucleo_f411re/pinmux.c index 3829323d1c..6dfe889f1b 100644 --- a/boards/arm/nucleo_f411re/pinmux.c +++ b/boards/arm/nucleo_f411re/pinmux.c @@ -34,7 +34,8 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) || \ + DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s1)) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */