I am trying to control the PCIE_12V_EN_N(GPIO05) such as pull up or down as following piece of CVM CONNECTOR 2 in schematic diagram in the AGX Xavier developer kit.
the gpio pin(PCIE_12V_EN_N) in the device tree is as following:
p2822_vdd_12v_pcie: regulator@116 {
compatible = "regulator-fixed";
reg = <116>;
regulator-name = "vdd-12v-pcie";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(A, 1) 1>;
regulator-boot-off;
enable-active-low;
status = "disabled";
};
pcie@141a0000 {
vddio-pex-ctl-supply = <&p2888_spmic_sd3>;
vpcie3v3-supply = <&p2822_vdd_3v3_pcie>;
vpcie12v-supply = <&p2822_vdd_12v_pcie>;
};
From the above device-tree node i can see PCIE_12V_EN_N pin is include in p2822_vdd_12v_pcie and p2822_vdd_12v_pcie is include in pcie@141a0000 .by the way the compatible of pcie@141a0000 is “nvidia,tegra194-pcie”, “snps,dw-pcie”.
I search pcie driver file in L4T by the compatible keyword
$ grep -rn "snps,dw-pcie" *
pci/host/pcie-designware-plat.c:115: { .compatible = "snps,dw-pcie", },
pci/dwc/pcie-designware-plat.c:131: { .compatible = "snps,dw-pcie", },
not find by “nvidia,tegra194-pcie” keyword.is it OK to modify the two files as above? Or other?
next is log about pcie dmesg:
$ dmesg|grep pcie
[ 0.818102] iommu: Adding device 14180000.pcie to group 0
[ 0.818856] iommu: Adding device 14100000.pcie to group 1
[ 0.819569] iommu: Adding device 14140000.pcie to group 2
[ 0.820255] iommu: Adding device 141a0000.pcie to group 3
[ 0.910275] vdd-3v3-pcie: 3300 mV
[ 0.910843] vdd-12v-pcie: 1200 mV
[ 4.225820] tegra-pcie-dw 14180000.pcie: Setting init speed to max speed
[ 4.226635] OF: PCI: host bridge /pcie@14180000 ranges:
[ 4.739503] tegra-pcie-dw 14180000.pcie: link is down
[ 4.739700] tegra-pcie-dw 14180000.pcie: PCI host bridge to bus 0000:00
[ 4.740655] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[ 4.740662] pcie_pme 0000:00:00.0:pcie001: service driver pcie_pme loaded
[ 4.740758] aer 0000:00:00.0:pcie002: service driver aer loaded
[ 4.740897] pcie_pme 0000:00:00.0:pcie001: unloading service driver pcie_pme
[ 4.740969] aer 0000:00:00.0:pcie002: unloading service driver aer
[ 4.742726] tegra-pcie-dw 14180000.pcie: PCIe link is not up...!
[ 4.743221] tegra-pcie-dw 14100000.pcie: Setting init speed to max speed
[ 4.743959] OF: PCI: host bridge /pcie@14100000 ranges:
[ 4.851972] tegra-pcie-dw 14100000.pcie: link is up
[ 4.852218] tegra-pcie-dw 14100000.pcie: PCI host bridge to bus 0001:00
[ 4.866353] pcieport 0001:00:00.0: Signaling PME through PCIe PME interrupt
[ 4.866362] pcie_pme 0001:00:00.0:pcie001: service driver pcie_pme loaded
[ 4.866483] aer 0001:00:00.0:pcie002: service driver aer loaded
[ 4.868280] tegra-pcie-dw 14140000.pcie: Setting init speed to max speed
[ 4.869109] OF: PCI: host bridge /pcie@14140000 ranges:
[ 5.379694] tegra-pcie-dw 14140000.pcie: link is down
[ 5.379862] tegra-pcie-dw 14140000.pcie: PCI host bridge to bus 0003:00
[ 5.380708] pcieport 0003:00:00.0: Signaling PME through PCIe PME interrupt
[ 5.380714] pcie_pme 0003:00:00.0:pcie001: service driver pcie_pme loaded
[ 5.380815] aer 0003:00:00.0:pcie002: service driver aer loaded
[ 5.380958] pcie_pme 0003:00:00.0:pcie001: unloading service driver pcie_pme
[ 5.381030] aer 0003:00:00.0:pcie002: unloading service driver aer
[ 5.382831] tegra-pcie-dw 14140000.pcie: PCIe link is not up...!
[ 5.383384] tegra-pcie-dw 141a0000.pcie: Setting init speed to max speed
[ 5.492591] OF: PCI: host bridge /pcie@141a0000 ranges:
[ 6.004049] tegra-pcie-dw 141a0000.pcie: link is down
[ 6.004210] tegra-pcie-dw 141a0000.pcie: PCI host bridge to bus 0005:00
[ 6.005028] pcieport 0005:00:00.0: Signaling PME through PCIe PME interrupt
[ 6.005035] pcie_pme 0005:00:00.0:pcie001: service driver pcie_pme loaded
[ 6.005167] aer 0005:00:00.0:pcie002: service driver aer loaded
[ 6.005311] pcie_pme 0005:00:00.0:pcie001: unloading service driver pcie_pme
[ 6.005364] aer 0005:00:00.0:pcie002: unloading service driver aer
[ 6.006992] tegra-pcie-dw 141a0000.pcie: PCIe link is not up...!
[ 38.234452] vdd-3v3-pcie: disabling
[ 38.234458] vdd-12v-pcie: disabling
Contrary to it,i find the default status of pcie@141a0000 node in device-tree is “disabled” when decompile device-tree in jeston agx xavier.
In general,i can’t find the corresponding pcie driver file for that.Where is it?
Regards.