当前位置: 首页 > 工具软件 > rdb-php > 使用案例 >

P2020RDB-sata移植之硬件篇

龙飞文
2023-12-01

硬件PCB板重新设计,SATA控制器SIL 3132在原来的设计里,通过一个pci-e switch下挂在PCIE2。现在的设计去除了PCI-E switch,将sata控制器字直接连接到PCIE1。

PCB板贴片完成后,开始硬件调试。


首先是烧录U-BOOT,发现下面的启动信息:

U-Boot 2013.01 (Nov 19 2013 - 14:12:53)

CPU0:  P2020E, Version: 2.1, (0x80ea0021)
Core:  E500, Version: 5.1, (0x80211051)
Clock Configuration:
       CPU0:800  MHz, CPU1:800  MHz, 
       CCB:400  MHz,
       DDR:400  MHz (800 MT/s data rate) (Asynchronous), LBC:25   MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: P2020RDB-PCA CPLD: V15.15 PCBA: V15.0
Error reading i2c boot information!
I2C:   ready
SPI:   ready
DRAM:  DIMM 0: is not a DDR3 SPD.
SPD error on controller 0! Trying fallback to raw timing calculation
1 GiB (DDR3, 64-bit, CL=6, ECC off)
Flash: 64 MiB
L2:    512 KB enabled
MMC:  FSL_SDHC: 0
PCIe1: disabled
PCIe2: disabled
In:    serial
Out:   serial
Err:   serial
Net:   eTSEC1 [PRIME], eTSEC2, eTSEC3
Hit any key to stop autoboot:  0 

从上面的打印信息里面可以看到,PCIE2 处于disabled状态,这是符合预期设计的。但是PCIE1也处于disabled,这说明硬件是有问题的。


对比原理图和PCB发现,PCI-E时钟芯片附件的电阻贴片有错误,导致PCI-E的clock根本没有输出,去除了那几个NC的电阻后,重新上电,U-BOOT提示信息如下:

U-Boot 2013.01 (Feb 11 2014 - 16:41:19)

CPU0:  P2020E, Version: 2.1, (0x80ea0021)
Core:  E500, Version: 5.1, (0x80211051)
Clock Configuration:
       CPU0:1200 MHz, CPU1:1200 MHz, 
       CCB:600  MHz,
       DDR:400  MHz (800 MT/s data rate) (Asynchronous), LBC:37.500 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: P2020RDB-PCA CPLD: V15.15 PCBA: V15.0
Error reading i2c boot information!
I2C:   ready
SPI:   ready
DRAM:  DIMM 0: is not a DDR3 SPD.
SPD error on controller 0! Trying fallback to raw timing calculation
1 GiB (DDR3, 64-bit, CL=6, ECC off)
Flash: 64 MiB
L2:    512 KB enabled
MMC:  FSL_SDHC: 0
PCIe1: Root Complex of mini PCIe SLOT, x1, regs @ 0xffe0a000
  01:00.0     - 1095:3132 - Mass storage controller
PCIe1: Bus 00 - 01
PCIe2: disabled
In:    serial
Out:   serial
Err:   serial
Net:   eTSEC1 [PRIME], eTSEC2, eTSEC3
Hit any key to stop autoboot:  0 

可以看到PCIE1控制器正确被发现,并且总线连接的sata控制器也正确发现。

1095是Vendor ID,也即是厂家Silicon Image的标识ID

3132是Device ID

PCI的Vendor ID是统一编码的,可以在下面的网站查询

http://www.pcidatabase.com/vendors.php?sort=name

由此可以确定硬件已经OK,然后烧录内核、文件系统和设备树后发现,sata盘无法link up

有下面的提示信息

Uniform Multi-Platform E-IDE driver
Register PCI
bus: 'pci': add driver PCI_IDE
ide-gd driver 1.18
bus: 'ide': add driver ide-gd
bus: 'platform': add driver pata_platform
st: Version 20081215, fixed bufsize 32768, s/g segs 256
bus: 'scsi': add driver st
bus: 'scsi': add driver sd
bus: 'scsi': add driver sr
bus: 'of_platform': add driver fsl-sata
Init sil124
Register PCI
bus: 'pci': add driver sata_sil24
Start probe

内核就卡在这里了,经过分析,应该是设备树dtb没有做修改,配合移植所导致

 类似资料: