This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Linux/AM5728 PCIe: How to set Inbound BAR and Inbound ATU in Root Complex mode

Part Number: AM5728


Hello all,

I have two evmAM5728 board and I configured one of them as EP and other as RC and connected them with PCIe port. Both running Linux. When I dived into pcie-designware-host.c and pcie-designware-ep.c, only ep_setup function configures inbound BARs. rc_setup function looks like it does not set any inbound related BAR or ATU. Also, I tried to write from ep to rc and I could not find where ep wrote on rc's DDR memory. I have case like my AM5728 SoC needs to be RC and one EP connected to it needs to initiate read/write operations. I constructed RC writes/reads to EP but I need otherway around.

Can you help me to setup RC's inbound BARs and inbound ATU when AM5728 in RC configuration?

  • I do not know why my name is seen as a random number but I am not a virus. I am still having above issue, if you can help me I will be really appreciate it.

  • Hi, 

    I think the inbound address mapping should be set up in the 

      drivers/pci/controller/dwcpcie-designware.c

    I think it just mapped to the SOC memory space, but did not look in detail. 

    please let me know if you can't find it.

    Jian

  • Hi Jian,

    Thanks for your answer.

    dwc/pcie-designware-ep.c file uses inbound bar configuration as you mentioned in dw_pcie_ep_init function but I need to implement inbound bar config in dwc/pcie-designware-host.c file in dw_pcie_setup_rc function but I do not know how. There is only rc outbound atu configurations in  dw_pcie_setup_rc function but I need to implement inbound atu and inbound bar configs also in dw_pcie_setup_rc function.

    I have a requirement that EP performs pci read/write to RC so I need to know and set RC's inbound bar address. Moreover, I could not find where ınbound translation maps in RC's physical RAM address so I also need to know RC's inbound atu configuration.

    Please help me with implementing RC's inbound bar and atu configuration in dw_pcie_setup_rc function.

    Best regards,

    gorkem

  • Gorkem, 

    sorry for the extended delay in the response. were you able to find the information from the linux source tree? please reply back if you are still looking for the information. 

    regards

    jian