[PATCH linux-next 11/33] clk: mediatek: Fix MT6779 onecell IDs after common probe migration
From: Akari Tsuyukusa
Date: Sat Nov 28 2026 - 20:48:28 EST
Migrating the MT6779 topckgen and apmixedsys clock drivers to the
common probe/remove helpers stopped using CLK_*_NR for onecell data
allocation, causing out-of-bounds registrations due to missing dummy
slots for ID 0 and several unimplemented clock IDs.
Add the missing dummy slots so all clock IDs stay within bounds.
Fixes: fea303572802 ("clk: mediatek: mt6779: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@xxxxxxxxx>
---
drivers/clk/mediatek/clk-mt6779.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c
index 45a9e5693658..61c23e1148b7 100644
--- a/drivers/clk/mediatek/clk-mt6779.c
+++ b/drivers/clk/mediatek/clk-mt6779.c
@@ -17,6 +17,12 @@
static DEFINE_SPINLOCK(mt6779_clk_lock);
+static const struct mtk_gate topck_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "topck_dummy"),
+ GATE_DUMMY(CLK_TOP_MSDC30_2, "topck_msdc30_2_dummy"),
+ GATE_DUMMY(CLK_TOP_PMICSPI, "topck_pmicspi_dummy"),
+};
+
static const struct mtk_fixed_clk top_fixed_clks[] = {
FIXED_CLK(CLK_TOP_CLK26M, "f_f26m_ck", "clk26m", 26000000),
};
@@ -1114,6 +1120,8 @@ static const struct mtk_gate_regs apmixed_cg_regs = {
* apmixed_appll26m is the toppest clock gate of all PLLs.
*/
static const struct mtk_gate apmixed_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "apmixed_dummy"),
+ GATE_DUMMY(CLK_APMIXED_ARMPLL_BB, "apmixed_armpll_bb_dummy"),
GATE_APMIXED(CLK_APMIXED_SSUSB26M, "apmixed_ssusb26m",
"f_f26m_ck", 4),
GATE_APMIXED_FLAGS(CLK_APMIXED_APPLL26M, "apmixed_appll26m",
@@ -1218,6 +1226,8 @@ static const struct mtk_clk_desc apmixed_desc = {
};
static const struct mtk_clk_desc topck_desc = {
+ .clks = topck_clks,
+ .num_clks = ARRAY_SIZE(topck_clks),
.fixed_clks = top_fixed_clks,
.num_fixed_clks = ARRAY_SIZE(top_fixed_clks),
.factor_clks = top_divs,
--
2.56.0