您尚未登录。

楼主 # 2024-11-08 09:35:10

yyyyppppp
会员
注册时间: 2024-11-08
已发帖子: 1
积分: 11

t113-s3更换spi nand flash芯片烧录报错?

之前板子用的MX35LF1GE4AB 的spi nand flash 128MB,现在更换为FM25S01BI3 256MB 。id.c中没有我用的FM25S01BI3 我就模仿FM25S01写了一下
在lichee/linux-5.4/drivers/mtd/awnand/spinand/physic/id.c中 添加了芯片信息。

219 struct aw_spinand_phy_info fm[] = {
 220         {
 221                 /* only rw stress test */
 222                 .Model          = "FM25S01",
 223                 .NandID         = {0xa1, 0xa1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
 224                 .DieCntPerChip  = 1,
 225                 .SectCntPerPage = 4,
 226                 .PageCntPerBlk  = 64,
 227                 .BlkCntPerDie   = 1024,
 228                 .OobSizePerPage = 64,
 229                 .OperationOpt   = SPINAND_QUAD_READ | SPINAND_QUAD_PROGRAM |
 230                         SPINAND_DUAL_READ | SPINAND_QUAD_NO_NEED_ENABLE,
 231                 .MaxEraseTimes  = 65000,
 232                 .EccType        = BIT2_LIMIT1_ERR2,
 233                 .EccProtectedType = SIZE16_OFF0_LEN16,
 234                 .BadBlockFlag = BAD_BLK_FLAG_FIRST_2_PAGE,
 235         },
 236         {       /*FM25S01BI3-DND-A-G3*/
 237                 .Model          = "FM25S01BI3",
 238                 .NandID         = {0xa1, 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
 239                 .DieCntPerChip  = 1,
 240                 .SectCntPerPage = 4,
 241                 .PageCntPerBlk  = 64,
 242                 .BlkCntPerDie   = 2048,
 243                 .OobSizePerPage = 64,
 244                 .OperationOpt   = SPINAND_QUAD_READ | SPINAND_QUAD_PROGRAM |
 245                         SPINAND_DUAL_READ | SPINAND_QUAD_NO_NEED_ENABLE,
 246                 .MaxEraseTimes  = 65000,
 247                 .EccType        = BIT2_LIMIT1_ERR2,
 248                 .EccProtectedType = SIZE16_OFF0_LEN16,
 249                 .BadBlockFlag = BAD_BLK_FLAG_FIRST_2_PAGE,
 250          },
 251 };

之后用PhoenixSuit.exe工具烧录 报错误 错误信息如下:

[02.984]CPU:   Allwinner Family
[02.987]Model: sun8iw20
I2C:   FDT ERROR:fdt_set_all_pin:[twi0]-->FDT_ERR_BADPATH
FDT ERROR:fdt_set_all_pin:[twi1]-->FDT_ERR_BADPATH
ready
[03.009]DRAM:  128 MiB
[03.012]Relocation Offset is: 04ede000
[03.034]secure enable bit: 0
[03.037]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[03.043]gic: normal mode
[03.045]flash init start
[03.048]workmode = 16,storage type = 0
try card 2
set card number 2
get card number 2
[03.055][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[03.062][mmc]: Is not Boot mode!
[03.065][mmc]: SUNXI SDMMC Controller Version:0x50310
[03.076][mmc]: ************Try SD card 2************
[03.081][mmc]: mmc 2 cmd timeout 100 status 100
[03.085][mmc]: smc 2 err, cmd 8,  RTO
[03.089][mmc]: mmc 2 close bus gating and reset
[03.094][mmc]: mmc 2 cmd timeout 100 status 100
[03.098][mmc]: smc 2 err, cmd 55,  RTO
[03.101][mmc]: mmc 2 close bus gating and reset
[03.106][mmc]: ************Try MMC card 2************
[03.115][mmc]: mmc 2 cmd timeout 100 status 100
[03.119][mmc]: smc 2 err, cmd 1,  RTO
[03.122][mmc]: mmc 2 close bus gating and reset
[03.126][mmc]: Card did not respond to voltage select!
[03.131][mmc]: ************SD/MMC 2 init error!************
[03.136][mmc]: mmc init product failed
MMC init failed
try emmc fail
[03.143]sunxi-spinand: AW SPINand MTD Layer Version: 1.5 20200407
[03.149]sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.9 20200306
[03.157]sunxi-spinand-phy: request spi0 gpio ok
[03.161]sunxi-spinand-phy: request general tx dma channel ok!
[03.166]sunxi-spinand-phy: request general rx dma channel ok!
[03.172]sunxi-spinand-phy: set spic0 clk to 20 Mhz
[03.176]sunxi-spinand-phy: init spic0 clk ok
sspi->base_addr = 0x4025000, the SPI control register:
[VER] 0x4025000 = 0x00010001, [GCR] 0x4025004 = 0x00000083, [TCR] 0x4025008 = 0x00000184
[ICR] 0x4025010 = 0x00000f00, [ISR] 0x4025014 = 0x00000032, [FCR] 0x4025018 = 0x00200020
[FSR] 0x402501c = 0x00000000, [WCR] 0x4025020 = 0x00000000, [CCR] 0x4025024 = 0x00000002
[SDC] 0x4025028 = 0x00002000, [BCR] 0x4025030 = 0x00000000, [TCR] 0x4025034 = 0x00000000
[BCC] 0x4025038 = 0x00000000, [DMA] 0x4025088 = 0x000000e5

[03.222]sunxi-spinand-phy: not detect any munufacture from id table
[03.228]sunxi-spinand-phy: get spi-nand Model from fdt fail
[03.233]sunxi-spinand-phy: get phy info from fdt fail
[03.238]sunxi-spinand-phy: not detect munufacture from fdt
[03.243]sunxi-spinand-phy: detect munufacture from id table: FM
[03.249]sunxi-spinand-phy: detect spinand id: ffffd4a1 ffffffff
[03.254]sunxi-spinand-phy: ========== arch info ==========
[03.259]sunxi-spinand-phy: Model:               FM25S01BI3
[03.265]sunxi-spinand-phy: Munufacture:         FM
[03.269]sunxi-spinand-phy: DieCntPerChip:       1
[03.274]sunxi-spinand-phy: BlkCntPerDie:        2048
[03.278]sunxi-spinand-phy: PageCntPerBlk:       64
[03.283]sunxi-spinand-phy: SectCntPerPage:      4
[03.287]sunxi-spinand-phy: OobSizePerPage:      64
[03.292]sunxi-spinand-phy: BadBlockFlag:        0x1
[03.296]sunxi-spinand-phy: OperationOpt:        0xf
[03.301]sunxi-spinand-phy: MaxEraseTimes:       65000
[03.306]sunxi-spinand-phy: EccFlag:             0x0
[03.310]sunxi-spinand-phy: EccType:             2
[03.315]sunxi-spinand-phy: EccProtectedType:    1
[03.319]sunxi-spinand-phy: ========================================
[03.325]sunxi-spinand-phy:
[03.328]sunxi-spinand-phy: ========== physical info ==========
[03.333]sunxi-spinand-phy: TotalSize:    256 M
[03.337]sunxi-spinand-phy: SectorSize:   512 B
[03.341]sunxi-spinand-phy: PageSize:     2 K
[03.345]sunxi-spinand-phy: BlockSize:    128 K
[03.350]sunxi-spinand-phy: OOBSize:      64 B
[03.354]sunxi-spinand-phy: ========================================
[03.360]sunxi-spinand-phy:
[03.362]sunxi-spinand-phy: ========== logical info ==========
[03.368]sunxi-spinand-phy: TotalSize:    256 M
[03.372]sunxi-spinand-phy: SectorSize:   512 B
[03.376]sunxi-spinand-phy: PageSize:     4 K
[03.380]sunxi-spinand-phy: BlockSize:    256 K
[03.384]sunxi-spinand-phy: OOBSize:      128 B
[03.388]sunxi-spinand-phy: ========================================
[03.395]sunxi-spinand-phy: FM25S01BI3 reset rx bit width to 1
[03.400]sunxi-spinand-phy: FM25S01BI3 reset tx bit width to 1
[03.405]sunxi-spinand-phy: set spic0 clk to 100 Mhz
[03.410]sunxi-spinand-phy: block lock register: 0x00
[03.415]sunxi-spinand-phy: feature register: 0x10
[03.419]sunxi-spinand-phy: sunxi physic nand init end
[03.424]Loading Environment from SUNXI_FLASH... OK
[03.428]try to burn key
[03.431]out of usb burn from boot: not need burn key
Hit any key to stop autoboot:  0
sunxi work mode=0x10
run usb efex
buf queue page size = 16384
delay time 2500
weak:otg_phy_config
usb init ok
set address 0x2
set address 0x2 ok
set address 0x2
set address 0x2 ok
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x12
origin_erase_flag = 0x1
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
SUNXI_EFEX_EXT4_UBIFS_TAG & do nothing
the 0 mbr table is ok
the 1 mbr table is ok
the 2 mbr table is ok
the 3 mbr table is ok
*************MBR DUMP***************
total mbr part 6

part[0] name      :boot-resource
part[0] classname :DISK
part[0] addrlo    :0x8000
part[0] lenlo     :0x1a00
part[0] user_type :32768
part[0] keydata   :0
part[0] ro        :0

part[1] name      :env
part[1] classname :DISK
part[1] addrlo    :0x9a00
part[1] lenlo     :0x1f8
part[1] user_type :32768
part[1] keydata   :0
part[1] ro        :0

part[2] name      :env-redund
part[2] classname :DISK
part[2] addrlo    :0x9bf8
part[2] lenlo     :0x1f8
part[2] user_type :32768
part[2] keydata   :0
part[2] ro        :0

part[3] name      :boot
part[3] classname :DISK
part[3] addrlo    :0x9df0
part[3] lenlo     :0x2000
part[3] user_type :32768
part[3] keydata   :0
part[3] ro        :0

part[4] name      :rootfs
part[4] classname :DISK
part[4] addrlo    :0xbdf0
part[4] lenlo     :0x2d400
part[4] user_type :32768
part[4] keydata   :0
part[4] ro        :0

part[5] name      :UDISK
part[5] classname :DISK
part[5] addrlo    :0x391f0
part[5] lenlo     :0x0
part[5] user_type :0
part[5] keydata   :0
part[5] ro        :0

total part: 7
mbr 0, 8000, 8000
boot-resource 1, 1a00, 8000
env 2, 1f8, 8000
env-redund 3, 1f8, 8000
boot 4, 2000, 8000
rootfs 5, 2d400, 8000
UDISK 6, 0, 0
[06.731]erase blk 0 to blk 32
need erase flash: 18
[06.793]mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)

device nand0 <nand>, # parts = 4
 #: name                size            offset          mask_flags
 0: boot0               0x00100000      0x00000000      1
 1: uboot               0x00300000      0x00100000      1
 2: secure_storage      0x00100000      0x00400000      1
 3: sys                 0x0fb00000      0x00500000      0

active partition: nand0,0 - (boot0) 0x00100000 @ 0x00000000

defaults:
mtdids  : nand0=nand
mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
[06.844]MTD info (4)
[06.846]pagesize: 0x1000
[06.848]blksize: 0x40000
[06.850]num  offset     bytes      name
[06.854]0    0x00000000 0x00100000 boot0
[06.857]1    0x00100000 0x00300000 uboot
[06.861]2    0x00400000 0x00100000 secure_storage
[06.865]3    0x00500000 0x0fb00000 sys
[06.869]ubi attach the last part of mtd device: NO.3
[07.057]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.061]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.066]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.071]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.075]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.080]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.084]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.089]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.094]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.098]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.103]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.107]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.112]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.117]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.121]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.126]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.130]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.135]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.139]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.144]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.149]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.153]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.158]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.162]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.167]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.172]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.176]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.181]sunxi-spinand-phy: [SPINAND]: ecc error 0x2
[07.185]sunxi-spinand-phy: [SPINAND]: ecc error 0x2

请问各位大佬 我是哪里修改错了 还是其他地方还需要修改???

离线

页脚

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

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