boards: efr32mg_sltb004a: Add support for spi nor flash

This commit adds support for the on-board flash MX25R8035F that is
directly connected to the efr32mg soc.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
This commit is contained in:
Christian Taedcke 2019-10-28 14:24:01 +01:00 committed by Maureen Helm
commit 0201d182a8
5 changed files with 46 additions and 0 deletions

View file

@ -25,6 +25,9 @@ config GPIO_GECKO_PORTD
config GPIO_GECKO_PORTF
default y
config GPIO_GECKO_PORTK
default y
endif # GPIO_GECKO
if COUNTER

View file

@ -76,6 +76,8 @@ The efr32mg_sltb004a board configuration supports the following hardware feature
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c port-polling |
+-----------+------------+-------------------------------------+
| SPI(M) | on-chip | spi port-polling |
+-----------+------------+-------------------------------------+
The default configuration can be found in the defconfig file:
``boards/arm/efr32mg_sltb004a/efr32mg_sltb004a_defconfig``.
@ -119,6 +121,14 @@ in the board's and microcontroller's datasheets and manuals.
+------+-------------+-----------------------------------+
| PC5 | I2C_SCL | ENV_I2C_SCL I2C1_SCL #17 |
+------+-------------+-----------------------------------+
| PK0 | SPI_MOSI | Flash MOSI US2_TX #29 |
+------+-------------+-----------------------------------+
| PK2 | SPI_MISO | Flash MISO US2_RX #30 |
+------+-------------+-----------------------------------+
| PF7 | SPI_SCLK | Flash SCLK US2_CLK #18 |
+------+-------------+-----------------------------------+
| PK1 | SPI_CS | Flash Chip Select (GPIO) |
+------+-------------+-----------------------------------+
System Clock
============

View file

@ -63,6 +63,31 @@
status = "okay";
};
&usart2 {
compatible = "silabs,gecko-spi-usart";
#address-cells = <1>;
#size-cells = <0>;
location-rx = <GECKO_LOCATION(30) GECKO_PORT_K GECKO_PIN(2)>;
location-tx = <GECKO_LOCATION(29) GECKO_PORT_K GECKO_PIN(0)>;
location-clk = <GECKO_LOCATION(18) GECKO_PORT_F GECKO_PIN(7)>;
cs-gpios = <&gpiok 1 0>;
status = "okay";
mx25r80: mx25r8035f@0 {
compatible = "jedec,spi-nor";
label = "MX25R8035F";
reg = <0>;
spi-max-frequency = <80000000>;
size = <0x800000>;
has-be32k;
jedec-id = [c2 28 14];
};
};
&leuart0 {
current-speed = <9600>;
location-rx = <GECKO_LOCATION(27) GECKO_PORT_F GECKO_PIN(4)>;

View file

@ -12,6 +12,7 @@ supported:
- gpio
- i2c
- nvs
- spi
testing:
ignore_tags:
- net

View file

@ -33,3 +33,10 @@ config SOC_FLASH_GECKO
default y
endif # FLASH
if SPI
config SPI_GECKO
default y
endif # SPI