PCIe tegra194 endpoint mode regulator question
Subsystems (2)
Hello Tegra PCIe maintainers,
Looking at the device tree binding for Tegra PCIe endpoint mode:Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie-ep.yaml
We can see that 'vddio-pex-ctl-supply' is marked as required.
However, when inspecting the driver itself:drivers/pci/controller/dwc/pcie-tegra194.c
regulator_enable(pcie->pex_ctl_supply);
is only called in tegra_pcie_config_controller(). tegra_pcie_init_controller() is called by tegra_pcie_config_rp() (Root Complex mode), however regulator_enable(pcie->pex_ctl_supply); is never called by tegra_pcie_config_ep() or pex_ep_event_pex_rst_deassert(), or any other function called when the driver is using any of the PCIe endpoint mode compatible strings.
So, I think there is something wrong here.
Either:
1) 'vddio-pex-ctl-supply' shouldn't be marked as required in the PCIe endpoint mode device tree binding (or perhaps not be there at all, since regulator_enable(pcie->pex_ctl_supply) is never called.)
2) drivers/pci/controller/dwc/pcie-tegra194.c should call regulator_enable(pcie->pex_ctl_supply) even in the endpoint mode case.
Looking forward to your feedback.
Kind regards,
Niklas
Jon Hunter
maintainerHi Sagar,
Quoted 20 lines · Niklas Cassel
Hello Tegra PCIe maintainers,
Looking at the device tree binding for Tegra PCIe endpoint mode:
Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie-ep.yamlWe can see that 'vddio-pex-ctl-supply' is marked as required.
However, when inspecting the driver itself:
drivers/pci/controller/dwc/pcie-tegra194.c
regulator_enable(pcie->pex_ctl_supply);
is only called integra_pcie_config_controller().tegra_pcie_init_controller()is called bytegra_pcie_config_rp()(Root Complex mode), howeverregulator_enable(pcie->pex_ctl_supply); is never called bytegra_pcie_config_ep()orpex_ep_event_pex_rst_deassert(), or any other function called when the driver is using any of the PCIe endpoint mode compatible strings.So, I think there is something wrong here.
Quoted 7 lines
Either:
1) 'vddio-pex-ctl-supply' shouldn't be marked as required in the PCIe endpoint mode device tree binding (or perhaps not be there at all, sinceregulator_enable(pcie->pex_ctl_supply)is never called.)2)
drivers/pci/controller/dwc/pcie-tegra194.cshould callregulator_enable(pcie->pex_ctl_supply) even in the endpoint mode case.
Looks like you added this. Can you confirm if this is needed or not?
Jon
Signature · 1 line
nvpublic