[PATCH v1 0/2] Add GPU clock/reset management for TH1520 in genpd

Michal Wilczynski m.wilczynski at samsung.com
Wed Apr 9 02:30:23 PDT 2025


This small patch series adds clock and reset support for the GPU in the
T-HEAD TH1520 SoC through the generic power domain (genpd) framework.

The TH1520 GPU requires a special sequence involving multiple clocks and resets
to safely bring it out of reset. Coordinating this sequence properly is
necessary for correct GPU operation. Following discussions on the mailing list
with kernel maintainers [1], the recommended approach is to model this
complexity inside a power domain driver, keeping SoC-specific details out of
the GPU driver, clock framework, and reset framework.

The first patch updates the AON firmware bindings to describe the clocks
and resets that the PM domain needs to control.

The second patch implements GPU-specific handling inside the TH1520 PM domain
driver, using the genpd start/stop callbacks to sequence the clocks and resets
at runtime.

This approach aligns with recent efforts to treat PM domains as SoC-specific
power management drivers, as presented at OSSEU 2024 [2].

This patchset continues the work started in bigger series [3] by moving the GPU
initialization sequence for the TH1520 SoC into a generic PM domain driver,
specifically handling clock and reset management as part of GPU bring-up.

[1] - https://lore.kernel.org/all/CAPDyKFqsJaTrF0tBSY-TjpqdVt5=6aPQHYfnDebtphfRZSU=-Q@mail.gmail.com/
[2] - https://osseu2024.sched.com/event/1ej38/the-case-for-an-soc-power-management-driver-stephen-boyd-google
[3] - https://lore.kernel.org/all/20250219140239.1378758-1-m.wilczynski@samsung.com/

Michal Wilczynski (2):
  dt-bindings: firmware: thead,th1520: Add clocks and resets
  pmdomain: thead: Add GPU-specific clock and reset handling for TH1520

 .../bindings/firmware/thead,th1520-aon.yaml   |  28 +++++
 drivers/pmdomain/thead/th1520-pm-domains.c    | 119 ++++++++++++++++++
 2 files changed, 147 insertions(+)

-- 
2.34.1




More information about the linux-riscv mailing list