Skip to content

Commit 0201d18

Browse files
chrtaMaureenHelm
authored andcommitted
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 <[email protected]>
1 parent 6da94af commit 0201d18

File tree

5 files changed

+46
-0
lines changed

5 files changed

+46
-0
lines changed

boards/arm/efr32mg_sltb004a/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ config GPIO_GECKO_PORTD
2525
config GPIO_GECKO_PORTF
2626
default y
2727

28+
config GPIO_GECKO_PORTK
29+
default y
30+
2831
endif # GPIO_GECKO
2932

3033
if COUNTER

boards/arm/efr32mg_sltb004a/doc/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ The efr32mg_sltb004a board configuration supports the following hardware feature
7676
+-----------+------------+-------------------------------------+
7777
| I2C | on-chip | i2c port-polling |
7878
+-----------+------------+-------------------------------------+
79+
| SPI(M) | on-chip | spi port-polling |
80+
+-----------+------------+-------------------------------------+
7981

8082
The default configuration can be found in the defconfig file:
8183
``boards/arm/efr32mg_sltb004a/efr32mg_sltb004a_defconfig``.
@@ -119,6 +121,14 @@ in the board's and microcontroller's datasheets and manuals.
119121
+------+-------------+-----------------------------------+
120122
| PC5 | I2C_SCL | ENV_I2C_SCL I2C1_SCL #17 |
121123
+------+-------------+-----------------------------------+
124+
| PK0 | SPI_MOSI | Flash MOSI US2_TX #29 |
125+
+------+-------------+-----------------------------------+
126+
| PK2 | SPI_MISO | Flash MISO US2_RX #30 |
127+
+------+-------------+-----------------------------------+
128+
| PF7 | SPI_SCLK | Flash SCLK US2_CLK #18 |
129+
+------+-------------+-----------------------------------+
130+
| PK1 | SPI_CS | Flash Chip Select (GPIO) |
131+
+------+-------------+-----------------------------------+
122132

123133
System Clock
124134
============

boards/arm/efr32mg_sltb004a/efr32mg_sltb004a.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,31 @@
6363
status = "okay";
6464
};
6565

66+
&usart2 {
67+
compatible = "silabs,gecko-spi-usart";
68+
69+
#address-cells = <1>;
70+
#size-cells = <0>;
71+
72+
location-rx = <GECKO_LOCATION(30) GECKO_PORT_K GECKO_PIN(2)>;
73+
location-tx = <GECKO_LOCATION(29) GECKO_PORT_K GECKO_PIN(0)>;
74+
location-clk = <GECKO_LOCATION(18) GECKO_PORT_F GECKO_PIN(7)>;
75+
76+
cs-gpios = <&gpiok 1 0>;
77+
78+
status = "okay";
79+
80+
mx25r80: mx25r8035f@0 {
81+
compatible = "jedec,spi-nor";
82+
label = "MX25R8035F";
83+
reg = <0>;
84+
spi-max-frequency = <80000000>;
85+
size = <0x800000>;
86+
has-be32k;
87+
jedec-id = [c2 28 14];
88+
};
89+
};
90+
6691
&leuart0 {
6792
current-speed = <9600>;
6893
location-rx = <GECKO_LOCATION(27) GECKO_PORT_F GECKO_PIN(4)>;

boards/arm/efr32mg_sltb004a/efr32mg_sltb004a.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ supported:
1212
- gpio
1313
- i2c
1414
- nvs
15+
- spi
1516
testing:
1617
ignore_tags:
1718
- net

soc/arm/silabs_exx32/efr32mg12p/Kconfig.defconfig.efr32mg12p

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ config SOC_FLASH_GECKO
3333
default y
3434

3535
endif # FLASH
36+
37+
if SPI
38+
39+
config SPI_GECKO
40+
default y
41+
42+
endif # SPI

0 commit comments

Comments
 (0)