boards: arm: fix i2c pin and add SPI to docs

When I added this board recently I mistakenly placed
the Arduino SCL pin (Default Zephyr pin) as PB6
when it should be PB8.

The SPI node is now properly set to SPI2 peripheral
instead of SPI1. SPI2 is the most suitable to follow
the silkscreen on the printed circuit board.

Added arduino_gpio to yaml.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
This commit is contained in:
Guðni Már Gilbert 2021-04-27 07:17:51 +00:00 committed by Anas Nashif
commit be1f9403de
4 changed files with 13 additions and 11 deletions

View file

@ -36,4 +36,4 @@
};
arduino_i2c: &i2c1 {};
arduino_spi: &spi1 {};
arduino_spi: &spi2 {};

View file

@ -151,6 +151,8 @@ The Zephyr ``nucleo_l412rb_p`` board configuration supports the following hardwa
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
@ -179,13 +181,12 @@ For mode details please refer to `ST Nucleo L412RB-P User Manual`_.
Default Zephyr Peripheral Mapping:
----------------------------------
- LPUART_1_TX : PA2
- LPUART_1_RX : PA3
- UART_1_TX : PA9
- UART_1_RX : PA10
- I2C_1_SCL : PB6
- I2C_1_SDA : PB7
- LPUART1 TX/RX : PA2/PA3
- I2C1 SCL/SDA : PB8/PB7 (Arduino I2C)
- SPI2 CS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15 (Arduino SPI)
- UART1 TX/RX : PA9/PA10
- PWM_2_CH1 : PA0
- USER_PB : PC13
- LD4 : PB13
System Clock

View file

@ -53,14 +53,14 @@
current-speed = <115200>;
};
&spi1 {
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
&spi1_miso_pa6 &spi1_mosi_pa7>;
&spi2 {
pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13
&spi2_miso_pb14 &spi2_mosi_pb15>;
status = "okay";
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>;
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

View file

@ -14,5 +14,6 @@ supported:
- counter
- spi
- i2c
- arduino_gpio
- arduino_i2c
- arduino_spi