I have a working custom board based on LS1021ATWR. Board has two "spansion,s25fl512s" flash 64 MB each which is working fine. I am able to boot the device from flash.
RCW & u-boot file used
- rcw_1000_qspiboot_swap.bin
- u-boot-swap.bin
Following is the DTS entry for it
&qspi {
num-cs = <2>;
bus-num = <0>;
fsl,qspi-has-second-chip;
status = "okay";
qflash0: s70fl01gs@0 {
compatible = "spansion,s25fl512s", "jedec,spi-nor";
spi-max-frequency = <50000000>;
/*
* NOTE: Changes to this partion layout possibly requires
* changes in the bootloader and/or environment
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "RCW";
reg = <0x0 0x40000>;
};
partition@40000 {
label = "u-boot";
reg = <0x40000 0xc0000>;
};
partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x40000>;
};
partition@140000 {
label = "u-boot-env-redund";
reg = <0x140000 0x40000>;
};
partition@180000 {
label = "qe-ucode";
reg = <0x180000 0x40000>;
};
partition@1c0000 {
label = "dtb1";
reg = <0x1c0000 0x40000>;
};
partition@200000 {
label = "kernel1";
reg = <0x200000 0x400000>;
};
partition@600000 {
label = "rootfs1";
reg = <0x600000 0xc00000>;
};
partition@1200000 {
label = "dtb2";
reg = <0x1200000 0x40000>;
};
partition@1240000 {
label = "kernel2";
reg = <0x1240000 0x500000>;
};
partition@1740000 {
label = "rootfs2";
reg = <0x1740000 0x2880000>;
};
};
};
qflash1: s70fl01gs@1 {
compatible = "spansion,s25fl512s", "jedec,spi-nor";
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "user";
reg = <0x0 0x4000000>;
};
};
};
I have replaced the "s25fl512s" flash with "macronix,mx66lm1g45g" 128 MB flash. Modified the DTS file & booted the device using SD boot & flash the same rcw_1000_qspiboot_swap.bin & u-boot-swap.bin. After Switching back to QSPI boot nothing comes on the console. No u-boot output on the serial console. PBL is supposed to read RCW from /dev/mtd/RCW & then load u-boot from /dev/mtd/u-boot. But nothing comes on serial
Following is my modified DTS for the new flash
&qspi {
num-cs = <2>;
bus-num = <0>;
fsl,qspi-has-second-chip;
status = "okay";
qflash0: mx66lm1g45g@0 {
compatible = "macronix,mx66lm1g45g", "jedec,spi-nor";
spi-max-frequency = <50000000>;
/*
* NOTE: Changes to this partion layout possibly requires
* changes in the bootloader and/or environment
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "RCW";
reg = <0x0 0x40000>;
};
partition@40000 {
label = "u-boot";
reg = <0x40000 0xc0000>;
};
partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x40000>;
};
partition@140000 {
label = "u-boot-env-redund";
reg = <0x140000 0x40000>;
};
partition@180000 {
label = "qe-ucode";
reg = <0x180000 0x40000>;
};
partition@1c0000 {
label = "dtb1";
reg = <0x1c0000 0x40000>;
};
partition@200000 {
label = "kernel1";
reg = <0x200000 0x400000>;
};
partition@600000 {
label = "rootfs1";
reg = <0x600000 0xc00000>;
};
partition@1200000 {
label = "dtb2";
reg = <0x1200000 0x40000>;
};
partition@1240000 {
label = "kernel2";
reg = <0x1240000 0x500000>;
};
partition@1740000 {
label = "rootfs2";
reg = <0x1740000 0x2880000>;
};
partition@3FC0000 {
label = "user";
reg = <0x3FC0000 0x4000000>;
};
};
Do I need to change any settings in rcw.cfg file for the new flash or in the u-boot code? Any help is appreciated?
I've tried with another flash from Macronix MX66L2G45G (256 MB) & Programmed the RCW & u-boot-swap.bin file & I'm able to boot from the flash. But the issue is still there with MX66LM1G45G (128 MB) flash.
Following is my PBL setting in the u-boot source code, do I need to modify anything here for to boot from 128 MB flash?
#PBL preamble and RCW header
aa55aa55 01ee0100
0608000a 00000000 00000000 00000000
20000000 08407922 60000a00 21046000
00000000 00000000 00000000 0021ef00
20024800 2808f340 00000000 00000000