we are using qspi flash in our AM5728 custom board . we are using S25fL256 nor flash .
we made dts changes in uboot and kernel the following changes are
status = "okay";
m25p80@2 {
compatible = "s25fl256s1", "spi-flash", "jedec,spi-nor";
spi-max-frequency = <76800000>;
reg = <0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
#address-cells = <1>;
#size-cells = <1>;
* The ROM checks the first four physical blocks
* for a valid file to boot and the flash here is
* 64KiB block size.
*/
partition@0 {
label = "QSPI.SPL";
reg = <0x00000000 0x000040000>;
};
partition@1 {
label = "QSPI.u-boot";
reg = <0x00040000 0x00100000>;
};
partition@2 {
label = "QSPI.u-boot-spl-os";
reg = <0x00140000 0x00080000>;
};
partition@3 {
label = "QSPI.u-boot-env";
reg = <0x001c0000 0x00010000>;
};
partition@4 {
label = "QSPI.u-boot-env.backup1";
reg = <0x001d0000 0x0010000>;
};
partition@5 {
label = "QSPI.kernel";
reg = <0x001e0000 0x0800000>;
};
partition@6 {
label = "QSPI.file-system";
reg = <0x009e0000 0x01620000>;
};
};
};
SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000
=> sf erase 0x00000 0x100000
SF: 1048576 bytes @ 0x0 Erased: OK
=> sf write ${loadaddr} 0x00000 0x10000
device 0 offset 0x0, size 0x10000
SF: 65536 bytes @ 0x0 Written: Ok