Skip to content

Commit 47c0736

Browse files
committed
boards: renesas: Add flash support for RZ/A3UL, N2L, T2M
Add flash support for RZ/A3UL, N2L, T2M Signed-off-by: Tien Nguyen <[email protected]> boards: renesas: Update zephyr,flash device
1 parent 64cf169 commit 47c0736

File tree

7 files changed

+101
-26
lines changed

7 files changed

+101
-26
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config FLASH_LOAD_OFFSET
5+
default $(dt_nodelabel_reg_addr_hex,header)

boards/renesas/rza3ul_smarc/rza3ul_smarc.dts

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
chosen {
2020
zephyr,sram = &ddr;
21-
zephyr,flash = &spi_flash;
21+
zephyr,flash = &at25ql128a;
2222
zephyr,console = &scif0;
2323
zephyr,shell-uart = &scif0;
2424
zephyr,code-partition = &slot0_partition;
@@ -36,28 +36,6 @@
3636
zephyr,memory-region = "SRAM";
3737
};
3838

39-
spi_flash: memory@20020000 {
40-
compatible = "mmio-sram";
41-
reg = <0x20020000 (DT_SIZE_M(16) - 0x20000)>;
42-
43-
partitions {
44-
compatible = "fixed-partitions";
45-
#address-cells = <1>;
46-
#size-cells = <1>;
47-
48-
header: partition@0 {
49-
label = "header";
50-
reg = <0x00000000 0x200>;
51-
read-only;
52-
};
53-
54-
slot0_partition: partition@200 {
55-
label = "image-0";
56-
reg = <0x00000200 (DT_SIZE_M(16) - 0x20200)>;
57-
read-only;
58-
};
59-
};
60-
};
6139
};
6240

6341
&scif0 {
@@ -76,3 +54,38 @@
7654
pinctrl-names = "default";
7755
status = "okay";
7856
};
57+
58+
&spibsc {
59+
status = "okay";
60+
61+
at25ql128a: qspi-nor-flash@20000000 {
62+
compatible = "renesas,rz-qspi-spibsc";
63+
reg = <0x20000000 DT_SIZE_M(16)>; /* 128 Mbits */
64+
write-block-size = <1>;
65+
erase-block-size = <4096>;
66+
status = "okay";
67+
68+
partitions {
69+
compatible = "fixed-partitions";
70+
#address-cells = <1>;
71+
#size-cells = <1>;
72+
73+
reserved: partition@0 {
74+
reg = <0x00000000 0x20000>;
75+
read-only;
76+
};
77+
78+
header: partition@20000 {
79+
label = "header";
80+
reg = <0x00020000 0x200>;
81+
read-only;
82+
};
83+
84+
slot0_partition: partition@20200 {
85+
label = "image-0";
86+
reg = <0x00020200 (DT_SIZE_M(16) - 0x20200)>;
87+
read-only;
88+
};
89+
};
90+
};
91+
};

boards/renesas/rzn2l_rsk/rzn2l_rsk-pinctrl.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,18 @@
4848
<RZN_PINMUX(PORT_05, 3, 9)>; /* SDA */
4949
};
5050
};
51+
52+
/omit-if-no-ref/ xspi0_default: xspi0_default {
53+
xspi0-pinmux {
54+
pinmux = <RZN_PINMUX(PORT_14, 6, 0)>, /* XSPI0_CKP */
55+
<RZN_PINMUX(PORT_14, 5, 0)>, /* XSPI0_CKN */
56+
<RZN_PINMUX(PORT_15, 7, 0)>, /* XSPI0_CS0 */
57+
<RZN_PINMUX(PORT_14, 7, 0)>, /* XSPI0_IO0 */
58+
<RZN_PINMUX(PORT_15, 0, 0)>, /* XSPI0_IO1 */
59+
<RZN_PINMUX(PORT_15, 1, 0)>, /* XSPI0_IO2 */
60+
<RZN_PINMUX(PORT_15, 2, 0)>, /* XSPI0_IO3 */
61+
<RZN_PINMUX(PORT_16, 1, 0)>, /* XSPI0_RESET0 */
62+
<RZN_PINMUX(PORT_16, 3, 1)>; /* XSPI0_RSTO0 */
63+
};
64+
};
5165
};

