Cannot flash SPI-NOR MX25U6435F on Odroid N2+
Christian Kohlschütter
christian at kohlschutter.com
Mon Mar 24 16:51:58 PDT 2025
Some more information:
Apparently, some ODROID-N2+ ship with MX25U6435F, some ship with XT25Q64D SPI-NOR chips.
The ones with XT25Q64D have no problems flashing the first time (using the same kernel / userland). For those chips I see the kernel message "spi-nor spi0.0: found spi-nor-generic, expected mx25u6435f"
I've now tried two boards with MX25U6435F, and they both expose this issue.
(Guessing from the MAC addresses of these boards (00:1e:06:42:b3: vs 00:1e:06:42:fa: in my case), Hardkernel must have changed the MX25U6435F for XT25Q64D in later runs...)
Also, notably, calling flash_erase prior to flashcp doesn't make a difference -- flashcp really wants to be called twice for the MX25U6435F chips ...
> On 24. Mar 2025, at 23:52, Christian Kohlschütter <christian at kohlschutter.com> wrote:
>
> 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