Jump to content

Recommended Posts

Posted

Ok,

 

 I've activated spi-add-cs1 spi-jedec-nor spi-spidev and still no luck to find spi flash. sunxi-fel spiflash-info return : ERROR: Allwinner USB FEL device not found!

also can not find /dev/spidev0.0 as on legacy kernel. Any clue? Do I need some params for spi-spidev and spi-jedec-nor?

Posted

Do I need to boot with Debian 9 image with mainline kernel from sdcard to see spi flash and then udgrade u-boot on it because it's old u-boot on SPI flash right now. That look's like only solution to se SPI flash to update with new u-boot for mainline kernel.

Posted

Still no luck to update u-boot on SPI flash. If I'm not in wrong spi device is in mainline kernel /dev/mtd0.  

cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00001000 "spi0.0"
 

When I try to write :

dd if=/dev/zero count=4096 bs=1K | tr '\000' '\377' > spi.img

dd if=/usr/lib/ linux-u-boot-dev-orangepizero_5.38_armhf /u-boot-sunxi-with-spl.bin of=spi.img bs=1k conv=notrunc

 

everything goes fine but when I execute write to chip

 

flashrom -p linux_spi:dev=/dev/mtd0 -w spi.img

 

I get this error:

 

Calibrating delay loop... OK.
linux_spi_init: failed to set SPI mode to 0x00: Inappropriate ioctl for device
Error: Programmer initialization failed.

 

What I'm doing wrong? 

 

Posted
3 minutes ago, Vladimir Petrovic said:

flashrom -p linux_spi:dev=/dev/mtd0 -w spi.img

/dev/mtd0 is not an SPI device ...

You need to add SPIDEV overlay to access it with flashrom.

Otherwise, use "flashcp" to push binary to /dev/mtd0

 

Some reading here :

 

Posted

I've added spidev overlay:

Found mainline kernel configuration
31935 bytes read in 1273 ms (24.4 KiB/s)
504 bytes read in 795 ms (0 Bytes/s)
Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo
504 bytes read in 891 ms (0 Bytes/s)
Applying kernel provided DT overlay sun8i-h3-usbhost3.dtbo
780 bytes read in 878 ms (0 Bytes/s)
Applying kernel provided DT overlay sun8i-h3-spi-spidev.dtbo
804 bytes read in 834 ms (0 Bytes/s)
Applying kernel provided DT overlay sun8i-h3-spi-jedec-nor.dtbo
382 bytes read in 373 ms (1000 Bytes/s)
Applying kernel provided DT overlay sun8i-h3-cir.dtbo

U-Boot SPL 2017.11-armbian (Jan 25 2018 - 08:04:30)
DRAM: 512 MiB
Trying to boot from MMC1
 

 

But no /dev/spidev0.0 . What I'm doing wrong?

 

 

kernel is :

Linux orangepizero 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:32 CET 2018 armv7l GNU/Linux
 

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines