How to eraese defekt SPI ?
#1
Hi there,
unfortunately I've filled the SPI with garbage while updating to new U-Boot.
U-Boot SPL 2024.04-rc2 (Feb 14 2024 - 00:00:00 +0000)
Trying to boot from SPI
Trying to boot from MMC1
Card did not respond to voltage select! : -110
spl: mmc init failed with error: -95
Trying to boot from SPI
Trying to boot from MMC2
Card did not respond to voltage select! : -110
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


Question: how to reset the bord and flash a correct version of U-Boot? Pressing the "Reset" button didn't help.

Thanks
Andreas
  Reply
#2
Per the docs on pine64.org:

"Even if you need to recover from a defective bootloader written to the SPI flash, you can simply short pin 6 of the SPI flash to GND and boot. This will render the SoC bootrom unable to read from the SPI flash and have it fall back to reading the bootloader from other boot media like the eMMC or Micro SD card."
  Reply
#3
(02-21-2024, 09:29 AM)tophneal Wrote: Per the docs on pine64.org:

"Even if you need to recover from a defective bootloader written to the SPI flash, you can simply short pin 6 of the SPI flash to GND and boot. This will render the SoC bootrom unable to read from the SPI flash and have it fall back to reading the bootloader from other boot media like the eMMC or Micro SD card."


Thanks, I found the docu and get it in Masked Mode. But where can I find the file SPI_new.bin ?

Good nwes: i can now boot the system again
Bad news: I think entering the Maskrom mode again isn't possible, because one connection from the SPI chip was broken while removing the clamp.
Errors while booting:
U-Boot 2023.07 (Oct 25 2023 - 00:00:00 +0000)

SoC: Rockchip rk3399
Reset cause: RST
Model: Pine64 Pinebook Pro
DRAM: 4 GiB (effective 3.9 GiB)
PMIC: RK808
Core: 320 devices, 34 uclasses, devicetree: separate
MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ff, ff, ff
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In: serial
Out: vidconsole
Err: vidconsole
Model: Pine64 Pinebook Pro
Net: No ethernet found.
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus usb@fe800000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 2 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 4 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found
scanning bus usb@fe800000 for devices... 1 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0

Same for update SPI:
=> ls mmc 1:1
182272 idbloader.img
364544 idbloader.spi
1060352 u-boot.itb
9416192 u-boot-rockchip.bin

4 file(s), 0 dir(s)

=> sf probe
jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ff, ff, ff
Failed to initialize SPI flash at 1:0 (error 0)
=> load mmc 1:1 ${fdt_addr_r} idbloader.spi
364544 bytes read in 42 ms (8.3 MiB/s)
=> sf update ${fdt_addr_r} 0 ${filesize}
No SPI flash selected. Please run `sf probe'
=> load mmc 1:1 ${fdt_addr_r} u-boot.itb
1060352 bytes read in 114 ms (8.9 MiB/s)
=> sf update ${fdt_addr_r} 60000 ${filesize}
No SPI flash selected. Please run `sf probe'
=>
  Reply
#4
There's no specific "SPI_New.bin, but most use TowBoot since it's the easiest to flash to the SPI, with their installer image that you can boot from an SD
  Reply
#5
(02-23-2024, 02:07 PM)tophneal Wrote: There's no specific "SPI_New.bin, but most use TowBoot since it's the easiest to flash to the SPI, with their installer image that you can boot from an SD

Thanks, but with Towboot there is the same problem with "sf probe". So I think the SPI is broken. I had to leave SD Card with U-Boot while poweron the Laptop, no problem.

Or it's possible to flash the SPI on the EMMC ? That's my boot device for Fedora, while /home is on NVME.

Thanks
Andreas

lpddr4_set_rate: change freq to 400MHz 0, 1
Channel 0: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 800MHz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2023.07 (Oct 25 2023 - 00:00:00 +0000)
Trying to boot from MMC2
spl_load_fit_image: Skip load 'atf-6': image size is 0!


U-Boot 2023.07 (Oct 25 2023 - 00:00:00 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 Pinebook Pro
DRAM:  4 GiB (effective 3.9 GiB)
PMIC:  RK808  
Core:  320 devices, 34 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ff, ff, ff
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Pine64 Pinebook Pro
Net:   No ethernet found.
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus usb@fe800000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 2 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 3 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found
scanning bus usb@fe800000 for devices... 1 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
      scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
  Reply
#6
If you are able to boot from an SD card, you can flash your preferred OS/bootloader to eMMC by `dd`ing to `/dev/mmcblkX`. Use `lsblk` to figure out what `X` should be.

If you need Tow-Boot you can also download an installer image, but you want the one for "shared storage" and not "dedicated storage." ("Dedicated storage" is for your now-dead SPI chip.)
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)