Hi, all:
I have problems in pcie interface that can't detect PCIe to SATA device(Silicon Image Sil3132 ).
The bus width of PCIe device is x1.
My environment setting as follow:
* HW: DM8168 EVM with DDR3
* SW: rootfs is DM8168_DVRRDK_01.01.00.04
kernel is kerneel_40012 (Linux-2.6.37)
I have already reference the "DM816x C6A816x AM389x PCI Express Root Complex Driver User Guide"
(http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM389x_PCI_Express_Root_Complex_Driver_User_Guide).
The following steps that i have done:
1. set SW5 ---> PCIe RST = ON
2. Controlling PERSTn Using I2C Writes
3. Kernel Config for PCIe support
[*] PCI support
[*] Message Signaled Interrupts (MSI and MSI-X)
[*] PCI Debugging
4. Kernel Config for PCIe to SATA device driver support.
--- Serial ATA and Parallel ATA drivers
[*] Silicon image 3124/3132 SATA support.
5. Modify PCIe Endpoint in Sil3123 driver:
from pcie_set_readrq(pdev, 4096) to pcie_set_readrq(pdev, 256)
6. Replace resistor R218 to 0 ohm.
BTW, in step 1, no matter what i set is On or Off in SW5, the device still can't be detected.
I have cheked the reference clock is 100MHz and A11 pin of PCIe slot can be reset from low to hight and keep in hight after booting.
Any help will be appricated, Thanks.
Reference information:
----- using command to verify pci device -----
root@dvr:/opt/dvr_rdk/ti816x# cat /proc/bus/pci/devices (result: can't get anything)
root@dvr:/opt/dvr_rdk/ti816x# du /sys/bus/pci/
0 /sys/bus/pci/devices
0 /sys/bus/pci/drivers/pci-stub
0 /sys/bus/pci/drivers/serial
0 /sys/bus/pci/drivers/sata_sil24
0 /sys/bus/pci/drivers
0 /sys/bus/pci/slots
0 /sys/bus/pci
root@dvr:/opt/dvr_rdk/ti816x# ls /sys/bus/pci/devices/ (result :can't get anything)
root@dvr:/opt/dvr_rdk/ti816x#
----- using command to check iomem -----
root@dvr:/opt/dvr_rdk/ti816x# cat /proc/iomem
00000000-00000000 : omap2-nand.0
08000000-08000003 : omap2-nand
20000000-2fffffff : pcie-nonprefetch
47401000-474017ff : musb-hdrc.0
47401800-47401fff : musb-hdrc.1
48010000-480100ff : omap-iommu.1
48010000-480100ff : omap-iommu.1
48020000-48021fff : omap_uart.0
48020000-48021fff : omap_uart
48022000-48023fff : omap_uart.1
48022000-48023fff : omap_uart
48024000-48025fff : omap_uart.2
48024000-48025fff : omap_uart
48028000-48028fff : omap_i2c.1
48028000-48028fff : omap_i2c
4802a000-4802afff : omap_i2c.2
4802a000-4802afff : omap_i2c
48030100-480301ff : omap2_mcspi.1
48030100-480301ff : omap2_mcspi.1
48032000-48032fff : omap_gpio.0
48038000-4803afff : mcasp0
48038000-4803afff : davinci-mcasp
4804c000-4804cfff : omap_gpio.1
48050000-48052fff : mcasp
48050000-48052fff : davinci-mcasp
48060100-480700ff : mmci-omap-hs.0
48060100-480700ff : mmci-omap-hs
480c2000-480c2fff : omap_wdt
480c2000-480c2fff : omap_wdt
480c8000-480c8143 : omap-mailbox
48188000-48188fff : sr_hvt
4818a000-4818afff : sr_svt
49000000-49007fff : edma_cc0
49000000-49007fff : edma
49800000-498003ff : edma_tc0
49900000-499003ff : edma_tc1
49a00000-49a003ff : edma_tc2
49b00000-49b003ff : edma_tc3
4a100000-4a103fff : davinci_emac.0
4a100800-4a1008ff : davinci_mdio.0
4a100800-4a1008ff : davinci_mdio.0
4a120000-4a123fff : davinci_emac.1
4a140000-4a150fff : ahci.0
51000000-51003fff : pcie-regs
55082000-550820ff : omap-iommu.0
55082000-550820ff : omap-iommu.0
80000000-ffffffff : pcie-inbound0
80000000-87ffffff : System RAM
80039000-80499fff : Kernel text
8049a000-80516dbf : Kernel data
----- using command to ioports -----
root@dvr:/opt/dvr_rdk/ti816x# cat /proc/ioports
40000000-402fffff : PCI I/O
40000000-402fffff : pcie-io
----- using command to dump register -----
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x4030d000.
Value at address 0x51001728 (0x4030d728): 0xC00BC47
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x402bd000.
Value at address 0x51001728 (0x402bd728): 0xC00BC47
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x4025e000.
Value at address 0x51001728 (0x4025e728): 0xC000007
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x40107000.
Value at address 0x51001728 (0x40107728): 0xC003906
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x40308000.
Value at address 0x51001728 (0x40308728): 0xC009406
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x40285000.
Value at address 0x51001728 (0x40285728): 0xC004A07
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x4026f000.
Value at address 0x51001728 (0x4026f728): 0xC00A901
root@dvr:/opt/dvr_rdk/ti816x# ./devmem2 0x51001728
/dev/mem opened.
Memory mapped at address 0x40047000.
Value at address 0x51001728 (0x40047728): 0xC004A07