[PATCH 0/9] clk: mediatek: mt8365: fix clocks

David Lechner dlechner at baylibre.com
Fri Dec 19 00:23:20 CET 2025


There were a number of bugs in the clock definitions for the mt8365
clock drivers. This series aims to fix the obvious issues.

This builds on [1] that implements the clk dump command to inspect the
clock trees at runtime. Using that revealed quite a few mistakes in
the clock definitions.

Additionally, the topckgen-cg hack is removed for mt8365 since it would
require an extra devicetree node using the same address space as the
topckgen node. This would not be accepted upstream in Linux, so we
shouldn't do it in U-Boot either. mt85{12,16,18} also have this hack.
I didn't attempt to remove it from those platforms since I don't have
hardware to test on.

[1]: https://lore.kernel.org/u-boot/20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com/

Signed-off-by: David Lechner <dlechner at baylibre.com>
---
David Lechner (9):
      mt8365_evk_defconfig: enable clk command
      clk: mediatek: mt8365: fix missing and out of order clocks
      clk: mediatek: add separate gates_offs for cg gates
      clk: mediatek: fix fixed clock parents
      clk: mediatek: mt8365: fix some clock parents
      clk: mediatek: mt8365: split struct mtk_clk_tree
      clk: mediatek: allow gates in topckgen drivers
      clk: mediatek: mt8365: remove separate topckgen-cg driver
      clk: mediatek: mt8365: fix missing topckgen IDs

 configs/mt8365_evk_defconfig      |   1 +
 drivers/clk/mediatek/clk-mt7622.c |  31 ++--
 drivers/clk/mediatek/clk-mt7623.c |  41 +++---
 drivers/clk/mediatek/clk-mt7629.c |  34 +++--
 drivers/clk/mediatek/clk-mt7981.c |  27 ++--
 drivers/clk/mediatek/clk-mt7986.c |  23 +--
 drivers/clk/mediatek/clk-mt7987.c |  21 +--
 drivers/clk/mediatek/clk-mt7988.c |  37 ++---
 drivers/clk/mediatek/clk-mt8183.c |  14 +-
 drivers/clk/mediatek/clk-mt8365.c | 297 ++++++++++++++++++++++++++++----------
 drivers/clk/mediatek/clk-mt8512.c |  11 +-
 drivers/clk/mediatek/clk-mt8516.c |  14 +-
 drivers/clk/mediatek/clk-mt8518.c |  16 +-
 drivers/clk/mediatek/clk-mtk.c    |  88 ++++++++---
 drivers/clk/mediatek/clk-mtk.h    |   8 +-
 15 files changed, 454 insertions(+), 209 deletions(-)
---
base-commit: 930eff5416ea98ebd09cec73f5d06a7033b4d52e
change-id: 20251218-clk-mtk-mt8365-fixes-81a312e8af28
prerequisite-message-id: <20251210-arm-dts-mediatek-switch-mt8365-to-of_upstream-v1-1-71317e50d414 at baylibre.com>
prerequisite-patch-id: 3520ac6a30d21a4efac14c4d2cae0d72912f9f13
prerequisite-change-id: 20251215-clk-mtk-improvements-db0b9d1d3113:v1
prerequisite-patch-id: 2ae6231f7dcfd6fb770d0633c3feb5ee2a3dab1a
prerequisite-patch-id: 3520ac6a30d21a4efac14c4d2cae0d72912f9f13
prerequisite-patch-id: b7eb936e644b8123b484e53d0f3ecae2bdad642a
prerequisite-patch-id: 98d2cd7251129d2e91759a5f18aa10946e465e25
prerequisite-patch-id: 8214f8af75d20b73a605ad78255b21cedffe68b1
prerequisite-patch-id: 539af724f889b136a758a6833dbe4d3eaa986a8b
prerequisite-patch-id: 3330313a7c4178da97b50159ca627aafadfb0049
prerequisite-patch-id: 96f170f2b16aeacc404270b8444dfe5a928f8a93
prerequisite-patch-id: 7379668c38c251dbcd81c4d5b72ba5fdaad91a0d
prerequisite-patch-id: fbe17c1c0d5f18e2a33a8208e63e73292a6b4a5c

Best regards,
-- 
David Lechner <dlechner at baylibre.com>



More information about the U-Boot mailing list