Cannot flash SPI-NOR MX25U6435F on Odroid N2+

Christian Kohlschütter christian at kohlschutter.com
Mon Mar 24 15:52:53 PDT 2025


PS: It seems to work when flashing a second time (i.e., calling flashcp with the same arguments once more).

Is there a timing requirement between erase and write? Is it a bug in mtd-utils that we just don't hit with the custom 4.9 Odroid kernel?

> On 24. Mar 2025, at 23:09, Christian Kohlschütter <christian at kohlschutter.com> wrote:
> 
> Hi all,
> 
> I'm trying to flash the MX25U6435F 8MB SPI-ROM integrated in ODROID N2+ boards.
> 
> Using Linux 6.14 (or any other recent mainline kernel), I can't seem to get any changes persisted:
> 
> sudo flashcp -v u-boot.spi.bin /dev/mtd0
> Erasing blocks: 289/289 (100%)
> Writing data: 1155k/1155k (100%)
> Verifying data: 10k/1155k (0%)File does not seem to match flash data. First mismatch at 0x00000000-0x00002800
> 
> Relevant kernel configs:
> CONFIG_MTD_SPI_NOR=m
> CONFIG_MTD_SPI_NOR_SWP_DISABLE=y  # does not make a difference
> 
> With the same userland tools (mtd-utils 2.2.1-r0 running on Alpine Linux), flashing succeeds when using their custom kernel (based upon 4.9.337; odroidg12-4.9.y branch from https://github.com/hardkernel/linux)
> 
> Note that both kernels need a custom DTB to enable SPI (see ic/meson-g12b-odroid-n2.dtsi).
> 
> Linux 6.14 needs these additional entries to meson-g12b-odroid-n2-plus.dts (odroid's 4.9.337 needs similar changes)
> 
> &spifc {
>        status = "okay";
>        pinctrl-0 = <&nor_pins>;                                           
>        pinctrl-names = "default";                                         
> 
>        mx25u64: flash at 0 {                                  
>                #address-cells = <1>;
>                #size-cells = <1>;             
>                compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
>                reg = <0>;                                       
>                spi-max-frequency = <104000000>;                 
>        };
> };
> 
> &sd_emmc_c {
>        pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>, <&emmc_ds_pins>;
>        bus-width = <4>;
> };
> 
> Any help pointing me in the right direction is greatly appreciated.
> 
> Thanks,
> Christian
> 




More information about the linux-mtd mailing list