Skip to content

Commit cfbab0e

Browse files
jerome-pouillerkartben
authored andcommitted
boards: silabs: siwx91x: Add support for QSPI controller
Thanks to the bootloader, the memory controller is preconfigured when Zephyr start on RB44342A. However, this is the opportunity to show how to configure the PSRAM controller on custom designs. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
1 parent 1d4a0d7 commit cfbab0e

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.dts

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@
3131
dht0 = &si7021;
3232
};
3333

34-
psram: psram@a000000 {
35-
compatible = "zephyr,memory-region", "mmio-sram";
36-
reg = <0xa000000 DT_SIZE_M(8)>;
37-
zephyr,memory-region = "psram";
38-
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>;
39-
};
40-
4134
leds {
4235
compatible = "gpio-leds";
4336

@@ -57,6 +50,17 @@
5750
};
5851

5952
&pinctrl0 {
53+
psram_default: psram_default {
54+
group {
55+
pinmux = <PSRAM_CLK_HP52>,
56+
<PSRAM_D0_HP53>,
57+
<PSRAM_D1_HP54>,
58+
<PSRAM_D2_HP56>,
59+
<PSRAM_D3_HP57>,
60+
<PSRAM_CSN0_HP55>;
61+
};
62+
};
63+
6064
ulpuart_default: ulpuart_default {
6165
out {
6266
pinmux = <ULPUART_TX_ULP11>;
@@ -109,6 +113,23 @@
109113
};
110114
};
111115

116+
&psramctrl0 {
117+
status = "okay";
118+
clocks = <&clock0 SIWX91X_CLK_QSPI>;
119+
pinctrl-0 = <&psram_default>;
120+
pinctrl-names = "default";
121+
device-id = [ 0d 5d 00 00 00 00 00 00 ];
122+
normal-freq = <DT_FREQ_M(33)>;
123+
fast-freq = <DT_FREQ_M(144)>;
124+
125+
psram: psram@a000000 {
126+
compatible = "zephyr,memory-region", "mmio-sram";
127+
reg = <0xa000000 DT_SIZE_M(8)>;
128+
zephyr,memory-region = "psram";
129+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>;
130+
};
131+
};
132+
112133
&bt_hci0 {
113134
status = "okay";
114135
};

boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ CONFIG_CONSOLE=y
77
CONFIG_UART_CONSOLE=y
88
CONFIG_SERIAL=y
99
CONFIG_CLOCK_CONTROL=y
10+
CONFIG_MEMC=y
11+
12+
CONFIG_CLOCK_CONTROL_INIT_PRIORITY=28
13+
CONFIG_MEMC_INIT_PRIORITY=29

dts/arm/silabs/siwg917.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@
8888
};
8989
};
9090

91+
psramctrl0: memory-controller@12040000 {
92+
compatible = "silabs,siwx91x-qspi-memory";
93+
reg = <0x12040000 0x200>;
94+
#address-cells = <1>;
95+
#size-cells = <1>;
96+
status = "disabled";
97+
};
98+
9199
ulpuart: uart@24041800 {
92100
compatible = "ns16550";
93101
reg = <0x24041800 0x1000>;

0 commit comments

Comments
 (0)