pcie-mhi
pci_mhi.ko
r8a774b1-hihope-rzg2n-ex.dts
lspci
Hi,
I had a quick look at Quectel's "RM500Q-GL Hardware Design" document, and found the following:
- Turn on the RM500Q-GL module by setting the module's FULL_CARD_POWER_OFF# signal to HIGH (for example, by using the host CPU's GPIO).
- Use AT commands to switch the PCIe operating mode (endpoint mode / root complex mode).
Just to confirm, you performed the initial settings described in the RM500Q-GL manual to make the RM500Q-GL module's PCIe interface operational (for example, as mentioned above), and then tested it, right?
BR
Hi Chris/egret,
Thanks for the reply , Yes we enabled in the kernel
CONFIG_PCIE_RCAR_HOST=yCONFIG_PCIE_RCAR_EP=y.
And Also Done: Modem setings to work in PCIE mode like below
AT+QCFG="data_interface",1,1 //Set network port communication through PCIe interface, and diagnostic port through PCIe interface.
AT+QCFG="pcie/mode",1 //RC Mode:
In the kernel debug we are getting below error:
[ 0.133274] gpio-370 (usb1-reset): hogged as output/low[ 0.133463] gpio_rcar e6055400.gpio: driving 32 GPIOs[ 0.133770] gpio_rcar e6055800.gpio: driving 4 GPIOs[ 0.135466] rcar-pcie fe000000.pcie: host bridge /soc/pcie@fe000000 ranges:[ 0.135492] rcar-pcie fe000000.pcie: Parsing ranges property...[ 0.135509] rcar-pcie fe000000.pcie: IO 0x00fe100000..0x00fe1fffff -> 0x0000000000[ 0.135534] rcar-pcie fe000000.pcie: MEM 0x00fe200000..0x00fe3fffff -> 0x00fe200000[ 0.135554] rcar-pcie fe000000.pcie: MEM 0x0030000000..0x0037ffffff -> 0x0030000000[ 0.135570] rcar-pcie fe000000.pcie: MEM 0x0038000000..0x003fffffff -> 0x0038000000[ 0.135585] rcar-pcie fe000000.pcie: Parsing dma-ranges property...[ 0.135596] rcar-pcie fe000000.pcie: IB MEM 0x0040000000..0x00bfffffff -> 0x0040000000[ 0.199776] rcar-pcie fe000000.pcie: PCIe link down[ 0.200014] rcar-pcie ee800000.pcie: host bridge /soc/pcie@ee800000 ranges:[ 0.200029] rcar-pcie ee800000.pcie: Parsing ranges property...[ 0.200044] rcar-pcie ee800000.pcie: IO 0x00ee900000..0x00ee9fffff -> 0x0000000000[ 0.200066] rcar-pcie ee800000.pcie: MEM 0x00eea00000..0x00eebfffff -> 0x00eea00000[ 0.200085] rcar-pcie ee800000.pcie: MEM 0x00c0000000..0x00c7ffffff -> 0x00c0000000[ 0.200100] rcar-pcie ee800000.pcie: MEM 0x00c8000000..0x00cfffffff -> 0x00c8000000[ 0.200111] rcar-pcie ee800000.pcie: Parsing dma-ranges property...[ 0.200145] rcar-pcie ee800000.pcie: IB MEM 0x0040000000..0x00bfffffff -> 0x0040000000[ 0.267751] rcar-pcie ee800000.pcie: PCIe link down[ 0.304727] SuperH (H)SCI(F) driver initialized.
My dts entries is as below:
&pciec1 { status = "okay";};&pciec0_ep { status = "okay";
}.
And I followed the instruction given in the :
https://github.com/renesas-rz/rzg2-pcie-endpoint.
root@hihope-rzg2n:~# ls /sys/class/pci_epc/fe000000.pcie-eproot@hihope-rzg2n:~# ls /sys/bus/pci-epf/driverspci_epf_testroot@hihope-rzg2n:~# mount -t configfs none /sys/kernel/configmount: /sys/kernel/config: none already mounted or mount point busy.root@hihope-rzg2n:~# cd /sys/kernel/config/pci_eproot@hihope-rzg2n:/sys/kernel/config/pci_ep# mkdir functions/pci_epf_test/func1root@hihope-rzg2n:/sys/kernel/config/pci_ep# ls functions/pci_epf_test/func1/baseclass_code cache_line_size deviceid interrupt_pin msi_interrupts msix_interrupts progif_code revid subclass_code subsys_id subsys_vendor_id vendoridroot@hihope-rzg2n:/sys/kernel/config/pci_ep# cd /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/root@hihope-rzg2n:/sys/kernel/config/pci_ep/functions/pci_epf_test/func1# cat vendorid0xffffroot@hihope-rzg2n:/sys/kernel/config/pci_ep/functions/pci_epf_test/func1# cat interrupt_pin0x0001root@hihope-rzg2n:/sys/kernel/config/pci_ep/functions/pci_epf_test/func1# lsbaseclass_code cache_line_size deviceid interrupt_pin msi_interrupts msix_interrupts progif_code revid subclass_code subsys_id subsys_vendor_id vendoridroot@hihope-rzg2n:/sys/kernel/config/pci_ep/functions/pci_epf_test/func1# cd /sys/kernel/config/pci_eproot@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 0x1912 > functions/pci_epf_test/func1/vendoridroot@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 0x002b > functions/pci_epf_test/func1/deviceid # RZ/G2Nroot@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 16 > functions/pci_epf_test/func1/msi_interruptsroot@hihope-rzg2n:/sys/kernel/config/pci_ep# cd /sys/kernel/config/pci_eproot@hihope-rzg2n:/sys/kernel/config/pci_ep# ln -s functions/pci_epf_test/func1/ controllers/fe000000.pcie_ep/ln: target `controllers/fe000000.pcie_ep/' is not a directory: No such file or directoryroot@hihope-rzg2n:/sys/kernel/config/pci_ep# ln -s functions/pci_epf_test/func1/ controllers/fe000000.pcie-ep/root@hihope-rzg2n:/sys/kernel/config/pci_ep# cd /sys/kernel/config/pci_eproot@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 1 > controllers/fe000000.pcie_ep/start-sh: controllers/fe000000.pcie_ep/start: No such file or directoryroot@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 1 > controllers/fe000000.pcie-ep/ func1/ start root@hihope-rzg2n:/sys/kernel/config/pci_ep# echo 1 > controllers/fe000000.pcie-ep/start root@hihope-rzg2n:/sys/kernel/config/pci_ep# lspci -vvxxroot@hihope-rzg2n:/sys/kernel/config/pci_ep#
SO lspci -vvxx is not showing any device attached to PCI.
Please guide us what are we missing here.
Thanks for your time and guidance.Please help how can we go about it.
BR,
Nagaraja