Skip to content

Commit ce36bd7

Browse files
dts: arm: renesas: Add support Flash LP for Renesas RA4, RA2
Add dts node to support Flash LP for: - RA4: RA4M1, RA4W1 - RA2: RA2A1, RA2L1 Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
1 parent e1ef286 commit ce36bd7

File tree

9 files changed

+123
-33
lines changed

9 files changed

+123
-33
lines changed

dts/arm/renesas/ra/ra2/r7fa2a1ab3cfm.dtsi

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@
99
/ {
1010
soc {
1111
flash-controller@407e0000 {
12+
flash-hardware-version = <3>;
13+
#erase-block-cells = <2>;
14+
1215
flash0: flash@0 {
13-
compatible = "soc-nv-flash";
14-
reg = <0x00000000 DT_SIZE_K(256)>;
16+
compatible = "renesas,ra-nv-code-flash";
17+
reg = <0x0 DT_SIZE_K(256)>;
18+
write-block-size = <8>;
19+
erase-block-size = <2048>;
20+
erase-blocks = <&flash 128 2048>;
21+
programming-enable;
1522
};
23+
1624
flash1: flash@40100000 {
17-
compatible = "soc-nv-flash";
25+
compatible = "renesas,ra-nv-data-flash";
1826
reg = <0x40100000 DT_SIZE_K(8)>;
27+
write-block-size = <1>;
28+
erase-block-size = <1024>;
29+
programming-enable;
1930
};
2031
};
2132
};

dts/arm/renesas/ra/ra2/r7fa2l1xb.dtsi

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
/**
22
* Copyright (c) 2024 MUNIC SA
3+
* Copyright (c) 2025 Renesas Electronics Corporation
34
*
45
* Renesas R7FA2AL1AB MCU device tree
56
*
67
* SPDX-License-Identifier: Apache-2.0
78
*/
89

9-
&flash0 {
10-
reg = <0x0 DT_SIZE_K(256)>;
10+
/ {
11+
soc {
12+
flash-controller@407e0000 {
13+
flash-hardware-version = <3>;
14+
#erase-block-cells = <2>;
15+
16+
flash0: flash@0 {
17+
compatible = "renesas,ra-nv-code-flash";
18+
reg = <0x0 DT_SIZE_K(256)>;
19+
write-block-size = <4>;
20+
erase-block-size = <2048>;
21+
erase-blocks = <&flash 128 2048>;
22+
programming-enable;
23+
};
24+
25+
flash1: flash@40100000 {
26+
compatible = "renesas,ra-nv-data-flash";
27+
reg = <0x40100000 DT_SIZE_K(8)>;
28+
write-block-size = <1>;
29+
erase-block-size = <1024>;
30+
programming-enable;
31+
};
32+
};
33+
};
1134
};

dts/arm/renesas/ra/ra2/ra2l1.dtsi

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Copyright (c) 2021-2024 MUNIC SA
3-
* Copyright (c) 2024 Renesas Electronics Corporation
3+
* Copyright (c) 2024-2025 Renesas Electronics Corporation
44
*
55
* Renesas RA2L1 MCU series device tree
66
*
@@ -46,23 +46,13 @@
4646
status = "okay";
4747
};
4848

49-
flcn: flash-controller@407ec000 {
50-
reg = <0x407ec000 0x10000>;
51-
49+
flash: flash-controller@407e0000 {
50+
compatible = "renesas,ra-flash-lp-controller";
51+
reg = <0x407e0000 0x20000>;
5252
#address-cells = <1>;
5353
#size-cells = <1>;
54-
55-
flash0: code@0 {
56-
compatible = "soc-nv-flash";
57-
/* "reg" property should be defined in the
58-
* chip specific .dtsi file
59-
*/
60-
};
61-
62-
flash1: data@40100000 {
63-
compatible = "soc-nv-flash";
64-
reg = <0x40100000 DT_SIZE_K(8)>;
65-
};
54+
interrupts = <30 1>;
55+
interrupt-names = "frdyi";
6656
};
6757

6858
ioport0: gpio@40040000 {

dts/arm/renesas/ra/ra2/ra2xx.dtsi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,13 @@
240240
status = "disabled";
241241
};
242242

243-
flash-controller@407e0000 {
243+
flash: flash-controller@407e0000 {
244+
compatible = "renesas,ra-flash-lp-controller";
244245
reg = <0x407e0000 0x10000>;
245246
#address-cells = <1>;
246247
#size-cells = <1>;
248+
interrupts = <30 1>;
249+
interrupt-names = "frdyi";
247250
};
248251

249252
agt0: agt@40084000 {

dts/arm/renesas/ra/ra4/r7fa4m1ab3cfm.dtsi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,24 @@
1515
/ {
1616
soc {
1717
flash-controller@407e0000 {
18+
flash-hardware-version = <3>;
19+
#erase-block-cells = <2>;
20+
1821
flash0: flash@0 {
19-
compatible = "soc-nv-flash";
22+
compatible = "renesas,ra-nv-code-flash";
2023
reg = <0x0 DT_SIZE_K(256)>;
24+
write-block-size = <8>;
25+
erase-block-size = <2048>;
26+
erase-blocks = <&flash 128 2048>;
27+
programming-enable;
28+
};
29+
30+
flash1: flash@40100000 {
31+
compatible = "renesas,ra-nv-data-flash";
32+
reg = <0x40100000 DT_SIZE_K(8)>;
33+
write-block-size = <1>;
34+
erase-block-size = <1024>;
35+
programming-enable;
2136
};
2237
};
2338
};

dts/arm/renesas/ra/ra4/r7fa4m1ab3cfp.dtsi

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,26 @@
1010

1111
/ {
1212
soc {
13-
flash-controller@407e0000 {
14-
flash0: flash@0 {
15-
compatible = "soc-nv-flash";
13+
flash-controller@407e0000 {
14+
flash-hardware-version = <3>;
15+
#erase-block-cells = <2>;
16+
17+
flash0: flash@0 {
18+
compatible = "renesas,ra-nv-code-flash";
1619
reg = <0x0 DT_SIZE_K(256)>;
17-
};
18-
};
20+
write-block-size = <8>;
21+
erase-block-size = <2048>;
22+
erase-blocks = <&flash 128 2048>;
23+
programming-enable;
24+
};
25+
26+
flash1: flash@40100000 {
27+
compatible = "renesas,ra-nv-data-flash";
28+
reg = <0x40100000 DT_SIZE_K(8)>;
29+
write-block-size = <1>;
30+
erase-block-size = <1024>;
31+
programming-enable;
32+
};
33+
};
1934
};
2035
};

dts/arm/renesas/ra/ra4/r7fa4m1ab3cne.dtsi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,24 @@
1515
/ {
1616
soc {
1717
flash-controller@407e0000 {
18+
flash-hardware-version = <3>;
19+
#erase-block-cells = <2>;
20+
1821
flash0: flash@0 {
19-
compatible = "soc-nv-flash";
22+
compatible = "renesas,ra-nv-code-flash";
2023
reg = <0x0 DT_SIZE_K(256)>;
24+
write-block-size = <8>;
25+
erase-block-size = <2048>;
26+
erase-blocks = <&flash 128 2048>;
27+
programming-enable;
28+
};
29+
30+
flash1: flash@40100000 {
31+
compatible = "renesas,ra-nv-data-flash";
32+
reg = <0x40100000 DT_SIZE_K(8)>;
33+
write-block-size = <1>;
34+
erase-block-size = <1024>;
35+
programming-enable;
2136
};
2237
};
2338
};

dts/arm/renesas/ra/ra4/r7fa4w1ad2cng.dtsi

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 Renesas Electronics Corporation
2+
* Copyright (c) 2024-2025 Renesas Electronics Corporation
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -16,9 +16,24 @@
1616
};
1717

1818
flash-controller@407e0000 {
19+
flash-hardware-version = <3>;
20+
#erase-block-cells = <2>;
21+
1922
flash0: flash@0 {
20-
compatible = "soc-nv-flash";
23+
compatible = "renesas,ra-nv-code-flash";
2124
reg = <0x0 DT_SIZE_K(512)>;
25+
write-block-size = <8>;
26+
erase-block-size = <2048>;
27+
erase-blocks = <&flash 256 2048>;
28+
programming-enable;
29+
};
30+
31+
flash1: flash@40100000 {
32+
compatible = "renesas,ra-nv-data-flash";
33+
reg = <0x40100000 DT_SIZE_K(8)>;
34+
write-block-size = <1>;
35+
erase-block-size = <1024>;
36+
programming-enable;
2237
};
2338
};
2439

dts/arm/renesas/ra/ra4/ra4-cm4-common.dtsi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 Renesas Electronics Corporation
2+
* Copyright (c) 2024-2025 Renesas Electronics Corporation
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -37,10 +37,13 @@
3737
status = "okay";
3838
};
3939

40-
flash-controller@407e0000 {
40+
flash: flash-controller@407e0000 {
41+
compatible = "renesas,ra-flash-lp-controller";
4142
reg = <0x407e0000 0x10000>;
4243
#address-cells = <1>;
4344
#size-cells = <1>;
45+
interrupts = <23 1>;
46+
interrupt-names = "frdyi";
4447
};
4548

4649
ioport0: gpio@40040000 {

0 commit comments

Comments
 (0)