mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: sophgo: sg2042: Keep gates used by firmware enabled
@ 2026-11-21 18:18 Han Gao via B4 Relay
  2026-11-21 18:18 ` [PATCH v2 1/2] dt-bindings: clock: sophgo: Allow protected gate clocks on SG2042 Han Gao via B4 Relay
  2026-11-21 18:18 ` [PATCH v2 2/2] clk: sophgo: Keep SG2042 gates listed in protected-clocks enabled Han Gao via B4 Relay
  0 siblings, 2 replies; 4+ messages in thread
From: Han Gao via B4 Relay @ 2026-11-21 18:18 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Chen Wang, Inochi Amaoto,
	Yao Zi
  Cc: Chen Wang, Han Gao, linux-clk, devicetree, sophgo, linux-kernel, Han Gao

On Milk-V Pioneer, firmware uses I2C0 for the EFI RTC and the serial
flash for its own image and EFI variables. Both sit behind clock gates
shared with devices Linux drives, so runtime PM on the Linux side can
turn them off under the firmware, and GetTime() returns EFI_NOT_READY.

Let firmware list such gates in protected-clocks on the clkgen node,
and keep them enabled.

qcom, the only current user of protected-clocks, does not register such
clocks at all. That would break the I2C controllers Linux uses, as the
DesignWare driver needs the clock rate, so here they stay registered and
are only kept on. I'm not sure this fits the intended use; suggestions
welcome.

Tested on Milk-V Pioneer.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
Changes in v2:
- Drop the EFI MMIO patch, Ard is taking it through the EFI tree
- Use protected-clocks instead of scanning reserved nodes under /soc
  (Krzysztof)
- Document protected-clocks in the binding
- Link to v1: https://patch.msgid.link/20261121-b4-sg2042-efi-rtc-v1-0-19898b8ad497@iscas.ac.cn

To: Stephen Boyd <sboyd@kernel.org>
To: Brian Masney <bmasney+clk@redhat.com>
To: Jerome Brunet <jbrunet+clk@baylibre.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Chen Wang <chen.wang@linux.dev>
To: Inochi Amaoto <inochiama@gmail.com>
Cc: Chen Wang <unicorn_wang@outlook.com>
Cc: linux-clk@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: sophgo@lists.linux.dev
Cc: linux-kernel@vger.kernel.org

---
Han Gao (2):
      dt-bindings: clock: sophgo: Allow protected gate clocks on SG2042
      clk: sophgo: Keep SG2042 gates listed in protected-clocks enabled

 .../devicetree/bindings/clock/sophgo,sg2042-clkgen.yaml  |  2 ++
 drivers/clk/sophgo/clk-sg2042-clkgen.c                   | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261121-b4-sg2042-efi-rtc-e4d5222513ae

Best regards,
--  
Han Gao <gaohan@iscas.ac.cn>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-21 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 18:18 [PATCH v2 0/2] clk: sophgo: sg2042: Keep gates used by firmware enabled Han Gao via B4 Relay
2026-11-21 18:18 ` [PATCH v2 1/2] dt-bindings: clock: sophgo: Allow protected gate clocks on SG2042 Han Gao via B4 Relay
2026-11-21 18:18 ` [PATCH v2 2/2] clk: sophgo: Keep SG2042 gates listed in protected-clocks enabled Han Gao via B4 Relay
2026-11-21 23:48   ` Inochi Amaoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®