Jump to content

Recommended Posts

Posted (edited)

How can we acces the SPI NOR Flash on Odroid HC4?

 

The usual error

seems to be the driver, not a thing we can overlay device tree? Id for xt25f128b is implemented.

Zitat

 

unrecognized JEDEC id 0

 

meson-spifc ffd14000.spi: registered host spi0
spi spi0.0: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
spi-nor spi0.0: supply vcc not found, using dummy regulator
spi-nor spi0.0: error -95 reading JEDEC ID
spi-nor spi0.0: probe with driver spi-nor failed with error -95
meson-spifc ffd14000.spi: registered child spi0.0

 

Edited by duing
Posted (edited)

I tried different overlays, reduced max-frequency, set rx-(-tx)-bus-width and different mode settings indepently. Is it perhaps driven by gpio regulator instead of fixed 3v3? With a vcc-supply property one line (warning) goes away.

Edited by duing
Posted (edited)

I wanted to play with: kernel on ubifs or perhaps DAX on erofs.

 

The bootloader must be signed differently for SD and NOR flash with some kind of arm-trusted-firmware, a PC binary that can be started as binmisc under qemu in Linux on ARM.

Edited by duing
Posted (edited)

How do you write U-Boot to SPI NOR flash?

 

Without a working driver upstream, the best I can think of now is just using the shipped U-Boot/Linux (Petitboot from the manufactor). If you want to make it from source, use the shipped cross-compiler on 64 bit PC, perhaps on an archived OS, or rewrite Makefiles.

 

But that leaves the (for some tiny) 16 MB just for the bootloader, which doesn't even knows it's own bootdev. It seems the beforehand bootloader-loader doesn't look after SATA HDD, only SPI NOR or MMC SD. After all, just press a button to alternately load from removable card if one installed and failed to run from NOR.

 

Did I miss a thing in device-tree? The regulator.patch is upstream, which keeps the drives spun-up while boot (at least MMC is powered).

 

Thanks, yours duing.

Edited by duing
Posted
3 hours ago, duing said:

How do you write U-Boot to SPI NOR flash?

Usually I do that via the U-Boot console, since I build my firmware with SPI command support for devices with SPI flash.
With an added convenience command, it's just a "==> run mmc-fw-to-sf" to transfer firmware currently running from microSD.
So everything is self-contained, no external components involved.

Posted (edited)
Am 29.6.2026 um 20:04 schrieb usual user:

I build my firmware [...] run mmc-fw-to-sf

You're using Hardkernel's U-Boot. Yes, it's probably more importent to read from flash memory early, at boot. Using the manufactors bootloader is the only option until the chip or whatever is supported "mainline".

 

By the way it is behind: Linux dosn't know how to shutdown/reboot without patch. How to resume, a device that doesn't have a button? Perhaps `sm reboot_reason`, if triggered via IR and read out in boot.scr. I do not want to suspend/hibernate this NAS.

 

If one doesn't care about flash, but doesn't want to depend on SD card to boot from e.g. SATA, an option is to run Hardkernel's Linux, once to write U-Boot to NOR flash . kexec seems to need CONFIG_PROC_KCORE, but Armbian as many others doesn't. Mainline U-Boot doesn't load Hardkernel's Linux. Perhaps just boot the spiudate.img from SD card without spiboot.img and run (sounds strange I know, but better than cross-cross-compile out-of-date).

 

Any news on mainline (patched) support for SPI NOR flash on Odroid-HC4? Perhaps I miss just a simple thing?

Edited by duing

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines