[PATCH 0/3] pci: qcom: Add PCIe setting current load support

Ziyue Zhang
2024-12-04T10:53:02Z

Base DT:
https://lore.kernel.org/all/20241122023314.1616353-1-quic_ziyuzhan@quicinc.com/

This series add PCIe current load vote/devote for PCIe PHY driver, add
vdda-pll-max-microamp property in DT, and also document current load
properties in dt-bindings.

On platform QCS615, the current that phy consumes will exceed the maximum
current the regulator can provide in LPM mode, leading to over current
protection and system boot up stuck.

This series can fix the issue by setting current load to an expected value
parsed from DT. This will vote the regulator to work in HPM mode so that
it is able to output a larger current and viod over current protection.
When the PCIe PHY poweroff in case like system suspend or shutdown, it
will also devote regulator back to LPM mode to decline regulator itself's
power consumption by setting load to zero.

Besides, three optional current load properties are added in dt-bindings,
vdda-phy-max-microamp, vdda-pll-max-microamp and vdda-qref-max-microamp.
PCIe PHY that wants to vote for more current consumption should provide
corresponding property.

Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
---
Have following changes:
- Add optional current load properties
- Add pcie phy max current property.
- Add current load vote/devote for PCIe PHY

Ziyue Zhang (3):
dt-bindings: phy: qcom,qmp-pcie: add optional current load properties
phy: qcom: qmp-pcie: add current load vote/devote for PCIe PHY
arm64: dts: qcom: qcs615: add pcie phy max current property

.../phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 8 +++++
arch/arm64/boot/dts/qcom/qcs615-ride.dts | 1 +
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 35 +++++++++++++++++--
3 files changed, 42 insertions(+), 2 deletions(-)

base-commit: ced7ce570dca175d87392ebaacf6c75f93aa2418
--
2.34.1