Skip to content

PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash - #1562

Closed
Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3from
hariharan-sree:pcie-phy-reg-voting-fix
Closed

Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3from
hariharan-sree:pcie-phy-reg-voting-fix

Conversation

@hariharan-sree

Copy link
Copy Markdown

The Nord PCIe PHY common block (vdda-phy-a/vdda-pll-a) was not being
voted when only a subset of ports (B/C/D) were enabled, and two Nord
boards had the vdda-pll-b/c/d-supply regulators mis-mapped onto the
same rail as vdda-pll-a. With the PHY's common/PLL supplies left
improperly voted, accessing the DBI register space during
suspend/resume causes a crash.

  • phy-qcom-qmp-pcie-multiphy.c: add vdda-phy-a/vdda-pll-a to the
    port B/C/D/CD/BCD regulator lists so the shared common-block supply
    is always voted regardless of which ports are active.
  • nord-ride-embedded.dts: fix vdda-pll-b/c/d-supply to point at
    vreg_l2e_0p9 instead of being aliased to vreg_l1e_0p9
    (vdda-pll-a's rail).
  • nord-rrd.dts: same regulator fix, plus removal of a duplicate
    &pcie_phy/&pcie0..3 override block further down in the file
    that re-applied the stale vreg_l1e_0p9 mapping via devicetree
    node merging, silently undoing the fix.

…es for all lane configs

The regulator lists for port B, C, D, CD and BCD only contained the
per-lane vdda-phy-x/vdda-pll-x supplies and never included the shared
vdda-phy-a/vdda-pll-a rails that back the common PCS/common block.

When a board enables only ports B, C or D (or a combination that does
not include port A), the shared vdda-phy-a/vdda-pll-a regulators are
never voted. The PHY common block, which backs the DBI register
space, is therefore left improperly powered. Accessing the DBI
registers from that under-voted rail during suspend/resume crashes.

Add vdda-phy-a and vdda-pll-a to the port B/C/D/CD/BCD regulator
lists so the shared supply is always voted whenever any of these
ports is active.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…ply regulator mapping

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply. With all four PLL rails tied to a single
regulator, the PHY's PLL supplies for lanes B/C/D are not voted on
their actual hardware regulator, leaving the PCIe PHY improperly
powered. This causes crashes when the DBI register space is
accessed during suspend/resume.

Point vdda-pll-b/c/d-supply at vreg_l2e_0p9, matching the board's
actual regulator assignment.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…nd drop duplicate override

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply, leaving the PCIe PHY's PLL supplies improperly
voted. Point them at vreg_l2e_0p9, matching the board's actual
regulator assignment.

The file also carried a second, duplicate &pcie_phy / &pcie0.. &pcie3
and &pcie0_port0.. &pcie3_port0 override block further down with the
same stale vdda-pll-b/c/d-supply = vreg_l1e_0p9 mapping. Since
devicetree merges same-labeled fragments in file order, this later
block silently re-applied the wrong mapping on top of the fix,
leaving the PHY under-voted and causing crashes when the DBI
register space is accessed during suspend/resume.

Drop the duplicate override block so the corrected mapping sticks.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant