您尚未登录。

楼主 #1 2017-11-08 09:29:53

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

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 environment

Setting 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'
=>

有没有大神遇到过这个问题?

离线

#2 2017-11-08 09:35:06

沉鱼
管理员
注册时间: 2017-09-06
已发帖子: 161
积分: 161

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

首先你试一试这个命令, sunxi-fel spiflash-info
看系统能不能检测到你的flash id

离线

楼主 #3 2017-11-08 09:36:54

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

daydayup@ubuntu:/licheepi/linux$ sudo sunxi-fel spiflash-info
Manufacturer: Unknown (C2h), model: 20h, size: 33554432 bytes.

离线

楼主 #4 2017-11-08 09:37:55

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

赶脚, 应该没毛病.
能检测出制造商和器件Id, 容量也检出 32MiB

离线

楼主 #5 2017-11-08 10:01:32

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

#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,
看看有没有效果.

离线

楼主 #6 2017-11-08 10:02:32

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

然鹅,还是没卵用:

=> 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 environment

himport_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 environment

himport_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 environment

himport_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
=>

离线

楼主 #7 2017-11-08 10:06:12

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

换了一片 MX25L256 还是一毛一样的问题!
看来可能是板子有问题。

离线

楼主 #8 2017-11-08 12:00:10

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

刚刚拿了两片板子交换Falsh,
正常的板子用W25Q256, 不正常的板子用MX25L256,
发现正常的板子变不正常,
不正常板子变正常了,
说明问题出在MX25L256 这个 FLASH上。
下午继续查查

离线

#9 2017-11-08 17:40:25

沉鱼
管理员
注册时间: 2017-09-06
已发帖子: 161
积分: 161

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

SF: unrecognized JEDEC id bytes: c2, 20, 19

根据这行你查下代码看看是什么问题?

离线

楼主 #10 2017-11-08 17:44:03

daydayup
会员
注册时间: 2017-10-09
已发帖子: 343
积分: 343

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

沉鱼 说:

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 把这个宏打开,重新编译烧录运行,果然可以了。
感谢大神.

离线

#11 2018-05-15 09:33:03

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

请问下,我用的W25N01GVZE1G这个芯片--128MB的nand flash,但是

@ubuntu:/licheepi/linux$ sudo sunxi-fel spiflash-info
Manufacturer: Unknown (00h), model: EFh, size: 1024 bytes.

这个是什么情况??

离线

#12 2018-05-15 09:49:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

sunxi-fel 并不支持 spi nand, 你的flash不在支持列表中。





离线

#13 2018-05-15 09:53:27

quinncy
会员
注册时间: 2018-04-10
已发帖子: 24
积分: 24

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

晕哥,那我在zero板上使用nand flash要使用其他烧录工具吗??

离线

#14 2018-05-15 09:57:40

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: AllWinner全志V3s荔枝派zero板子用MX25L256 spi nor flash, sunxi-fel烧完之后发现启动不了

我看到有大神自己改 u-boot, sunxi-fel 实现了spi flash烧录和启动。
你也可以试一试。





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn