AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了:
U-Boot 2017.01-rc2-00071-gf03c1f5-dirty (Nov 07 2017 - 09:01:37 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
sunxi_spi_set_speed: speed=1000000, priv->regs->clk_ctl=0
sunxi_spi_set_speed: spriv->regs->tx_data=0
SF: unrecognized JEDEC id bytes: c2, 20, 19
*** Warning - spi_flash_probe() failed, using default environmentSetting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
sunxi_spi_set_speed: speed=96000000, priv->regs->clk_ctl=0
sunxi_spi_set_speed: spriv->regs->tx_data=0
SF: unrecognized JEDEC id bytes: c2, 20, 19
Failed to initialize SPI flash at 0:0 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
=>
有没有大神遇到过这个问题?
离线
daydayup@ubuntu:/licheepi/linux$ sudo sunxi-fel spiflash-info
Manufacturer: Unknown (C2h), model: 20h, size: 33554432 bytes.
离线
赶脚, 应该没毛病.
能检测出制造商和器件Id, 容量也检出 32MiB
离线
#define CONFIG_BOOTCOMMAND "sf probe 0 12000000; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x600000; " \
"bootz 0x41000000 - 0x41800000"
修改 sun8i.h,
把spi 速度降到12M, 重新编译,
再烧一次flash,
看看有没有效果.
离线
然鹅,还是没卵用:
=> saveenv
Saving Environment to SPI Flash...
sunxi_spi_set_speed: speed=100000, priv->regs->clk_ctl=0
sunxi_spi_set_speed: spriv->regs->tx_data=0
SF: unrecognized JEDEC id bytes: c2, 20, 19
*** Warning - spi_flash_probe_bus_cs() failed, using default environmenthimport_r: can't insert "stdin=serial,usbkbd" into hash table
himport_r: can't insert "stdout=serial,vga" into hash table
himport_r: can't insert "stderr=serial,vga" into hash table
=> saveenv
Saving Environment to SPI Flash...
sunxi_spi_set_speed: speed=100000, priv->regs->clk_ctl=0
sunxi_spi_set_speed: spriv->regs->tx_data=0
SF: unrecognized JEDEC id bytes: c2, 20, 19
*** Warning - spi_flash_probe_bus_cs() failed, using default environmenthimport_r: can't insert "stdin=serial,usbkbd" into hash table
himport_r: can't insert "stdout=serial,vga" into hash table
himport_r: can't insert "stderr=serial,vga" into hash table
=> saveenv
Saving Environment to SPI Flash...
sunxi_spi_set_speed: speed=100000, priv->regs->clk_ctl=0
sunxi_spi_set_speed: spriv->regs->tx_data=0
SF: unrecognized JEDEC id bytes: c2, 20, 19
*** Warning - spi_flash_probe_bus_cs() failed, using default environmenthimport_r: can't insert "stdin=serial,usbkbd" into hash table
himport_r: can't insert "stdout=serial,vga" into hash table
himport_r: can't insert "stderr=serial,vga" into hash table
=>
离线
换了一片 MX25L256 还是一毛一样的问题!
看来可能是板子有问题。
离线
刚刚拿了两片板子交换Falsh,
正常的板子用W25Q256, 不正常的板子用MX25L256,
发现正常的板子变不正常,
不正常板子变正常了,
说明问题出在MX25L256 这个 FLASH上。
下午继续查查
离线
SF: unrecognized JEDEC id bytes: c2, 20, 19
根据这行你查下代码看看是什么问题?
在u-boot源码目录根据 w25q256字符串搜到 ./drivers/mtd/spi/spi_flash_ids.c
找到 c2 20 19 那行: {"mx25l25635f", INFO(0xc22019, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP) },
发现前面有个宏: #ifdef CONFIG_SPI_FLASH_MACRONIX
突然灵光一闪,去 .config 把这个宏打开,重新编译烧录运行,果然可以了。
感谢大神.
离线