boards/renesas/rzn2l_rsk/rzn2l_rsk.dts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
chosen {
1616
zephyr,sram = &atcm;
17-
zephyr,flash = &xspi0_cs0;
17+
zephyr,flash = &mx25u51245g;
1818
zephyr,code-partition = &slot0_partition;
1919
zephyr,console = &uart0;
2020
zephyr,shell-uart = &uart0;
@@ -123,3 +123,17 @@
123123
pinctrl-names = "default";
124124
status = "okay";
125125
};
126+
127+
&xspi0 {
128+
pinctrl-0 = <&xspi0_default>;
129+
pinctrl-names = "default";
130+
status = "okay";
131+
132+
mx25u51245g: qspi-nor-flash@60000000 {
133+
compatible = "renesas,rz-qspi-xspi";
134+
reg = <0x60000000 DT_SIZE_M(64)>; /* 512 Mbits */
135+
write-block-size = <1>;
136+
erase-block-size = <4096>;
137+
status = "okay";
138+
};
139+
};

boards/renesas/rzt2m_rsk/rzt2m_rsk-pinctrl.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,19 @@
4040
<RZT_PINMUX(PORT_22, 7, 2)>; /* SDA */
4141
};
4242
};
43+
44+
/omit-if-no-ref/ xspi0_default: xspi0_default {
45+
xspi0-pinmux {
46+
pinmux = <RZT_PINMUX(PORT_14, 6, 0)>, /* XSPI0_CKP */
47+
<RZT_PINMUX(PORT_14, 5, 0)>, /* XSPI0_CKN */
48+
<RZT_PINMUX(PORT_15, 7, 0)>, /* XSPI0_CS0 */
49+
<RZT_PINMUX(PORT_14, 7, 0)>, /* XSPI0_IO0 */
50+
<RZT_PINMUX(PORT_15, 0, 0)>, /* XSPI0_IO1 */
51+
<RZT_PINMUX(PORT_15, 1, 0)>, /* XSPI0_IO2 */
52+
<RZT_PINMUX(PORT_15, 2, 0)>, /* XSPI0_IO3 */
53+
<RZT_PINMUX(PORT_16, 1, 0)>, /* XSPI0_RESET0 */
54+
<RZT_PINMUX(PORT_16, 3, 1)>; /* XSPI0_RSTO0 */
55+
};
56+
};
57+
4358
};

boards/renesas/rzt2m_rsk/rzt2m_rsk_r9a07g075m24gbg_cr520.dts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
chosen {
1818
zephyr,sram = &cpu0_atcm;
19-
zephyr,flash = &xspi0_cs0;
19+
zephyr,flash = &mx25u51245g;
2020
zephyr,code-partition = &slot0_partition;
2121
zephyr,console = &uart0;
2222
zephyr,shell-uart = &uart0;
@@ -120,3 +120,17 @@
120120
&adc1 {
121121
status = "okay";
122122
};
123+
124+
&xspi0 {
125+
pinctrl-0 = <&xspi0_default>;
126+
pinctrl-names = "default";
127+
status = "okay";
128+
129+
mx25u51245g: qspi-nor-flash@60000000 {
130+
compatible = "renesas,rz-qspi-xspi";
131+
reg = <0x60000000 DT_SIZE_M(64)>; /* 512 Mbits */
132+
write-block-size = <1>;
133+
erase-block-size = <4096>;
134+
status = "okay";
135+
};
136+
};

soc/renesas/rz/rza3ul/sections.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
SECTION_PROLOGUE(.header, CONFIG_FLASH_BASE_ADDRESS,)
7+
SECTION_PROLOGUE(.header, CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_LOAD_OFFSET,)
88
{
99
QUAD(__start)
1010
QUAD(0xFFFFFFFFFFFFFFFF-__start)

0 commit comments

Comments
 (0)