Re: [PATCH v2] gpio: rockchip: restore the bank registers after hibernation

From: Igor Velkov

Date: Fri Dec 04 2026 - 14:59:10 EST


Hi Heiko,

A correction on the gmac part: the boot kernel closes those gates, not
the power cut. WoL is set by NetworkManager in the image only, so the
boot kernel's rk_gmac_suspend() powers the gmac down, and the image,
which kept the clocks on, cannot know. On ODROID-M1, with power/wakeup
enabled in the boot kernel, the gates stay open and the link comes up.

So after restore the gates are whatever the boot kernel left. For v3 of
the GPIO patch I see two ways: clk-rockchip writes its gates back after
restore, as at91, tegra210 and ti do with clk_restore_context(), and v3
leaves the clocks alone; or v3 re-enables the debounce clock itself, and
dwmac-rk and other drivers each need the same. Which do you prefer?

I can send a patch for rk3568 and rk3399 that saves and restores the
gate registers like rk3288_clk_resume() does, tested on ODROID-M1 and
Helios64.

Igor