Two of the MT8189 power domains, ADSP_TOP_DORMANT and EDP_TX_DORMANT, were
not implemented yet. Both need the SRAM isolation step around the
power-down bit, and both invert the meaning of that bit, neither of which
the driver describes. Powering one up clears the power-down bit instead of
setting it, so the SRAM is left off and its isolation is never released,
and since the acknowledgment is inverted as well, the poll sees what it is
waiting for and power_domain_on() returns 0 anyway. The MT8189 driver said
as much in a comment and it was ok because nothing in the U-Boot device
tree referenced either domain.

The eDP transmitter on that SoC sits in EDP_TX_DORMANT, so bringing the
eDP output up needs this first. Sending it on its own, ahead of the
display work, since it stands by itself.

Patch 1 adds the two capability flags to the core driver. Patch 2 sets
them on the two MT8189 domains that need them, and states the missing
SRAM power-down acknowledgment bits of EDP_TX_DORMANT explicitly rather
than leaving the field implicitly zero, matching Linux.

Tested on a Genio 720 EVK.

Signed-off-by: David Lechner <[email protected]>
---
To: Jaehoon Chung <[email protected]>
To: Peng Fan <[email protected]>
To: Ryder Lee <[email protected]>
To: Weijie Gao <[email protected]>
To: Chunfeng Yun <[email protected]>
To: Igor Belwon <[email protected]>
To: David Lechner <[email protected]>
To: Julien Stephan <[email protected]>
To: GSS_MTK_Uboot_upstream <[email protected]>
To: Tom Rini <[email protected]>
Cc: [email protected]

---
David Lechner (2):
      power: domain: mediatek: support SRAM isolation and inverted power down
      power: domain: mt8189: model the SRAM handling of two domains

 drivers/power/domain/mt8189-power-domain.c | 14 ++++----
 drivers/power/domain/mtk-power-domain.c    | 51 +++++++++++++++++++++++++-----
 drivers/power/domain/mtk-power-domain.h    | 17 ++++++++++
 3 files changed, 68 insertions(+), 14 deletions(-)
---
base-commit: cc9162bd9d65870bde567b9cac72316a8487aa09
change-id: 20260916-mtk-power-domain-sram-iso-2ecbe6abeaa4

Best regards,
--  
David Lechner <[email protected]>

Reply via email to