diff mbox series

[v4,2/2] arm64: dts: renesas: rz{g2l,g2lc}-smarc-som: Update partition table for spi-nor flash

Message ID 20240901183422.31600-3-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series Enable serial NOR flash on RZ/G2UL SMARC EVK | expand

Commit Message

Biju Das Sept. 1, 2024, 6:34 p.m. UTC
Update partition table for spi-nor flash, so that we can flash bootloaders
in Linux by executing the below commands:
flash_erase /dev/mtd0  0 0
flash_erase /dev/mtd1  0 0
mtd_debug write /dev/mtd0 0 ${BL2_FILE_SIZE} ${BL2_IMAGE}
mtd_debug write /dev/mtd1 512 ${FIP_FILE_SIZE} ${FIP_IMAGE}

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v4:
 * New patch.
---
 arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi  | 15 +++++++++++----
 arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi | 15 +++++++++++----
 2 files changed, 22 insertions(+), 8 deletions(-)

Comments

Geert Uytterhoeven Oct. 4, 2024, 7:20 a.m. UTC | #1
Hi Biju,

On Sun, Sep 1, 2024 at 8:34 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Update partition table for spi-nor flash, so that we can flash bootloaders
> in Linux by executing the below commands:
> flash_erase /dev/mtd0  0 0
> flash_erase /dev/mtd1  0 0
> mtd_debug write /dev/mtd0 0 ${BL2_FILE_SIZE} ${BL2_IMAGE}
> mtd_debug write /dev/mtd1 512 ${FIP_FILE_SIZE} ${FIP_IMAGE}
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v4:
>  * New patch.

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> @@ -341,11 +341,18 @@ partitions {
>                         #address-cells = <1>;
>                         #size-cells = <1>;
>
> -                       boot@0 {
> -                               reg = <0x00000000 0x2000000>;
> -                               read-only;
> +                       partition@0 {
> +                               label = "bl2";
> +                               reg = <0x00000000 0x0001c000>;
>                         };
> -                       user@2000000 {
> +
> +                       partition@1d000 { /* fip is at offset 0x200 */

Is this 4 KiB gap between the two partitions intentional?
If yes, I think it deserves a comment.
Same comment for rzg2lc-smarc-som.dtsi.

The rest LGTM.

Gr{oetje,eeting}s,

                        Geert
Biju Das Oct. 4, 2024, 12:20 p.m. UTC | #2
Hi Geert,

Thanks for the feedback.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Friday, October 4, 2024 8:20 AM
> Subject: Re: [PATCH v4 2/2] arm64: dts: renesas: rz{g2l,g2lc}-smarc-som: Update partition table for
> spi-nor flash
> 
> Hi Biju,
> 
> On Sun, Sep 1, 2024 at 8:34 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Update partition table for spi-nor flash, so that we can flash
> > bootloaders in Linux by executing the below commands:
> > flash_erase /dev/mtd0  0 0
> > flash_erase /dev/mtd1  0 0
> > mtd_debug write /dev/mtd0 0 ${BL2_FILE_SIZE} ${BL2_IMAGE} mtd_debug
> > write /dev/mtd1 512 ${FIP_FILE_SIZE} ${FIP_IMAGE}
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v4:
> >  * New patch.
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> > @@ -341,11 +341,18 @@ partitions {
> >                         #address-cells = <1>;
> >                         #size-cells = <1>;
> >
> > -                       boot@0 {
> > -                               reg = <0x00000000 0x2000000>;
> > -                               read-only;
> > +                       partition@0 {
> > +                               label = "bl2";
> > +                               reg = <0x00000000 0x0001c000>;
> >                         };
> > -                       user@2000000 {
> > +
> > +                       partition@1d000 { /* fip is at offset 0x200 */
> 
> Is this 4 KiB gap between the two partitions intentional?
No. I will update bl2 size as 0x0001d000

Cheers,
Biju

> If yes, I think it deserves a comment.
> Same comment for rzg2lc-smarc-som.dtsi.
> 
> The rest LGTM.
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But when I'm talking to
> journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
index 83f5642d0d35..61297993fcb0 100644
--- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
@@ -341,11 +341,18 @@  partitions {
 			#address-cells = <1>;
 			#size-cells = <1>;
 
-			boot@0 {
-				reg = <0x00000000 0x2000000>;
-				read-only;
+			partition@0 {
+				label = "bl2";
+				reg = <0x00000000 0x0001c000>;
 			};
-			user@2000000 {
+
+			partition@1d000 { /* fip is at offset 0x200 */
+				label = "fip";
+				reg = <0x0001d000 0x1fe3000>;
+			};
+
+			partition@2000000 {
+				label = "user";
 				reg = <0x2000000 0x2000000>;
 			};
 		};
diff --git a/arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi
index b4ef5ea8a9e3..2bf7c506d543 100644
--- a/arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi
@@ -259,11 +259,18 @@  partitions {
 			#address-cells = <1>;
 			#size-cells = <1>;
 
-			boot@0 {
-				reg = <0x00000000 0x2000000>;
-				read-only;
+			partition@0 {
+				label = "bl2";
+				reg = <0x00000000 0x0001c000>;
 			};
-			user@2000000 {
+
+			partition@1d000 { /* fip is at offset 0x200 */
+				label = "fip";
+				reg = <0x0001d000 0x1fe3000>;
+			};
+
+			partition@2000000 {
+				label = "user";
 				reg = <0x2000000 0x2000000>;
 			};
 		};