Skip to content

Commit 20aa2bc

Browse files
chrtaMaureenHelm
authored andcommitted
boards: efr32_slwstk6061a: Add support for spi nor flash
This commit adds support for the on-board flash MX25R8035F that is directly connected to the efr32fg soc. Signed-off-by: Christian Taedcke <[email protected]>
1 parent 0201d18 commit 20aa2bc

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

boards/arm/efr32_slwstk6061a/doc/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ The efr32_slwstk6061a board configuration supports the following hardware featur
6969
| UART | on-chip | serial port-polling; |
7070
| | | serial port-interrupt |
7171
+-----------+------------+-------------------------------------+
72+
| SPI(M) | on-chip | spi port-polling |
73+
+-----------+------------+-------------------------------------+
7274

7375
The default configuration can be found in the defconfig file:
7476

@@ -103,6 +105,14 @@ means Pin number 2 on PORTA, as used in the board's datasheets and manuals.
103105
+-------+-------------+-------------------------------------+
104106
| PA1 | USART0_RX | UART Console EFM_BC_RX US0_RX #0 |
105107
+-------+-------------+-------------------------------------+
108+
| PC6 | SPI_MOSI | Flash MOSI US1_TX #11 |
109+
+-------+-------------+-------------------------------------+
110+
| PC7 | SPI_MISO | Flash MISO US1_RX #11 |
111+
+-------+-------------+-------------------------------------+
112+
| PC8 | SPI_SCLK | Flash SCLK US1_CLK #11 |
113+
+-------+-------------+-------------------------------------+
114+
| PA4 | SPI_CS | Flash Chip Select (GPIO) |
115+
+-------+-------------+-------------------------------------+
106116

107117
System Clock
108118
============

boards/arm/efr32_slwstk6061a/efr32_slwstk6061a.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,31 @@
6666
status = "okay";
6767
};
6868

69+
&usart1 {
70+
compatible = "silabs,gecko-spi-usart";
71+
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
75+
location-rx = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(7)>;
76+
location-tx = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(6)>;
77+
location-clk = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(8)>;
78+
79+
cs-gpios = <&gpioa 4 0>;
80+
81+
status = "okay";
82+
83+
mx25r80: mx25r8035f@0 {
84+
compatible = "jedec,spi-nor";
85+
label = "MX25R8035F";
86+
reg = <0>;
87+
spi-max-frequency = <80000000>;
88+
size = <0x800000>;
89+
has-be32k;
90+
jedec-id = [c2 28 14];
91+
};
92+
};
93+
6994
&rtcc0 {
7095
prescaler = <1>;
7196
status = "okay";

boards/arm/efr32_slwstk6061a/efr32_slwstk6061a.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ toolchain:
1111
supported:
1212
- gpio
1313
- nvs
14+
- spi
1415
testing:
1516
ignore_tags:
1617
- net

soc/arm/silabs_exx32/efr32fg1p/Kconfig.defconfig.efr32fg1p

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ config SOC_FLASH_GECKO
3030
default y
3131

3232
endif # FLASH
33+
34+
if SPI
35+
36+
config SPI_GECKO
37+
default y
38+
39+
endif # SPI

0 commit comments

Comments
 (0)