boards: arm: stm32f469i_disco: add Arduino SPI support

Add Arduino SPI support for stm32f469i_disco.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2021-06-09 15:58:53 +02:00 committed by Anas Nashif
commit b56ae7b2a3
4 changed files with 47 additions and 5 deletions

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2021 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
arduino_header: connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpiob 1 0>, /* A0 */
<1 0 &gpioc 2 0>, /* A1 */
<2 0 &gpioc 3 0>, /* A2 */
<3 0 &gpioc 4 0>, /* A3 */
<4 0 &gpioc 5 0>, /* A4 */
<5 0 &gpioa 4 0>, /* A5 */
<6 0 &gpiog 9 0>, /* D0 */
<7 0 &gpiog 14 0>, /* D1 */
<8 0 &gpiog 15 0>, /* D2 */
<9 0 &gpioa 1 0>, /* D3 */
<10 0 &gpiog 12 0>, /* D4 */
<11 0 &gpioa 2 0>, /* D5 */
<12 0 &gpioa 6 0>, /* D6 */
<13 0 &gpiog 11 0>, /* D7 */
<14 0 &gpiog 10 0>, /* D8 */
<15 0 &gpioa 7 0>, /* D9 */
<16 0 &gpioh 6 0>, /* D10 */
<17 0 &gpiob 15 0>, /* D11 */
<18 0 &gpiob 14 0>, /* D12 */
<19 0 &gpiod 3 0>, /* D13 */
<20 0 &gpiob 9 0>, /* D14 */
<21 0 &gpiob 8 0>; /* D15 */
};
};
arduino_i2c: &i2c1 {};
arduino_spi: &spi2 {};
arduino_serial: &usart6 {};

View file

@ -97,6 +97,8 @@ The Zephyr stm32f469i_disco board configuration supports the following hardware
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on Zephyr porting.
@ -118,7 +120,7 @@ Default Zephyr Peripheral Mapping:
- UART_3 TX/RX : PB10/PB11 (ST-Link Virtual Port Com)
- UART_6 TX/RX : PG14/PG9 (Arduino Serial)
- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
- SPI2 SCK/MISO/MOSI : PD3/PB14/PB15 (Arduino SPI)
- SPI2 NSS/SCK/MISO/MOSI : PH6/PD3/PB14/PB15 (Arduino SPI)
- USB DM : PA11
- USB DP : PA12
- USER_PB : PA0

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <st/f4/stm32f469Xi.dtsi>
#include <st/f4/stm32f469nihx-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
/ {
model = "STMicroelectronics STM32F469I-DISCO board";
@ -57,10 +58,6 @@
};
};
arduino_i2c: &i2c1 {};
arduino_spi: &spi2 {};
arduino_serial: &usart6 {};
&clk_hse {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
@ -102,6 +99,7 @@ arduino_serial: &usart6 {};
&spi2 {
pinctrl-0 = <&spi2_sck_pd3 &spi2_miso_pb14 &spi2_mosi_pb15>;
cs-gpios = <&gpioh 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
status = "okay";
};

View file

@ -13,5 +13,7 @@ supported:
- counter
- i2c
- spi
- arduino_spi
- gpio
- arduino_gpio
- usb_device