* [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs
@ 2026-11-29 1:47 Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 01/33] clk: mediatek: Skip common MMIO mapping for PLL-only controllers Akari Tsuyukusa
` (32 more replies)
0 siblings, 33 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Thank you for merging my previous series migrating MediaTek clock
drivers to the common probe/remove helpers [1].
When converting from _NR macros to ARRAY_SIZE(), my oversight caused
clock ID mismatches (similar to [2]) and premature descriptor frees in
several drivers. In addition, sashiko-bot reported pre-existing bugs in
the common helpers and SoC drivers. This series fixes both.
This series splits the work into bug fixes (PATCH 1-14) and cleanup of
now-unused _NR definitions (PATCH 15-33):
PATCH 1,4: Fix my mistakes in common helpers
PATCH 2,3,5: Fix pre-existing bugs in common helpers
PATCH 6-14: Fix clock ID and descriptor lifetime bugs in SoC drivers
PATCH 15-33: Drop unused _NR macros from dt-bindings
PATCH 9 and PATCH 10 are separated to ease backporting:
PATCH 9 fixes pre-existing missing MT2701 audsys clock IDs,
and PATCH 10 fixes the new regressions introduced by the migration.
Based on linux-next 20261127.
Part of this series was assisted by LLM.
PS: The unmerged pllfh support in common helpers and per-SoC migration
from [1] will be improved and sent in a separated series,
including fixes for several bugs found in the drivers.
[1] [PATCH v2 00/35] clk: mediatek: Migrate to common probe/remove helpers and fix memory leaks
https://lore.kernel.org/all/20261013151734.3177690-1-akkun11.open@gmail.com/T/
[2] [PATCH 0/6] clk: mediatek: Fix descriptor clock ID allocation
https://lore.kernel.org/all/20260921102522.1640072-1-akkun11.open@gmail.com/T/
Akari Tsuyukusa (33):
clk: mediatek: Skip common MMIO mapping for PLL-only controllers
clk: mediatek: Fix NULL pointer dereference in pdev remove
clk: mediatek: Drop unused shared_io flag
clk: mediatek: Pass node to of_platform_populate() in common probe
clk: mediatek: Fix MFG mux notifier use-after-free
clk: mediatek: mt2701: Keep CPU mux descriptors alive
clk: mediatek: mt8167: Keep muxes descriptors alive
clk: mediatek: mt8516: Keep clock descriptors alive
clk: mediatek: Reserve missing MT2701 audsys clock IDs
clk: mediatek: Fix MT2701 onecell IDs after common probe migration
clk: mediatek: Fix MT6779 onecell IDs after common probe migration
clk: mediatek: Fix MT6797 onecell IDs after common probe migration
clk: mediatek: Fix MT8135 onecell IDs after common probe migration
clk: mediatek: Fix MT8173 onecell IDs after common probe migration
dt-bindings: clock: mt2701: Drop unused _NR macros
dt-bindings: clock: mt2712: Drop unused _NR macros
dt-bindings: clock: mt6765: Drop unused _NR macros
dt-bindings: clock: mt6779: Drop unused _NR macros
dt-bindings: clock: mt6795: Drop unused _NR macros
dt-bindings: clock: mt6797: Drop unused _NR macros
dt-bindings: clock: mt7622: Drop unused _NR macros
dt-bindings: clock: mt7629: Drop unused _NR macros
dt-bindings: clock: mt7988: Drop unused _NR macros
dt-bindings: clock: mt8135: Drop unused _NR macros
dt-bindings: clock: mt8167: Drop unused _NR macros
dt-bindings: clock: mt8173: Drop unused _NR macros
dt-bindings: clock: mt8183: Drop unused _NR macros
dt-bindings: clock: mt8186: Drop unused _NR macros
dt-bindings: clock: mt8188: Drop unused _NR macros
dt-bindings: clock: mt8192: Drop unused _NR macros
dt-bindings: clock: mt8195: Drop unused _NR macros
dt-bindings: clock: mt8365: Drop unused _NR macros
dt-bindings: clock: mt8516: Drop unused _NR macros
drivers/clk/mediatek/clk-mt2701-aud.c | 2 +
drivers/clk/mediatek/clk-mt2701.c | 11 ++-
drivers/clk/mediatek/clk-mt6779.c | 10 +++
drivers/clk/mediatek/clk-mt6797.c | 14 ++++
drivers/clk/mediatek/clk-mt8135-apmixedsys.c | 7 ++
drivers/clk/mediatek/clk-mt8167.c | 2 +-
drivers/clk/mediatek/clk-mt8173-infracfg.c | 1 +
drivers/clk/mediatek/clk-mt8516.c | 8 +-
drivers/clk/mediatek/clk-mtk.c | 76 +++++++++++--------
drivers/clk/mediatek/clk-mtk.h | 1 -
.../dt-bindings/clock/mediatek,mt6795-clk.h | 7 --
.../dt-bindings/clock/mediatek,mt7988-clk.h | 4 -
.../dt-bindings/clock/mediatek,mt8188-clk.h | 29 -------
.../dt-bindings/clock/mediatek,mt8365-clk.h | 18 -----
include/dt-bindings/clock/mt2701-clk.h | 13 ----
include/dt-bindings/clock/mt2712-clk.h | 12 ---
include/dt-bindings/clock/mt6765-clk.h | 6 --
include/dt-bindings/clock/mt6779-clk.h | 11 ---
include/dt-bindings/clock/mt6797-clk.h | 7 --
include/dt-bindings/clock/mt7622-clk.h | 8 --
include/dt-bindings/clock/mt7629-clk.h | 2 -
include/dt-bindings/clock/mt8135-clk.h | 4 -
include/dt-bindings/clock/mt8167-clk.h | 6 --
include/dt-bindings/clock/mt8173-clk.h | 8 --
include/dt-bindings/clock/mt8183-clk.h | 16 ----
include/dt-bindings/clock/mt8186-clk.h | 16 ----
include/dt-bindings/clock/mt8192-clk.h | 26 -------
include/dt-bindings/clock/mt8195-clk.h | 30 --------
include/dt-bindings/clock/mt8516-clk.h | 2 -
29 files changed, 94 insertions(+), 263 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH linux-next 01/33] clk: mediatek: Skip common MMIO mapping for PLL-only controllers
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 02/33] clk: mediatek: Fix NULL pointer dereference in pdev remove Akari Tsuyukusa
` (31 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
mtk_clk_register_plls() maps the PLL registers itself and does not use
the base address passed by __mtk_clk_simple_probe(). The common mapping
is therefore redundant when a descriptor only provides PLL clocks.
This change was mistakenly added when adding PLL support to the common
helpers.
Limit the common mapping to composite and divider clocks, which
actually use the base address.
Fixes: 5a5a9ce0c656 ("clk: mediatek: Add PLL support to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 26e5e177929f..f5938672ba20 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -487,7 +487,7 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
}
/* Composite and divider clocks needs us to pass iomem pointer */
- if (mcd->composite_clks || mcd->divider_clks || mcd->plls) {
+ if (mcd->composite_clks || mcd->divider_clks) {
if (!mcd->shared_io)
base = devm_platform_ioremap_resource(pdev, 0);
else
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 02/33] clk: mediatek: Fix NULL pointer dereference in pdev remove
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 01/33] clk: mediatek: Skip common MMIO mapping for PLL-only controllers Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 03/33] clk: mediatek: Drop unused shared_io flag Akari Tsuyukusa
` (30 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
__mtk_clk_simple_remove() only calls device_get_match_data() and does
not fall back to platform_get_device_id() to retrieve mcd,
so when removing clock drivers which are not registered from devicetree
such as mmsys, mcd becomes NULL and should cause a kernel panic due to
a NULL pointer dereference.
Extract the descriptor lookup logic into mtk_clk_get_desc() and use it
in both __mtk_clk_simple_probe() and __mtk_clk_simple_remove().
Fixes: 252091242404 ("clk: mediatek: clk-mtk: Introduce clk_mtk_pdev_{probe,remove}()")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mtk.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index f5938672ba20..5d8bcd09c9b5 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -466,25 +466,34 @@ void mtk_clk_unregister_dividers(const struct mtk_clk_divider *mcds, int num,
}
EXPORT_SYMBOL_GPL(mtk_clk_unregister_dividers);
+static const struct mtk_clk_desc *mtk_clk_get_desc(struct platform_device *pdev)
+{
+ const struct platform_device_id *id;
+ const struct mtk_clk_desc *mcd;
+
+ mcd = device_get_match_data(&pdev->dev);
+ if (mcd)
+ return mcd;
+
+ /* Clock driver wasn't registered from devicetree */
+ id = platform_get_device_id(pdev);
+ if (id)
+ return (const struct mtk_clk_desc *)id->driver_data;
+
+ return NULL;
+}
+
static int __mtk_clk_simple_probe(struct platform_device *pdev,
struct device_node *node)
{
- const struct platform_device_id *id;
const struct mtk_clk_desc *mcd;
struct clk_hw_onecell_data *clk_data;
void __iomem *base = NULL;
int num_clks, r;
- mcd = device_get_match_data(&pdev->dev);
- if (!mcd) {
- /* Clock driver wasn't registered from devicetree */
- id = platform_get_device_id(pdev);
- if (id)
- mcd = (const struct mtk_clk_desc *)id->driver_data;
-
- if (!mcd)
- return -EINVAL;
- }
+ mcd = mtk_clk_get_desc(pdev);
+ if (!mcd)
+ return -EINVAL;
/* Composite and divider clocks needs us to pass iomem pointer */
if (mcd->composite_clks || mcd->divider_clks) {
@@ -668,7 +677,7 @@ static void __mtk_clk_simple_remove(struct platform_device *pdev,
struct device_node *node)
{
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
- const struct mtk_clk_desc *mcd = device_get_match_data(&pdev->dev);
+ const struct mtk_clk_desc *mcd = mtk_clk_get_desc(pdev);
if (mcd->populate_children)
of_platform_depopulate(&pdev->dev);
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 03/33] clk: mediatek: Drop unused shared_io flag
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 01/33] clk: mediatek: Skip common MMIO mapping for PLL-only controllers Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 02/33] clk: mediatek: Fix NULL pointer dereference in pdev remove Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 04/33] clk: mediatek: Pass node to of_platform_populate() in common probe Akari Tsuyukusa
` (29 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
No MediaTek clock driver sets shared_io in struct mtk_clk_desc.
Moreover, the of_iomap() path enabled by this flag lacked a
corresponding iounmap() on driver removal, which would cause a
resource leak if it were ever used.
Just drop this flag and its handling.
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mtk.c | 17 +++++------------
drivers/clk/mediatek/clk-mtk.h | 1 -
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 5d8bcd09c9b5..ab1adcb0085f 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -11,7 +11,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
@@ -497,27 +496,24 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
/* Composite and divider clocks needs us to pass iomem pointer */
if (mcd->composite_clks || mcd->divider_clks) {
- if (!mcd->shared_io)
- base = devm_platform_ioremap_resource(pdev, 0);
- else
- base = of_iomap(node, 0);
+ base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR_OR_NULL(base))
- return IS_ERR(base) ? PTR_ERR(base) : -ENOMEM;
+ if (IS_ERR(base))
+ return PTR_ERR(base);
}
if (mcd->need_runtime_pm) {
r = devm_pm_runtime_enable(&pdev->dev);
if (r)
- goto unmap_io;
+ return r;
/*
* Do a pm_runtime_resume_and_get() to workaround a possible
* deadlock between clk_register() and the genpd framework.
*/
r = pm_runtime_resume_and_get(&pdev->dev);
if (r)
- goto unmap_io;
+ return r;
}
/* Calculate how many clk_hw_onecell_data entries to allocate */
@@ -667,9 +663,6 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
free_base:
if (mcd->need_runtime_pm)
pm_runtime_put(&pdev->dev);
-unmap_io:
- if (mcd->shared_io && base)
- iounmap(base);
return r;
}
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index 11939e3e0b38..1628f073eb29 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -259,7 +259,6 @@ struct mtk_clk_desc {
size_t num_plls;
const struct mtk_clk_rst_desc *rst_desc;
spinlock_t *clk_lock;
- bool shared_io;
int (*clk_notifier_func)(struct device *dev, struct clk *clk);
unsigned int mfg_clk_idx;
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 04/33] clk: mediatek: Pass node to of_platform_populate() in common probe
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (2 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 03/33] clk: mediatek: Drop unused shared_io flag Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 05/33] clk: mediatek: Fix MFG mux notifier use-after-free Akari Tsuyukusa
` (28 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
__mtk_clk_simple_probe() passes pdev->dev.of_node instead of node to
of_platform_populate(). When probed via mtk_clk_pdev_probe(),
pdev->dev.of_node is NULL, causing of_platform_populate() to populate
the entire root devicetree.
All drivers which use populate_children are probed from Device Tree,
so the issue is not currently occurring.
Fixes: afcec47eb847 ("clk: mediatek: Add child-device population to probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mtk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index ab1adcb0085f..604d3a7d21b0 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -612,8 +612,7 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
}
if (mcd->populate_children) {
- r = of_platform_populate(pdev->dev.of_node, NULL, NULL,
- &pdev->dev);
+ r = of_platform_populate(node, NULL, NULL, &pdev->dev);
if (r) {
of_platform_depopulate(&pdev->dev);
goto unregister_provider;
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 05/33] clk: mediatek: Fix MFG mux notifier use-after-free
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (3 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 04/33] clk: mediatek: Pass node to of_platform_populate() in common probe Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 06/33] clk: mediatek: mt2701: Keep CPU mux descriptors alive Akari Tsuyukusa
` (27 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
The MFG mux notifier is registered through mcd->clk_notifier_func()
using devm_mtk_clk_mux_notifier_register(). However, clocks registered
by the common probe helper are unregistered in its error paths and in
__mtk_clk_simple_remove().
devm resources are released only after the probe callback returns or
the driver's remove callback completes. As a result, the remove paths
free struct clk and cause a use-after-free.
Place the resources acquired by the notifier callback in a devres group
and release the group before unregistering the clocks. This ensures
that the notifier is unregistered while its clock is still valid,
both on probe failures and during driver removal.
Fixes: fd9fe654f41c ("clk: mediatek: clk-mtk: Register MFG notifier in mtk_clk_simple_probe()")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mtk.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 604d3a7d21b0..d09efe7eb2e5 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -591,16 +591,24 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
}
if (mcd->clk_notifier_func) {
- struct clk *mfg_mux = clk_data->hws[mcd->mfg_clk_idx]->clk;
+ struct clk *mfg_mux;
+
+ if (!devres_open_group(&pdev->dev, clk_data, GFP_KERNEL)) {
+ r = -ENOMEM;
+ goto unregister_clks;
+ }
+
+ mfg_mux = clk_data->hws[mcd->mfg_clk_idx]->clk;
r = mcd->clk_notifier_func(&pdev->dev, mfg_mux);
+ devres_close_group(&pdev->dev, clk_data);
if (r)
- goto unregister_clks;
+ goto unregister_notifier;
}
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
if (r)
- goto unregister_clks;
+ goto unregister_notifier;
platform_set_drvdata(pdev, clk_data);
@@ -627,6 +635,9 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
unregister_provider:
of_clk_del_provider(node);
platform_set_drvdata(pdev, NULL);
+unregister_notifier:
+ if (mcd->clk_notifier_func)
+ devres_release_group(&pdev->dev, clk_data);
unregister_clks:
if (mcd->clks)
mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
@@ -675,6 +686,8 @@ static void __mtk_clk_simple_remove(struct platform_device *pdev,
of_platform_depopulate(&pdev->dev);
of_clk_del_provider(node);
+ if (mcd->clk_notifier_func)
+ devres_release_group(&pdev->dev, clk_data);
if (mcd->clks)
mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
if (mcd->divider_clks)
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 06/33] clk: mediatek: mt2701: Keep CPU mux descriptors alive
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (4 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 05/33] clk: mediatek: Fix MFG mux notifier use-after-free Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 07/33] clk: mediatek: mt8167: Keep muxes " Akari Tsuyukusa
` (26 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
The infracfg clock descriptor retains a pointer to cpu_muxes
for clock registration and unregistration.
Do not mark the array as __initconst, as it must remain
available after init memory has been freed.
Fixes: ecc3a07f599f ("clk: mediatek: mt2701: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt2701.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 5ea0c4acaf1b..73df452e1cfb 100644
--- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -479,7 +479,7 @@ static const char * const cpu_parents[] = {
"mmpll"
};
-static const struct mtk_composite cpu_muxes[] __initconst = {
+static const struct mtk_composite cpu_muxes[] = {
MUX(CLK_INFRA_CPUSEL, "infra_cpu_sel", cpu_parents, 0x0000, 2, 2),
};
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 07/33] clk: mediatek: mt8167: Keep muxes descriptors alive
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (5 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 06/33] clk: mediatek: mt2701: Keep CPU mux descriptors alive Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 08/33] clk: mediatek: mt8516: Keep clock " Akari Tsuyukusa
` (25 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
The MT8167 topckgen clock provider uses the common probe/remove
helpers. Its remove path calls mtk_clk_unregister_composites(),
which walks the original descriptor array to unregister the muxes.
Drop the __initdata annotation from top_muxes[] so the descriptors
remain available until the clock provider is removed.
Fixes: beb47f194207 ("clk: mediatek: mt8167: Convert to mtk_clk_simple_{probe,remove}()")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt8167.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mt8167.c b/drivers/clk/mediatek/clk-mt8167.c
index c88c41aa7fdf..d05523294251 100644
--- a/drivers/clk/mediatek/clk-mt8167.c
+++ b/drivers/clk/mediatek/clk-mt8167.c
@@ -519,7 +519,7 @@ static const char * const nfiecc_parents[] = {
"csw_nfiecc_sel"
};
-static struct mtk_composite top_muxes[] __initdata = {
+static struct mtk_composite top_muxes[] = {
/* CLK_MUX_SEL0 */
MUX(CLK_TOP_UART0_SEL, "uart0_sel", uart0_parents,
0x000, 0, 1),
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 08/33] clk: mediatek: mt8516: Keep clock descriptors alive
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (6 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 07/33] clk: mediatek: mt8167: Keep muxes " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 09/33] clk: mediatek: Reserve missing MT2701 audsys clock IDs Akari Tsuyukusa
` (24 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
The MT8516 clock provider uses the common probe/remove helpers.
Its remove path walks the clock descriptor arrays to unregister the
clocks, so these arrays must remain available after init memory has
been freed.
Fixes: b8390192f275 ("clk: mediatek: mt8516: Convert to platform driver and simple probe")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt8516.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk-mt8516.c
index b64674559878..7933a0ad5140 100644
--- a/drivers/clk/mediatek/clk-mt8516.c
+++ b/drivers/clk/mediatek/clk-mt8516.c
@@ -20,13 +20,13 @@
static DEFINE_SPINLOCK(mt8516_clk_lock);
-static const struct mtk_fixed_clk fixed_clks[] __initconst = {
+static const struct mtk_fixed_clk fixed_clks[] = {
FIXED_CLK(CLK_TOP_CLK_NULL, "clk_null", NULL, 0),
FIXED_CLK(CLK_TOP_I2S_INFRA_BCK, "i2s_infra_bck", "clk_null", 26000000),
FIXED_CLK(CLK_TOP_MEMPLL, "mempll", "clk26m", 800000000),
};
-static const struct mtk_fixed_factor top_divs[] __initconst = {
+static const struct mtk_fixed_factor top_divs[] = {
FACTOR(CLK_TOP_DMPLL, "dmpll_ck", "mempll", 1, 1),
FACTOR(CLK_TOP_MAINPLL_D2, "mainpll_d2", "mainpll", 1, 2),
FACTOR(CLK_TOP_MAINPLL_D4, "mainpll_d4", "mainpll", 1, 4),
@@ -360,7 +360,7 @@ static const char * const nfiecc_parents[] __initconst = {
"csw_nfiecc_sel"
};
-static struct mtk_composite top_muxes[] __initdata = {
+static struct mtk_composite top_muxes[] = {
/* CLK_MUX_SEL0 */
MUX(CLK_TOP_UART0_SEL, "uart0_sel", uart0_parents,
0x000, 0, 1),
@@ -453,7 +453,7 @@ static const char * const ifr_i2c0_parents[] __initconst = {
"rg_i2c"
};
-static const struct mtk_composite ifr_muxes[] __initconst = {
+static const struct mtk_composite ifr_muxes[] = {
MUX(CLK_IFR_MUX1_SEL, "ifr_mux1_sel", ifr_mux1_parents, 0x000,
2, 2),
MUX(CLK_IFR_ETH_25M_SEL, "ifr_eth_25m_sel", ifr_eth_25m_parents, 0x080,
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 09/33] clk: mediatek: Reserve missing MT2701 audsys clock IDs
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (7 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 08/33] clk: mediatek: mt8516: Keep clock " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 10/33] clk: mediatek: Fix MT2701 onecell IDs after common probe migration Akari Tsuyukusa
` (23 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Migrating the MT2701 audsys clock driver to the common probe/remove
helpers stopped using CLK_AUD_NR for onecell data allocation, causing
out-of-bounds registrations due to missing dummy slots for
unimplemented CLK_AUD_ASRC11 and CLK_AUD_ASRC12 clock IDs.
Reserve their IDs with dummy clocks in the MT2701 audsys clock driver.
Fixes: 0f69a423c458 ("clk: mediatek: Switch to mtk_clk_simple_probe() where possible")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt2701-aud.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt2701-aud.c b/drivers/clk/mediatek/clk-mt2701-aud.c
index 533d35614661..54659bc2e3d6 100644
--- a/drivers/clk/mediatek/clk-mt2701-aud.c
+++ b/drivers/clk/mediatek/clk-mt2701-aud.c
@@ -82,6 +82,8 @@ static const struct mtk_gate audio_clks[] = {
GATE_AUDIO1(CLK_AUD_ASRCI2, "audio_asrci2", "asm_h_sel", 13),
GATE_AUDIO1(CLK_AUD_ASRCO1, "audio_asrco1", "asm_h_sel", 14),
GATE_AUDIO1(CLK_AUD_ASRCO2, "audio_asrco2", "asm_h_sel", 15),
+ GATE_DUMMY(CLK_AUD_ASRC11, "audio_asrc11_dummy"),
+ GATE_DUMMY(CLK_AUD_ASRC12, "audio_asrc12_dummy"),
GATE_DUMMY(CLK_AUD_HDMIRX, "audio_hdmirx_dummy"),
GATE_AUDIO1(CLK_AUD_INTDIR, "audio_intdir", "intdir_sel", 20),
GATE_AUDIO1(CLK_AUD_A1SYS, "audio_a1sys", "aud_mux1_sel", 21),
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 10/33] clk: mediatek: Fix MT2701 onecell IDs after common probe migration
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (8 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 09/33] clk: mediatek: Reserve missing MT2701 audsys clock IDs Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 11/33] clk: mediatek: Fix MT6779 " Akari Tsuyukusa
` (22 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Migrating the MT2701 topckgen, infracfg, pericfg 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.
Add the missing dummy slots so all clock IDs stay within bounds.
Fixes: ecc3a07f599f ("clk: mediatek: mt2701: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt2701.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 73df452e1cfb..0db3af1a478d 100644
--- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -638,6 +638,7 @@ static const struct mtk_gate_regs top_aud_cg_regs = {
GATE_MTK(_id, _name, _parent, &top_aud_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr)
static const struct mtk_gate top_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "topck_dummy"),
GATE_TOP_AUD(CLK_TOP_AUD_48K_TIMING, "a1sys_hp_ck", "aud_mux1_div",
21),
GATE_TOP_AUD(CLK_TOP_AUD_44K_TIMING, "a2sys_hp_ck", "aud_mux2_div",
@@ -680,6 +681,7 @@ static const struct mtk_gate_regs infra_cg_regs = {
GATE_MTK(_id, _name, _parent, &infra_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
static const struct mtk_gate infra_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "infra_dummy"),
GATE_ICG(CLK_INFRA_DBG, "dbgclk", "axi_sel", 0),
GATE_ICG(CLK_INFRA_SMI, "smi_ck", "mm_sel", 1),
GATE_ICG(CLK_INFRA_QAXI_CM4, "cm4_ck", "axi_sel", 2),
@@ -742,6 +744,7 @@ static const struct mtk_gate_regs peri1_cg_regs = {
GATE_MTK(_id, _name, _parent, &peri1_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
static const struct mtk_gate peri_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "peri_dummy"),
GATE_PERI0(CLK_PERI_USB0_MCU, "usb0_mcu_ck", "axi_sel", 31),
GATE_PERI0(CLK_PERI_ETH, "eth_ck", "clk26m", 30),
GATE_PERI0(CLK_PERI_SPI0, "spi0_ck", "spi0_sel", 29),
@@ -874,7 +877,13 @@ static const struct mtk_fixed_factor apmixed_fixed_divs[] = {
FACTOR(CLK_APMIXED_HDMI_REF, "hdmi_ref", "tvdpll", 1, 1),
};
+static const struct mtk_gate apmixed_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "apmixed_dummy"),
+};
+
static const struct mtk_clk_desc apmixedsys_desc = {
+ .clks = apmixed_clks,
+ .num_clks = ARRAY_SIZE(apmixed_clks),
.plls = apmixed_plls,
.num_plls = ARRAY_SIZE(apmixed_plls),
.factor_clks = apmixed_fixed_divs,
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 11/33] clk: mediatek: Fix MT6779 onecell IDs after common probe migration
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (9 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 10/33] clk: mediatek: Fix MT2701 onecell IDs after common probe migration Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 12/33] clk: mediatek: Fix MT6797 " Akari Tsuyukusa
` (21 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 12/33] clk: mediatek: Fix MT6797 onecell IDs after common probe migration
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (10 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 11/33] clk: mediatek: Fix MT6779 " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 13/33] clk: mediatek: Fix MT8135 " Akari Tsuyukusa
` (20 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Migrating the MT6797 topckgen, infracfg 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: 2114f670b8f7 ("clk: mediatek: mt6797: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt6797.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt6797.c b/drivers/clk/mediatek/clk-mt6797.c
index 1934420375e8..feffb90e1026 100644
--- a/drivers/clk/mediatek/clk-mt6797.c
+++ b/drivers/clk/mediatek/clk-mt6797.c
@@ -21,6 +21,11 @@
static DEFINE_SPINLOCK(mt6797_clk_lock);
+static const struct mtk_gate top_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "topck_dummy"),
+ GATE_DUMMY(CLK_TOP_MUX_MEM, "topck_mux_mem_dummy"),
+};
+
static const struct mtk_fixed_factor top_fixed_divs[] = {
FACTOR(CLK_TOP_SYSPLL_CK, "syspll_ck", "mainpll", 1, 1),
FACTOR(CLK_TOP_SYSPLL_D2, "syspll_d2", "mainpll", 1, 2),
@@ -380,6 +385,8 @@ static const struct mtk_composite top_muxes[] = {
};
static const struct mtk_clk_desc topckgen_desc = {
+ .clks = top_clks,
+ .num_clks = ARRAY_SIZE(top_clks),
.factor_clks = top_fixed_divs,
.num_factor_clks = ARRAY_SIZE(top_fixed_divs),
.composite_clks = top_muxes,
@@ -427,6 +434,7 @@ static const struct mtk_gate_regs infra2_cg_regs = {
* We mark them as critical as otherwise the system will hang after boot.
*/
static const struct mtk_gate infra_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "infra_dummy"),
GATE_ICG0(CLK_INFRA_PMIC_TMR, "infra_pmic_tmr", "ulposc", 0),
GATE_ICG0(CLK_INFRA_PMIC_AP, "infra_pmic_ap", "pmicspi_sel", 1),
GATE_ICG0(CLK_INFRA_PMIC_MD, "infra_pmic_md", "pmicspi_sel", 2),
@@ -584,7 +592,13 @@ static const struct mtk_pll_data plls[] = {
0x2B4, 4, 0x2BC, 0x2B8, 0),
};
+static const struct mtk_gate apmixed_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "apmixed_dummy"),
+};
+
static const struct mtk_clk_desc apmixedsys_desc = {
+ .clks = apmixed_clks,
+ .num_clks = ARRAY_SIZE(apmixed_clks),
.plls = plls,
.num_plls = ARRAY_SIZE(plls),
};
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 13/33] clk: mediatek: Fix MT8135 onecell IDs after common probe migration
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (11 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 12/33] clk: mediatek: Fix MT6797 " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 14/33] clk: mediatek: Fix MT8173 " Akari Tsuyukusa
` (19 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Migrating the MT8135 apmixedsys clock driver to the common
probe/remove helpers stopped using CLK_*_NR for onecell data
allocation, causing an out-of-bounds registration due to a missing
dummy slot for ID 0.
Add the missing dummy slot so all clock IDs stay within bounds.
Fixes: 3dba20de43a0 ("clk: mediatek: mt8135-apmixedsys: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt8135-apmixedsys.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt8135-apmixedsys.c b/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
index fe868417de48..2de7ed9b1510 100644
--- a/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
@@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
+#include "clk-gate.h"
#include "clk-mtk.h"
#include "clk-pll.h"
@@ -47,7 +48,13 @@ static const struct mtk_pll_data plls[] = {
PLL(CLK_APMIXED_VDECPLL, "vdecpll", 0x304, 0x31c, 0x80000000, 0, 21, 0x2b0, 6, 0x0, 0x308, 0),
};
+static const struct mtk_gate apmixed_clks[] = {
+ GATE_DUMMY(CLK_DUMMY, "apmixed_dummy"),
+};
+
static const struct mtk_clk_desc apmixed_desc = {
+ .clks = apmixed_clks,
+ .num_clks = ARRAY_SIZE(apmixed_clks),
.plls = plls,
.num_plls = ARRAY_SIZE(plls),
};
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 14/33] clk: mediatek: Fix MT8173 onecell IDs after common probe migration
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (12 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 13/33] clk: mediatek: Fix MT8135 " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 15/33] dt-bindings: clock: mt2701: Drop unused _NR macros Akari Tsuyukusa
` (18 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Migrating the MT8173 infracfg clock driver to the common probe/remove
helpers stopped using CLK_*_NR for onecell data allocation, causing
a out-of-bounds registration due to an missing dummy slot for ID 0.
Add the missing dummy slot so all clock IDs stay within bounds.
Fixes: 8c9dacbf42f1 ("clk: mediatek: mt8173-infracfg: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
drivers/clk/mediatek/clk-mt8173-infracfg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/mediatek/clk-mt8173-infracfg.c b/drivers/clk/mediatek/clk-mt8173-infracfg.c
index fdd994736e83..2feba32da252 100644
--- a/drivers/clk/mediatek/clk-mt8173-infracfg.c
+++ b/drivers/clk/mediatek/clk-mt8173-infracfg.c
@@ -47,6 +47,7 @@ static const struct mtk_fixed_factor infra_divs[] = {
};
static const struct mtk_gate infra_gates[] = {
+ GATE_DUMMY(CLK_DUMMY, "infra_dummy"),
GATE_ICG(CLK_INFRA_DBGCLK, "infra_dbgclk", "axi_sel", 0),
GATE_ICG(CLK_INFRA_SMI, "infra_smi", "mm_sel", 1),
GATE_ICG(CLK_INFRA_AUDIO, "infra_audio", "aud_intbus_sel", 5),
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 15/33] dt-bindings: clock: mt2701: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (13 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 14/33] clk: mediatek: Fix MT8173 " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 16/33] dt-bindings: clock: mt2712: " Akari Tsuyukusa
` (17 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR
- CLK_APMIXED_NR
- CLK_DDRPHY_NR
- CLK_INFRA_NR
- CLK_PERI_NR
- CLK_AUD_NR
- CLK_MM_NR
- CLK_IMG_NR
- CLK_VDEC_NR
- CLK_HIFSYS_NR
- CLK_ETHSYS_NR
- CLK_G3DSYS_NR
- CLK_BDP_NR
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt2701-clk.h | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/include/dt-bindings/clock/mt2701-clk.h b/include/dt-bindings/clock/mt2701-clk.h
index 6d531d5ae065..df501373f2ad 100644
--- a/include/dt-bindings/clock/mt2701-clk.h
+++ b/include/dt-bindings/clock/mt2701-clk.h
@@ -168,7 +168,6 @@
#define CLK_TOP_AUD_EXT2 156
#define CLK_TOP_NFI1X_PAD 157
#define CLK_TOP_AXISEL_D4 158
-#define CLK_TOP_NR 159
/* APMIXEDSYS */
@@ -186,12 +185,10 @@
#define CLK_APMIXED_AUD2PLL 12
#define CLK_APMIXED_TVD2PLL 13
#define CLK_APMIXED_HDMI_REF 14
-#define CLK_APMIXED_NR 15
/* DDRPHY */
#define CLK_DDRPHY_VENCPLL 1
-#define CLK_DDRPHY_NR 2
/* INFRACFG */
@@ -215,7 +212,6 @@
#define CLK_INFRA_DDCCI 18
#define CLK_INFRA_CLK_13M 19
#define CLK_INFRA_CPUSEL 20
-#define CLK_INFRA_NR 21
/* PERICFG */
@@ -269,7 +265,6 @@
#define CLK_PERI_UART1_SEL 46
#define CLK_PERI_UART2_SEL 47
#define CLK_PERI_UART3_SEL 48
-#define CLK_PERI_NR 49
/* AUDIO */
@@ -346,7 +341,6 @@
#define CLK_AUD_MEM_ASRC5 68
#define CLK_AUD_DSD_ENC 69
#define CLK_AUD_ASRC_BRG 70
-#define CLK_AUD_NR 71
/* MMSYS */
@@ -385,7 +379,6 @@
#define CLK_MM_HDMI_AUDIO 32
#define CLK_MM_HDMI_SPDIF 33
#define CLK_MM_TVE_FMM 34
-#define CLK_MM_NR 35
/* IMGSYS */
@@ -395,13 +388,11 @@
#define CLK_IMG_JPGDEC 4
#define CLK_IMG_VENC_LT 5
#define CLK_IMG_VENC 6
-#define CLK_IMG_NR 7
/* VDEC */
#define CLK_VDEC_CKGEN 1
#define CLK_VDEC_LARB 2
-#define CLK_VDEC_NR 3
/* HIFSYS */
@@ -410,7 +401,6 @@
#define CLK_HIFSYS_PCIE0 3
#define CLK_HIFSYS_PCIE1 4
#define CLK_HIFSYS_PCIE2 5
-#define CLK_HIFSYS_NR 6
/* ETHSYS */
#define CLK_ETHSYS_HSDMA 1
@@ -421,11 +411,9 @@
#define CLK_ETHSYS_GDMA 6
#define CLK_ETHSYS_I2S 7
#define CLK_ETHSYS_CRYPTO 8
-#define CLK_ETHSYS_NR 9
/* G3DSYS */
#define CLK_G3DSYS_CORE 1
-#define CLK_G3DSYS_NR 2
/* BDP */
@@ -479,6 +467,5 @@
#define CLK_BDP_LARBRT_DRAM 47
#define CLK_BDP_TMDS_SYN 48
#define CLK_BDP_HDMI_MON 49
-#define CLK_BDP_NR 50
#endif /* _DT_BINDINGS_CLK_MT2701_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 16/33] dt-bindings: clock: mt2712: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (14 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 15/33] dt-bindings: clock: mt2701: Drop unused _NR macros Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 17/33] dt-bindings: clock: mt6765: " Akari Tsuyukusa
` (16 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_APMIXED_NR_CLK
- CLK_TOP_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_MCU_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_IMG_NR_CLK
- CLK_BDP_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_JPGDEC_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt2712-clk.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/include/dt-bindings/clock/mt2712-clk.h b/include/dt-bindings/clock/mt2712-clk.h
index 0800d9ce7c6a..b46eb1a38f2d 100644
--- a/include/dt-bindings/clock/mt2712-clk.h
+++ b/include/dt-bindings/clock/mt2712-clk.h
@@ -24,7 +24,6 @@
#define CLK_APMIXED_ARMCA35PLL 12
#define CLK_APMIXED_ARMCA72PLL 13
#define CLK_APMIXED_ETHERPLL 14
-#define CLK_APMIXED_NR_CLK 15
/* TOPCKGEN */
@@ -221,7 +220,6 @@
#define CLK_TOP_NFIECC_EN 190
#define CLK_TOP_NFI1X_CK_EN 191
#define CLK_TOP_APLL2_D3 192
-#define CLK_TOP_NR_CLK 193
/* INFRACFG */
@@ -232,7 +230,6 @@
#define CLK_INFRA_AO_SPI0 4
#define CLK_INFRA_AO_SPI1 5
#define CLK_INFRA_AO_UART5 6
-#define CLK_INFRA_NR_CLK 7
/* PERICFG */
@@ -282,19 +279,16 @@
#define CLK_PERI_MSDC50_3_HCLK_EN 43
#define CLK_PERI_MSDC30_0_QTR_EN 44
#define CLK_PERI_MSDC30_3_QTR_EN 45
-#define CLK_PERI_NR_CLK 46
/* MCUCFG */
#define CLK_MCU_MP0_SEL 0
#define CLK_MCU_MP2_SEL 1
#define CLK_MCU_BUS_SEL 2
-#define CLK_MCU_NR_CLK 3
/* MFGCFG */
#define CLK_MFG_BG3D 0
-#define CLK_MFG_NR_CLK 1
/* MMSYS */
@@ -361,7 +355,6 @@
#define CLK_MM_DSI2_DIGITAL 60
#define CLK_MM_DSI3 61
#define CLK_MM_DSI3_DIGITAL 62
-#define CLK_MM_NR_CLK 63
/* IMGSYS */
@@ -371,7 +364,6 @@
#define CLK_IMG_CAM_SV_EN 3
#define CLK_IMG_CAM_SV1_EN 4
#define CLK_IMG_CAM_SV2_EN 5
-#define CLK_IMG_NR_CLK 6
/* BDPSYS */
@@ -403,26 +395,22 @@
#define CLK_BDP_TVD_TDC 25
#define CLK_BDP_TVD_54 26
#define CLK_BDP_TVD_CBUS 27
-#define CLK_BDP_NR_CLK 28
/* VDECSYS */
#define CLK_VDEC_CKEN 0
#define CLK_VDEC_LARB1_CKEN 1
#define CLK_VDEC_IMGRZ_CKEN 2
-#define CLK_VDEC_NR_CLK 3
/* VENCSYS */
#define CLK_VENC_SMI_COMMON_CON 0
#define CLK_VENC_VENC 1
#define CLK_VENC_SMI_LARB6 2
-#define CLK_VENC_NR_CLK 3
/* JPGDECSYS */
#define CLK_JPGDEC_JPGDEC1 0
#define CLK_JPGDEC_JPGDEC 1
-#define CLK_JPGDEC_NR_CLK 2
#endif /* _DT_BINDINGS_CLK_MT2712_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 17/33] dt-bindings: clock: mt6765: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (15 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 16/33] dt-bindings: clock: mt2712: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 18/33] dt-bindings: clock: mt6779: " Akari Tsuyukusa
` (15 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_AUDIO_NR_CLK
- CLK_MIPI0A_NR_CLK
- CLK_MM_NR_CLK
- CLK_IMG_NR_CLK
- CLK_VENC_NR_CLK
- CLK_CAM_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt6765-clk.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/dt-bindings/clock/mt6765-clk.h b/include/dt-bindings/clock/mt6765-clk.h
index eb97e568518e..22b46efb4000 100644
--- a/include/dt-bindings/clock/mt6765-clk.h
+++ b/include/dt-bindings/clock/mt6765-clk.h
@@ -239,12 +239,10 @@
#define CLK_AUDIO_I2S2_BCLK 8
#define CLK_AUDIO_I2S3_BCLK 9
#define CLK_AUDIO_I2S4_BCLK 10
-#define CLK_AUDIO_NR_CLK 11
/* MIPI_RX_ANA_CSI0A */
#define CLK_MIPI0A_CSR_CSI_EN_0A 0
-#define CLK_MIPI0A_NR_CLK 1
/* MMSYS_CONFIG */
@@ -278,7 +276,6 @@
#define CLK_MM_IMG_DL_ASYNC_TOP 27
#define CLK_MM_DIG_DSI 28
#define CLK_MM_F26M_HRTWT 29
-#define CLK_MM_NR_CLK 30
/* IMGSYS */
@@ -287,7 +284,6 @@
#define CLK_IMG_FDVT 2
#define CLK_IMG_DPE 3
#define CLK_IMG_RSC 4
-#define CLK_IMG_NR_CLK 5
/* VENCSYS */
@@ -295,7 +291,6 @@
#define CLK_VENC_SET1_VENC 1
#define CLK_VENC_SET2_JPGENC 2
#define CLK_VENC_SET3_VDEC 3
-#define CLK_VENC_NR_CLK 4
/* CAMSYS */
@@ -308,6 +303,5 @@
#define CLK_CAMSV1 6
#define CLK_CAMSV2 7
#define CLK_CAM_CCU 8
-#define CLK_CAM_NR_CLK 9
#endif /* _DT_BINDINGS_CLK_MT6765_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 18/33] dt-bindings: clock: mt6779: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (16 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 17/33] dt-bindings: clock: mt6765: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 19/33] dt-bindings: clock: mt6795: " Akari Tsuyukusa
` (14 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_APMIXED_NR_CLK
- CLK_CAM_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_MFGCFG_NR_CLK
- CLK_IMG_NR_CLK
- CLK_IPE_NR_CLK
- CLK_MM_NR_CLK
- CLK_VDEC_GCON_NR_CLK
- CLK_VENC_GCON_NR_CLK
- CLK_AUD_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt6779-clk.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/include/dt-bindings/clock/mt6779-clk.h b/include/dt-bindings/clock/mt6779-clk.h
index b083139afbd2..f8a4475fbc1b 100644
--- a/include/dt-bindings/clock/mt6779-clk.h
+++ b/include/dt-bindings/clock/mt6779-clk.h
@@ -160,7 +160,6 @@
#define CLK_TOP_ADSPPLL_D6 150
#define CLK_TOP_OSC_D10 151
#define CLK_TOP_UNIVPLL_D3_D16 152
-#define CLK_TOP_NR_CLK 153
/* APMIXED */
#define CLK_APMIXED_ARMPLL_LL 1
@@ -187,7 +186,6 @@
#define CLK_APMIXED_CLKSQ_LVPLL_26M 22
#define CLK_APMIXED_MIPID0_26M 23
#define CLK_APMIXED_MIPID1_26M 24
-#define CLK_APMIXED_NR_CLK 25
/* CAMSYS */
#define CLK_CAM_LARB10 1
@@ -203,7 +201,6 @@
#define CLK_CAM_CAMSV3 11
#define CLK_CAM_CCU 12
#define CLK_CAM_FAKE_ENG 13
-#define CLK_CAM_NR_CLK 14
/* INFRA */
#define CLK_INFRA_PMIC_TMR 1
@@ -313,11 +310,9 @@
#define CLK_INFRA_SSUSB_XHCI 105
#define CLK_INFRA_SPI6 106
#define CLK_INFRA_SPI7 107
-#define CLK_INFRA_NR_CLK 108
/* MFGCFG */
#define CLK_MFGCFG_BG3D 1
-#define CLK_MFGCFG_NR_CLK 2
/* IMG */
#define CLK_IMG_WPE_A 1
@@ -325,7 +320,6 @@
#define CLK_IMG_DIP 3
#define CLK_IMG_LARB6 4
#define CLK_IMG_LARB5 5
-#define CLK_IMG_NR_CLK 6
/* IPE */
#define CLK_IPE_LARB7 1
@@ -335,7 +329,6 @@
#define CLK_IPE_FE 5
#define CLK_IPE_RSC 6
#define CLK_IPE_DPE 7
-#define CLK_IPE_NR_CLK 8
/* MM_CONFIG */
#define CLK_MM_SMI_COMMON 1
@@ -388,19 +381,16 @@
#define CLK_MM_DISP_POSTMASK0 48
#define CLK_MM_DISP_HRT_BW 49
#define CLK_MM_DISP_OVL_FBDC 50
-#define CLK_MM_NR_CLK 51
/* VDEC_GCON */
#define CLK_VDEC_VDEC 1
#define CLK_VDEC_LARB1 2
-#define CLK_VDEC_GCON_NR_CLK 3
/* VENC_GCON */
#define CLK_VENC_GCON_LARB 1
#define CLK_VENC_GCON_VENC 2
#define CLK_VENC_GCON_JPGENC 3
#define CLK_VENC_GCON_GALS 4
-#define CLK_VENC_GCON_NR_CLK 5
/* AUD */
#define CLK_AUD_AFE 1
@@ -431,6 +421,5 @@
#define CLK_AUD_3RD_DAC_PREDIS 26
#define CLK_AUD_3RD_DAC_TML 27
#define CLK_AUD_3RD_DAC_HIRES 28
-#define CLK_AUD_NR_CLK 29
#endif /* _DT_BINDINGS_CLK_MT6779_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 19/33] dt-bindings: clock: mt6795: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (17 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 18/33] dt-bindings: clock: mt6779: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 20/33] dt-bindings: clock: mt6797: " Akari Tsuyukusa
` (13 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mediatek,mt6795-clk.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/dt-bindings/clock/mediatek,mt6795-clk.h b/include/dt-bindings/clock/mediatek,mt6795-clk.h
index 9902906ac902..b35ae3c27d61 100644
--- a/include/dt-bindings/clock/mediatek,mt6795-clk.h
+++ b/include/dt-bindings/clock/mediatek,mt6795-clk.h
@@ -135,7 +135,6 @@
#define CLK_TOP_APLL2_DIV3 124
#define CLK_TOP_APLL2_DIV4 125
#define CLK_TOP_APLL2_DIV5 126
-#define CLK_TOP_NR_CLK 127
/* APMIXED_SYS */
#define CLK_APMIXED_ARMCA53PLL 0
@@ -169,7 +168,6 @@
#define CLK_INFRA_KP 13
#define CLK_INFRA_CA53_C0_SEL 14
#define CLK_INFRA_CA53_C1_SEL 15
-#define CLK_INFRA_NR_CLK 16
/* PERI_SYS */
#define CLK_PERI_NFI 0
@@ -206,14 +204,12 @@
#define CLK_PERI_UART1_SEL 31
#define CLK_PERI_UART2_SEL 32
#define CLK_PERI_UART3_SEL 33
-#define CLK_PERI_NR_CLK 34
/* MFG */
#define CLK_MFG_BAXI 0
#define CLK_MFG_BMEM 1
#define CLK_MFG_BG3D 2
#define CLK_MFG_B26M 3
-#define CLK_MFG_NR_CLK 4
/* MM_SYS */
#define CLK_MM_SMI_COMMON 0
@@ -258,18 +254,15 @@
#define CLK_MM_DSI1_DIGITAL 39
#define CLK_MM_DPI_PIXEL 40
#define CLK_MM_DPI_ENGINE 41
-#define CLK_MM_NR_CLK 42
/* VDEC_SYS */
#define CLK_VDEC_CKEN 0
#define CLK_VDEC_LARB_CKEN 1
-#define CLK_VDEC_NR_CLK 2
/* VENC_SYS */
#define CLK_VENC_LARB 0
#define CLK_VENC_VENC 1
#define CLK_VENC_JPGENC 2
#define CLK_VENC_JPGDEC 3
-#define CLK_VENC_NR_CLK 4
#endif /* _DT_BINDINGS_CLK_MT6795_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 20/33] dt-bindings: clock: mt6797: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (18 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 19/33] dt-bindings: clock: mt6795: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 21/33] dt-bindings: clock: mt7622: " Akari Tsuyukusa
` (12 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR
- CLK_APMIXED_NR
- CLK_INFRA_NR
- CLK_IMG_NR
- CLK_MM_NR
- CLK_VDEC_NR
- CLK_VENC_NR
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt6797-clk.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/dt-bindings/clock/mt6797-clk.h b/include/dt-bindings/clock/mt6797-clk.h
index dc23ddb754b1..195456c132c0 100644
--- a/include/dt-bindings/clock/mt6797-clk.h
+++ b/include/dt-bindings/clock/mt6797-clk.h
@@ -102,7 +102,6 @@
#define CLK_TOP_MSDCPLL_D2 92
#define CLK_TOP_MSDCPLL_D4 93
#define CLK_TOP_MSDCPLL_D8 94
-#define CLK_TOP_NR 95
/* APMIXED_SYS */
#define CLK_APMIXED_MAINPLL 1
@@ -115,7 +114,6 @@
#define CLK_APMIXED_VDECPLL 8
#define CLK_APMIXED_APLL1 9
#define CLK_APMIXED_APLL2 10
-#define CLK_APMIXED_NR 11
/* INFRA_SYS */
#define CLK_INFRA_PMIC_TMR 1
@@ -202,14 +200,12 @@
#define CLK_INFRA_DRAMC_B_CONF 82
#define CLK_INFRA_MFG_VCG 83
#define CLK_INFRA_13M 84
-#define CLK_INFRA_NR 85
/* IMG_SYS */
#define CLK_IMG_FDVT 1
#define CLK_IMG_DPE 2
#define CLK_IMG_DIP 3
#define CLK_IMG_LARB6 4
-#define CLK_IMG_NR 5
/* MM_SYS */
#define CLK_MM_SMI_COMMON 1
@@ -254,20 +250,17 @@
#define CLK_MM_FAKE_ENG2 40
#define CLK_MM_DSI0_INTERFACE_CLOCK 41
#define CLK_MM_DSI1_INTERFACE_CLOCK 42
-#define CLK_MM_NR 43
/* VDEC_SYS */
#define CLK_VDEC_CKEN_ENG 1
#define CLK_VDEC_ACTIVE 2
#define CLK_VDEC_CKEN 3
#define CLK_VDEC_LARB1_CKEN 4
-#define CLK_VDEC_NR 5
/* VENC_SYS */
#define CLK_VENC_0 1
#define CLK_VENC_1 2
#define CLK_VENC_2 3
#define CLK_VENC_3 4
-#define CLK_VENC_NR 5
#endif /* _DT_BINDINGS_CLK_MT6797_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 21/33] dt-bindings: clock: mt7622: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (19 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 20/33] dt-bindings: clock: mt6797: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 22/33] dt-bindings: clock: mt7629: " Akari Tsuyukusa
` (11 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_APMIXED_NR_CLK
- CLK_SSUSB_NR_CLK
- CLK_PCIE_NR_CLK
- CLK_ETH_NR_CLK
- CLK_SGMII_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt7622-clk.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
index a173eb132892..4756cb752a09 100644
--- a/include/dt-bindings/clock/mt7622-clk.h
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -118,7 +118,6 @@
#define CLK_TOP_I2S3_MCK_DIV_PD 106
#define CLK_TOP_A1SYS_HP_DIV_PD 107
#define CLK_TOP_A2SYS_HP_DIV_PD 108
-#define CLK_TOP_NR_CLK 109
/* INFRACFG */
@@ -129,7 +128,6 @@
#define CLK_INFRA_APXGPT_PD 4
#define CLK_INFRA_PMIC_PD 5
#define CLK_INFRA_TRNG 6
-#define CLK_INFRA_NR_CLK 7
/* PERICFG */
@@ -163,7 +161,6 @@
#define CLK_PERI_NFIECC_PD 27
#define CLK_PERI_FLASH_PD 28
#define CLK_PERI_IRTX_PD 29
-#define CLK_PERI_NR_CLK 30
/* APMIXEDSYS */
@@ -177,7 +174,6 @@
#define CLK_APMIXED_TRGPLL 7
#define CLK_APMIXED_SGMIPLL 8
#define CLK_APMIXED_MAIN_CORE_EN 9
-#define CLK_APMIXED_NR_CLK 10
/* AUDIOSYS */
@@ -238,7 +234,6 @@
#define CLK_SSUSB_SYS_EN 3
#define CLK_SSUSB_MCU_EN 4
#define CLK_SSUSB_DMA_EN 5
-#define CLK_SSUSB_NR_CLK 6
/* PCIESYS */
@@ -259,7 +254,6 @@
#define CLK_SATA_ASIC_EN 14
#define CLK_SATA_RBC_EN 15
#define CLK_SATA_PM_EN 16
-#define CLK_PCIE_NR_CLK 17
/* ETHSYS */
@@ -268,7 +262,6 @@
#define CLK_ETH_GP2_EN 2
#define CLK_ETH_GP1_EN 3
#define CLK_ETH_GP0_EN 4
-#define CLK_ETH_NR_CLK 5
/* SGMIISYS */
@@ -276,7 +269,6 @@
#define CLK_SGMII_RX250M_EN 1
#define CLK_SGMII_CDR_REF 2
#define CLK_SGMII_CDR_FB 3
-#define CLK_SGMII_NR_CLK 4
#endif /* _DT_BINDINGS_CLK_MT7622_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 22/33] dt-bindings: clock: mt7629: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (20 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 21/33] dt-bindings: clock: mt7622: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 23/33] dt-bindings: clock: mt7988: " Akari Tsuyukusa
` (10 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_SSUSB_NR_CLK
- CLK_PCIE_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt7629-clk.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/dt-bindings/clock/mt7629-clk.h b/include/dt-bindings/clock/mt7629-clk.h
index ad8e6d7f0154..6c7acebda6e1 100644
--- a/include/dt-bindings/clock/mt7629-clk.h
+++ b/include/dt-bindings/clock/mt7629-clk.h
@@ -168,7 +168,6 @@
#define CLK_SSUSB_SYS_EN 3
#define CLK_SSUSB_MCU_EN 4
#define CLK_SSUSB_DMA_EN 5
-#define CLK_SSUSB_NR_CLK 6
/* PCIESYS */
#define CLK_PCIE_P1_AUX_EN 0
@@ -183,7 +182,6 @@
#define CLK_PCIE_P0_AXI_EN 9
#define CLK_PCIE_P0_MAC_EN 10
#define CLK_PCIE_P0_PIPE_EN 11
-#define CLK_PCIE_NR_CLK 12
/* ETHSYS */
#define CLK_ETH_FE_EN 0
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 23/33] dt-bindings: clock: mt7988: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (21 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 22/33] dt-bindings: clock: mt7629: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 24/33] dt-bindings: clock: mt8135: " Akari Tsuyukusa
` (9 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_ETHDMA_NR_CLK
- CLK_SGMII0_NR_CLK
- CLK_SGMII1_NR_CLK
- CLK_ETHWARP_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mediatek,mt7988-clk.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/dt-bindings/clock/mediatek,mt7988-clk.h b/include/dt-bindings/clock/mediatek,mt7988-clk.h
index 63376e40f14d..5016070a39ba 100644
--- a/include/dt-bindings/clock/mediatek,mt7988-clk.h
+++ b/include/dt-bindings/clock/mediatek,mt7988-clk.h
@@ -252,26 +252,22 @@
#define CLK_ETHDMA_GP3_EN 6
#define CLK_ETHDMA_ESW_EN 7
#define CLK_ETHDMA_CRYPT0_EN 8
-#define CLK_ETHDMA_NR_CLK 9
/* SGMIISYS_0 */
#define CLK_SGM0_TX_EN 0
#define CLK_SGM0_RX_EN 1
-#define CLK_SGMII0_NR_CLK 2
/* SGMIISYS_1 */
#define CLK_SGM1_TX_EN 0
#define CLK_SGM1_RX_EN 1
-#define CLK_SGMII1_NR_CLK 2
/* ETHWARP */
#define CLK_ETHWARP_WOCPU2_EN 0
#define CLK_ETHWARP_WOCPU1_EN 1
#define CLK_ETHWARP_WOCPU0_EN 2
-#define CLK_ETHWARP_NR_CLK 3
/* XFIPLL */
#define CLK_XFIPLL_PLL 0
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 24/33] dt-bindings: clock: mt8135: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (22 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 23/33] dt-bindings: clock: mt7988: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 25/33] dt-bindings: clock: mt8167: " Akari Tsuyukusa
` (8 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_APMIXED_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8135-clk.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/dt-bindings/clock/mt8135-clk.h b/include/dt-bindings/clock/mt8135-clk.h
index dad8365a4da3..0693bd0a56d0 100644
--- a/include/dt-bindings/clock/mt8135-clk.h
+++ b/include/dt-bindings/clock/mt8135-clk.h
@@ -101,7 +101,6 @@
#define CLK_TOP_CCI_SEL 90
#define CLK_TOP_APLL_SEL 91
#define CLK_TOP_HDMIPLL_SEL 92
-#define CLK_TOP_NR_CLK 93
/* APMIXED_SYS */
@@ -115,7 +114,6 @@
#define CLK_APMIXED_LVDSPLL 8
#define CLK_APMIXED_AUDPLL 9
#define CLK_APMIXED_VDECPLL 10
-#define CLK_APMIXED_NR_CLK 11
/* INFRA_SYS */
@@ -132,7 +130,6 @@
#define CLK_INFRA_MFG_BUS 11
#define CLK_INFRA_SMI 12
#define CLK_INFRA_DBGCLK 13
-#define CLK_INFRA_NR_CLK 14
/* PERI_SYS */
@@ -181,6 +178,5 @@
#define CLK_PERI_UART1_SEL 43
#define CLK_PERI_UART2_SEL 44
#define CLK_PERI_UART3_SEL 45
-#define CLK_PERI_NR_CLK 46
#endif /* _DT_BINDINGS_CLK_MT8135_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 25/33] dt-bindings: clock: mt8167: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (23 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 24/33] dt-bindings: clock: mt8135: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 26/33] dt-bindings: clock: mt8173: " Akari Tsuyukusa
` (7 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- MT8167_CLK_APMIXED_NR_CLK
- MT8167_CLK_TOP_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_IMG_NR_CLK
- CLK_VDEC_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8167-clk.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/dt-bindings/clock/mt8167-clk.h b/include/dt-bindings/clock/mt8167-clk.h
index a96158edd817..527186fc592b 100644
--- a/include/dt-bindings/clock/mt8167-clk.h
+++ b/include/dt-bindings/clock/mt8167-clk.h
@@ -17,7 +17,6 @@
#define CLK_APMIXED_TVDPLL (CLK_APMIXED_NR_CLK + 0)
#define CLK_APMIXED_LVDSPLL (CLK_APMIXED_NR_CLK + 1)
#define CLK_APMIXED_HDMI_REF (CLK_APMIXED_NR_CLK + 2)
-#define MT8167_CLK_APMIXED_NR_CLK (CLK_APMIXED_NR_CLK + 3)
/* TOPCKGEN */
@@ -64,7 +63,6 @@
#define CLK_TOP_DPI1_MM_SEL (CLK_TOP_NR_CLK + 40)
#define CLK_TOP_AXI_MFG_IN_SEL (CLK_TOP_NR_CLK + 41)
#define CLK_TOP_SLOW_MFG_SEL (CLK_TOP_NR_CLK + 42)
-#define MT8167_CLK_TOP_NR_CLK (CLK_TOP_NR_CLK + 43)
/* MFGCFG */
@@ -72,7 +70,6 @@
#define CLK_MFG_BMEM 1
#define CLK_MFG_BG3D 2
#define CLK_MFG_B26M 3
-#define CLK_MFG_NR_CLK 4
/* MMSYS */
@@ -110,7 +107,6 @@
#define CLK_MM_HDMI_SPDIF 31
#define CLK_MM_HDMI_ADSP_BCK 32
#define CLK_MM_HDMI_PLL 33
-#define CLK_MM_NR_CLK 34
/* IMGSYS */
@@ -120,12 +116,10 @@
#define CLK_IMG_SEN_TG 3
#define CLK_IMG_SEN_CAM 4
#define CLK_IMG_VENC 5
-#define CLK_IMG_NR_CLK 6
/* VDECSYS */
#define CLK_VDEC_CKEN 0
#define CLK_VDEC_LARB1_CKEN 1
-#define CLK_VDEC_NR_CLK 2
#endif /* _DT_BINDINGS_CLK_MT8167_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 26/33] dt-bindings: clock: mt8173: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (24 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 25/33] dt-bindings: clock: mt8167: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 27/33] dt-bindings: clock: mt8183: " Akari Tsuyukusa
` (6 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_IMG_NR_CLK
- CLK_MM_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_VENCLT_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8173-clk.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/dt-bindings/clock/mt8173-clk.h b/include/dt-bindings/clock/mt8173-clk.h
index 89e982f771db..4fd3181122dc 100644
--- a/include/dt-bindings/clock/mt8173-clk.h
+++ b/include/dt-bindings/clock/mt8173-clk.h
@@ -149,7 +149,6 @@
#define CLK_TOP_DSI1_DIG 139
#define CLK_TOP_LVDS_PXL 140
#define CLK_TOP_LVDS_CTS 141
-#define CLK_TOP_NR_CLK 142
/* APMIXED_SYS */
@@ -187,7 +186,6 @@
#define CLK_INFRA_CLK_13M 12
#define CLK_INFRA_CA53SEL 13
#define CLK_INFRA_CA72SEL 14
-#define CLK_INFRA_NR_CLK 15
/* PERI_SYS */
@@ -230,7 +228,6 @@
#define CLK_PERI_UART1_SEL 37
#define CLK_PERI_UART2_SEL 38
#define CLK_PERI_UART3_SEL 39
-#define CLK_PERI_NR_CLK 40
/* IMG_SYS */
@@ -241,7 +238,6 @@
#define CLK_IMG_SEN_CAM 5
#define CLK_IMG_CAM_SV 6
#define CLK_IMG_FD 7
-#define CLK_IMG_NR_CLK 8
/* MFG_SYS */
@@ -304,13 +300,11 @@
#define CLK_MM_SMI_LARB4 50
#define CLK_MM_HDMI_HDCP 51
#define CLK_MM_HDMI_HDCP24M 52
-#define CLK_MM_NR_CLK 53
/* VDEC_SYS */
#define CLK_VDEC_CKEN 1
#define CLK_VDEC_LARB_CKEN 2
-#define CLK_VDEC_NR_CLK 3
/* VENC_SYS */
@@ -318,12 +312,10 @@
#define CLK_VENC_CKE1 2
#define CLK_VENC_CKE2 3
#define CLK_VENC_CKE3 4
-#define CLK_VENC_NR_CLK 5
/* VENCLT_SYS */
#define CLK_VENCLT_CKE0 1
#define CLK_VENCLT_CKE1 2
-#define CLK_VENCLT_NR_CLK 3
#endif /* _DT_BINDINGS_CLK_MT8173_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 27/33] dt-bindings: clock: mt8183: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (25 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 26/33] dt-bindings: clock: mt8173: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 28/33] dt-bindings: clock: mt8186: " Akari Tsuyukusa
` (5 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_APMIXED_NR_CLK
- CLK_TOP_NR_CLK
- CLK_CAM_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_MFG_NR_CLK
- CLK_IMG_NR_CLK
- CLK_MM_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_AUDIO_NR_CLK
- CLK_IPU_CONN_NR_CLK
- CLK_IPU_ADL_NR_CLK
- CLK_IPU_CORE0_NR_CLK
- CLK_IPU_CORE1_NR_CLK
- CLK_MCU_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8183-clk.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/dt-bindings/clock/mt8183-clk.h b/include/dt-bindings/clock/mt8183-clk.h
index a7b470b0ec8a..e5813611bc12 100644
--- a/include/dt-bindings/clock/mt8183-clk.h
+++ b/include/dt-bindings/clock/mt8183-clk.h
@@ -30,7 +30,6 @@
#define CLK_APMIXED_CLKSQ_LVPLL_26M 19
#define CLK_APMIXED_MIPID0_26M 20
#define CLK_APMIXED_MIPID1_26M 21
-#define CLK_APMIXED_NR_CLK 22
/* TOPCKGEN */
#define CLK_TOP_MUX_AXI 0
@@ -165,7 +164,6 @@
#define CLK_TOP_ARMPLL_DIV_PLL1 129
#define CLK_TOP_ARMPLL_DIV_PLL2 130
#define CLK_TOP_UNIVPLL_D3_D16 131
-#define CLK_TOP_NR_CLK 132
/* CAMSYS */
#define CLK_CAM_LARB6 0
@@ -178,7 +176,6 @@
#define CLK_CAM_CAMSV2 7
#define CLK_CAM_CCU 8
#define CLK_CAM_LARB3 9
-#define CLK_CAM_NR_CLK 10
/* INFRACFG_AO */
#define CLK_INFRA_PMIC_TMR 0
@@ -282,15 +279,12 @@
#define CLK_INFRA_I2C7 98
#define CLK_INFRA_I2C8 99
#define CLK_INFRA_FBIST2FPC 100
-#define CLK_INFRA_NR_CLK 101
/* PERICFG */
#define CLK_PERI_AXI 0
-#define CLK_PERI_NR_CLK 1
/* MFGCFG */
#define CLK_MFG_BG3D 0
-#define CLK_MFG_NR_CLK 1
/* IMG */
#define CLK_IMG_OWE 0
@@ -303,7 +297,6 @@
#define CLK_IMG_DIP 7
#define CLK_IMG_LARB2 8
#define CLK_IMG_LARB5 9
-#define CLK_IMG_NR_CLK 10
/* MMSYS_CONFIG */
#define CLK_MM_SMI_COMMON 0
@@ -352,18 +345,15 @@
#define CLK_MM_MDP_CCORR 43
#define CLK_MM_DBI_MM 44
#define CLK_MM_DBI_IF 45
-#define CLK_MM_NR_CLK 46
/* VDEC_GCON */
#define CLK_VDEC_VDEC 0
#define CLK_VDEC_LARB1 1
-#define CLK_VDEC_NR_CLK 2
/* VENC_GCON */
#define CLK_VENC_LARB 0
#define CLK_VENC_VENC 1
#define CLK_VENC_JPGENC 2
-#define CLK_VENC_NR_CLK 3
/* AUDIO */
#define CLK_AUDIO_TML 0
@@ -381,7 +371,6 @@
#define CLK_AUDIO_I2S1 12
#define CLK_AUDIO_PDN_ADDA6_ADC 13
#define CLK_AUDIO_TDM 14
-#define CLK_AUDIO_NR_CLK 15
/* IPU_CONN */
#define CLK_IPU_CONN_IPU 0
@@ -399,28 +388,23 @@
#define CLK_IPU_CONN_CAB3TO3 12
#define CLK_IPU_CONN_CAB2TO1 13
#define CLK_IPU_CONN_CAB3TO1_SLICE 14
-#define CLK_IPU_CONN_NR_CLK 15
/* IPU_ADL */
#define CLK_IPU_ADL_CABGEN 0
-#define CLK_IPU_ADL_NR_CLK 1
/* IPU_CORE0 */
#define CLK_IPU_CORE0_JTAG 0
#define CLK_IPU_CORE0_AXI 1
#define CLK_IPU_CORE0_IPU 2
-#define CLK_IPU_CORE0_NR_CLK 3
/* IPU_CORE1 */
#define CLK_IPU_CORE1_JTAG 0
#define CLK_IPU_CORE1_AXI 1
#define CLK_IPU_CORE1_IPU 2
-#define CLK_IPU_CORE1_NR_CLK 3
/* MCUCFG */
#define CLK_MCU_MP0_SEL 0
#define CLK_MCU_MP2_SEL 1
#define CLK_MCU_BUS_SEL 2
-#define CLK_MCU_NR_CLK 3
#endif /* _DT_BINDINGS_CLK_MT8183_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 28/33] dt-bindings: clock: mt8186: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (26 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 27/33] dt-bindings: clock: mt8183: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 29/33] dt-bindings: clock: mt8188: " Akari Tsuyukusa
` (4 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_MCU_NR_CLK
- CLK_TOP_NR_CLK
- CLK_INFRA_AO_NR_CLK
- CLK_IMP_IIC_WRAP_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_WPE_NR_CLK
- CLK_IMG1_NR_CLK
- CLK_IMG2_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_CAM_NR_CLK
- CLK_CAM_RAWA_NR_CLK
- CLK_CAM_RAWB_NR_CLK
- CLK_MDP_NR_CLK
- CLK_IPE_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8186-clk.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/dt-bindings/clock/mt8186-clk.h b/include/dt-bindings/clock/mt8186-clk.h
index a70bf67af47d..b2f650653d0c 100644
--- a/include/dt-bindings/clock/mt8186-clk.h
+++ b/include/dt-bindings/clock/mt8186-clk.h
@@ -12,7 +12,6 @@
#define CLK_MCU_ARMPLL_LL_SEL 0
#define CLK_MCU_ARMPLL_BL_SEL 1
#define CLK_MCU_ARMPLL_BUS_SEL 2
-#define CLK_MCU_NR_CLK 3
/* TOPCKGEN */
@@ -152,7 +151,6 @@
#define CLK_TOP_APLL12_CK_DIV2 133
#define CLK_TOP_APLL12_CK_DIV4 134
#define CLK_TOP_APLL12_CK_DIV_TDMOUT_M 135
-#define CLK_TOP_NR_CLK 136
/* INFRACFG_AO */
@@ -257,7 +255,6 @@
#define CLK_INFRA_AO_FADSP 98
#define CLK_INFRA_AO_FLASHIF_133M 99
#define CLK_INFRA_AO_FLASHIF_66M 100
-#define CLK_INFRA_AO_NR_CLK 101
/* APMIXEDSYS */
@@ -289,12 +286,10 @@
#define CLK_IMP_IIC_WRAP_AP_CLOCK_I2C7 7
#define CLK_IMP_IIC_WRAP_AP_CLOCK_I2C8 8
#define CLK_IMP_IIC_WRAP_AP_CLOCK_I2C9 9
-#define CLK_IMP_IIC_WRAP_NR_CLK 10
/* MFGCFG */
#define CLK_MFG_BG3D 0
-#define CLK_MFG_NR_CLK 1
/* MMSYS */
@@ -323,7 +318,6 @@
#define CLK_MM_DISP_DPI 22
#define CLK_MM_DSI0_DSI_CK_DOMAIN 23
#define CLK_MM_DISP_26M 24
-#define CLK_MM_NR_CLK 25
/* WPESYS */
@@ -331,7 +325,6 @@
#define CLK_WPE_SMI_LARB8_CK_EN 1
#define CLK_WPE_SYS_EVENT_TX_CK_EN 2
#define CLK_WPE_SMI_LARB8_PCLK_EN 3
-#define CLK_WPE_NR_CLK 4
/* IMGSYS1 */
@@ -339,7 +332,6 @@
#define CLK_IMG1_LARB10_IMG1 1
#define CLK_IMG1_DIP 2
#define CLK_IMG1_GALS_IMG1 3
-#define CLK_IMG1_NR_CLK 4
/* IMGSYS2 */
@@ -349,7 +341,6 @@
#define CLK_IMG2_WPE 3
#define CLK_IMG2_MSS 4
#define CLK_IMG2_GALS_IMG2 5
-#define CLK_IMG2_NR_CLK 6
/* VDECSYS */
@@ -361,7 +352,6 @@
#define CLK_VDEC_CKEN 5
#define CLK_VDEC_ACTIVE 6
#define CLK_VDEC_CKEN_ENG 7
-#define CLK_VDEC_NR_CLK 8
/* VENCSYS */
@@ -369,7 +359,6 @@
#define CLK_VENC_CKE1_VENC 1
#define CLK_VENC_CKE2_JPGENC 2
#define CLK_VENC_CKE5_GALS 3
-#define CLK_VENC_NR_CLK 4
/* CAMSYS */
@@ -388,21 +377,18 @@
#define CLK_CAM_FAKE_ENG 12
#define CLK_CAM_CCU_GALS 13
#define CLK_CAM2MM_GALS 14
-#define CLK_CAM_NR_CLK 15
/* CAMSYS_RAWA */
#define CLK_CAM_RAWA_LARBX_RAWA 0
#define CLK_CAM_RAWA 1
#define CLK_CAM_RAWA_CAMTG_RAWA 2
-#define CLK_CAM_RAWA_NR_CLK 3
/* CAMSYS_RAWB */
#define CLK_CAM_RAWB_LARBX_RAWB 0
#define CLK_CAM_RAWB 1
#define CLK_CAM_RAWB_CAMTG_RAWB 2
-#define CLK_CAM_RAWB_NR_CLK 3
/* MDPSYS */
@@ -428,7 +414,6 @@
#define CLK_MDP_IMG_DL_RELAY0_ASYNC0 19
#define CLK_MDP_IMG_DL_RELAY1_ASYNC1 20
#define CLK_MDP_IMG_DL_RELAY2_ASYNC2 21
-#define CLK_MDP_NR_CLK 22
/* IPESYS */
@@ -440,6 +425,5 @@
#define CLK_IPE_RSC 5
#define CLK_IPE_DPE 6
#define CLK_IPE_GALS_IPE 7
-#define CLK_IPE_NR_CLK 8
#endif /* _DT_BINDINGS_CLK_MT8186_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 29/33] dt-bindings: clock: mt8188: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (27 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 28/33] dt-bindings: clock: mt8186: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 30/33] dt-bindings: clock: mt8192: " Akari Tsuyukusa
` (3 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_INFRA_AO_NR_CLK
- CLK_APMIXED_NR_CLK
- CLK_AUDIODSP_NR_CLK
- CLK_PERI_AO_NR_CLK
- CLK_IMP_IIC_WRAP_C_NR_CLK
- CLK_IMP_IIC_WRAP_W_NR_CLK
- CLK_IMP_IIC_WRAP_EN_NR_CLK
- CLK_MFGCFG_NR_CLK
- CLK_VPP0_NR_CLK
- CLK_WPE_TOP_NR_CLK
- CLK_WPE_VPP0_NR_CLK
- CLK_VPP1_NR_CLK
- CLK_IMGSYS_MAIN_NR_CLK
- CLK_IMGSYS1_DIP_TOP_NR_CLK
- CLK_IMGSYS1_DIP_NR_NR_CLK
- CLK_IMGSYS_WPE1_NR_CLK
- CLK_IPE_NR_CLK
- CLK_IMGSYS_WPE2_NR_CLK
- CLK_IMGSYS_WPE3_NR_CLK
- CLK_CAM_MAIN_NR_CLK
- CLK_CAM_RAWA_NR_CLK
- CLK_CAM_YUVA_NR_CLK
- CLK_CAM_RAWB_NR_CLK
- CLK_CAM_YUVB_NR_CLK
- CLK_CCU_NR_CLK
- CLK_VDEC1_NR_CLK
- CLK_VDEC2_NR_CLK
- CLK_VENC1_NR_CLK
- CLK_VDO0_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
.../dt-bindings/clock/mediatek,mt8188-clk.h | 29 -------------------
1 file changed, 29 deletions(-)
diff --git a/include/dt-bindings/clock/mediatek,mt8188-clk.h b/include/dt-bindings/clock/mediatek,mt8188-clk.h
index 0e87f61c90f4..0ea5f9ec51d2 100644
--- a/include/dt-bindings/clock/mediatek,mt8188-clk.h
+++ b/include/dt-bindings/clock/mediatek,mt8188-clk.h
@@ -294,7 +294,6 @@
#define CLK_INFRA_AO_66M_MCLK_CK 75
#define CLK_INFRA_AO_PCIE_PL_P_250M_P0 76
#define CLK_INFRA_AO_RG_AES_MSDCFDE_CK_0P 77
-#define CLK_INFRA_AO_NR_CLK 78
/* APMIXEDSYS */
#define CLK_APMIXED_ETHPLL 0
@@ -313,11 +312,9 @@
#define CLK_APMIXED_APLL5 13
#define CLK_APMIXED_MFGPLL 14
#define CLK_APMIXED_PLL_SSUSB26M_EN 15
-#define CLK_APMIXED_NR_CLK 16
/* AUDIODSP */
#define CLK_AUDIODSP_AUDIO26M 0
-#define CLK_AUDIODSP_NR_CLK 1
/* PERICFG_AO */
#define CLK_PERI_AO_ETHERNET 0
@@ -333,27 +330,22 @@
#define CLK_PERI_AO_SSUSB_XHCI 10
#define CLK_PERI_AO_ETHERNET_MAC 11
#define CLK_PERI_AO_PCIE_P0_FMEM 12
-#define CLK_PERI_AO_NR_CLK 13
/* IMP_IIC_WRAP_C */
#define CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C0 0
#define CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C2 1
#define CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C3 2
-#define CLK_IMP_IIC_WRAP_C_NR_CLK 3
/* IMP_IIC_WRAP_W */
#define CLK_IMP_IIC_WRAP_W_AP_CLOCK_I2C1 0
#define CLK_IMP_IIC_WRAP_W_AP_CLOCK_I2C4 1
-#define CLK_IMP_IIC_WRAP_W_NR_CLK 2
/* IMP_IIC_WRAP_EN */
#define CLK_IMP_IIC_WRAP_EN_AP_CLOCK_I2C5 0
#define CLK_IMP_IIC_WRAP_EN_AP_CLOCK_I2C6 1
-#define CLK_IMP_IIC_WRAP_EN_NR_CLK 2
/* MFGCFG */
#define CLK_MFGCFG_BG3D 0
-#define CLK_MFGCFG_NR_CLK 1
/* VPPSYS0 */
#define CLK_VPP0_MDP_FG 0
@@ -401,14 +393,12 @@
#define CLK_VPP0_WARP0_ASYNC 42
#define CLK_VPP0_WARP1_RELAY 43
#define CLK_VPP0_WARP1_ASYNC 44
-#define CLK_VPP0_NR_CLK 45
/* WPESYS */
#define CLK_WPE_TOP_WPE_VPP0 0
#define CLK_WPE_TOP_SMI_LARB7 1
#define CLK_WPE_TOP_WPESYS_EVENT_TX 2
#define CLK_WPE_TOP_SMI_LARB7_PCLK_EN 3
-#define CLK_WPE_TOP_NR_CLK 4
/* WPESYS_VPP0 */
#define CLK_WPE_VPP0_VECI 0
@@ -434,7 +424,6 @@
#define CLK_WPE_VPP0_MDP_CROP 20
#define CLK_WPE_VPP0_ISP_CROP 21
#define CLK_WPE_VPP0_TOP 22
-#define CLK_WPE_VPP0_NR_CLK 23
/* VPPSYS1 */
#define CLK_VPP1_SVPP1_MDP_OVL 0
@@ -489,7 +478,6 @@
#define CLK_VPP1_VPP_SPLIT_DGI 49
#define CLK_VPP1_DL_CON_OCC 50
#define CLK_VPP1_VPP_SPLIT_26M 51
-#define CLK_VPP1_NR_CLK 52
/* IMGSYS */
#define CLK_IMGSYS_MAIN_LARB9 0
@@ -502,22 +490,18 @@
#define CLK_IMGSYS_MAIN_WPE1 7
#define CLK_IMGSYS_MAIN_WPE2 8
#define CLK_IMGSYS_MAIN_GALS 9
-#define CLK_IMGSYS_MAIN_NR_CLK 10
/* IMGSYS1_DIP_TOP */
#define CLK_IMGSYS1_DIP_TOP_LARB10 0
#define CLK_IMGSYS1_DIP_TOP_DIP_TOP 1
-#define CLK_IMGSYS1_DIP_TOP_NR_CLK 2
/* IMGSYS1_DIP_NR */
#define CLK_IMGSYS1_DIP_NR_LARB15 0
#define CLK_IMGSYS1_DIP_NR_DIP_NR 1
-#define CLK_IMGSYS1_DIP_NR_NR_CLK 2
/* IMGSYS_WPE1 */
#define CLK_IMGSYS_WPE1_LARB11 0
#define CLK_IMGSYS_WPE1 1
-#define CLK_IMGSYS_WPE1_NR_CLK 2
/* IPESYS */
#define CLK_IPE_DPE 0
@@ -525,17 +509,14 @@
#define CLK_IPE_ME 2
#define CLK_IPESYS_TOP 3
#define CLK_IPE_SMI_LARB12 4
-#define CLK_IPE_NR_CLK 5
/* IMGSYS_WPE2 */
#define CLK_IMGSYS_WPE2_LARB11 0
#define CLK_IMGSYS_WPE2 1
-#define CLK_IMGSYS_WPE2_NR_CLK 2
/* IMGSYS_WPE3 */
#define CLK_IMGSYS_WPE3_LARB11 0
#define CLK_IMGSYS_WPE3 1
-#define CLK_IMGSYS_WPE3_NR_CLK 2
/* CAMSYS */
#define CLK_CAM_MAIN_LARB13 0
@@ -563,37 +544,31 @@
#define CLK_CAM_MAIN_CAM2MM0_GALS 22
#define CLK_CAM_MAIN_CAM2MM1_GALS 23
#define CLK_CAM_MAIN_CAM2SYS_GALS 24
-#define CLK_CAM_MAIN_NR_CLK 25
/* CAMSYS_RAWA */
#define CLK_CAM_RAWA_LARBX 0
#define CLK_CAM_RAWA_CAM 1
#define CLK_CAM_RAWA_CAMTG 2
-#define CLK_CAM_RAWA_NR_CLK 3
/* CAMSYS_YUVA */
#define CLK_CAM_YUVA_LARBX 0
#define CLK_CAM_YUVA_CAM 1
#define CLK_CAM_YUVA_CAMTG 2
-#define CLK_CAM_YUVA_NR_CLK 3
/* CAMSYS_RAWB */
#define CLK_CAM_RAWB_LARBX 0
#define CLK_CAM_RAWB_CAM 1
#define CLK_CAM_RAWB_CAMTG 2
-#define CLK_CAM_RAWB_NR_CLK 3
/* CAMSYS_YUVB */
#define CLK_CAM_YUVB_LARBX 0
#define CLK_CAM_YUVB_CAM 1
#define CLK_CAM_YUVB_CAMTG 2
-#define CLK_CAM_YUVB_NR_CLK 3
/* CCUSYS */
#define CLK_CCU_LARB27 0
#define CLK_CCU_AHB 1
#define CLK_CCU_CCU0 2
-#define CLK_CCU_NR_CLK 3
/* VDECSYS_SOC */
#define CLK_VDEC1_SOC_LARB1 0
@@ -603,7 +578,6 @@
#define CLK_VDEC1_SOC_VDEC 4
#define CLK_VDEC1_SOC_VDEC_ACTIVE 5
#define CLK_VDEC1_SOC_VDEC_ENG 6
-#define CLK_VDEC1_NR_CLK 7
/* VDECSYS */
#define CLK_VDEC2_LARB1 0
@@ -611,7 +585,6 @@
#define CLK_VDEC2_VDEC 2
#define CLK_VDEC2_VDEC_ACTIVE 3
#define CLK_VDEC2_VDEC_ENG 4
-#define CLK_VDEC2_NR_CLK 5
/* VENCSYS */
#define CLK_VENC1_LARB 0
@@ -621,7 +594,6 @@
#define CLK_VENC1_JPGDEC_C1 4
#define CLK_VENC1_GALS 5
#define CLK_VENC1_GALS_SRAM 6
-#define CLK_VENC1_NR_CLK 7
/* VDOSYS0 */
#define CLK_VDO0_DISP_OVL0 0
@@ -657,7 +629,6 @@
#define CLK_VDO0_DSI0_DSI 30
#define CLK_VDO0_DSI1_DSI 31
#define CLK_VDO0_DP_INTF0_DP_INTF 32
-#define CLK_VDO0_NR_CLK 33
/* VDOSYS1 */
#define CLK_VDO1_SMI_LARB2 0
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 30/33] dt-bindings: clock: mt8192: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (28 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 29/33] dt-bindings: clock: mt8188: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 31/33] dt-bindings: clock: mt8195: " Akari Tsuyukusa
` (2 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_INFRA_NR_CLK
- CLK_PERI_NR_CLK
- CLK_SCP_ADSP_NR_CLK
- CLK_IMP_IIC_WRAP_C_NR_CLK
- CLK_AUD_NR_CLK
- CLK_IMP_IIC_WRAP_E_NR_CLK
- CLK_IMP_IIC_WRAP_S_NR_CLK
- CLK_IMP_IIC_WRAP_WS_NR_CLK
- CLK_IMP_IIC_WRAP_W_NR_CLK
- CLK_IMP_IIC_WRAP_N_NR_CLK
- CLK_MSDC_TOP_NR_CLK
- CLK_MSDC_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_IMG_NR_CLK
- CLK_IMG2_NR_CLK
- CLK_VDEC_SOC_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_CAM_NR_CLK
- CLK_CAM_RAWA_NR_CLK
- CLK_CAM_RAWB_NR_CLK
- CLK_CAM_RAWC_NR_CLK
- CLK_IPE_NR_CLK
- CLK_MDP_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8192-clk.h | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/include/dt-bindings/clock/mt8192-clk.h b/include/dt-bindings/clock/mt8192-clk.h
index 5ab68f15a256..e9d4711f37c7 100644
--- a/include/dt-bindings/clock/mt8192-clk.h
+++ b/include/dt-bindings/clock/mt8192-clk.h
@@ -164,7 +164,6 @@
#define CLK_TOP_APLL12_DIV9 152
#define CLK_TOP_SSUSB_TOP_REF 153
#define CLK_TOP_SSUSB_PHY_REF 154
-#define CLK_TOP_NR_CLK 155
/* INFRACFG */
@@ -289,12 +288,10 @@
#define CLK_INFRA_FLASHIF_PERI_26M 118
#define CLK_INFRA_FLASHIF_SFLASH 119
#define CLK_INFRA_AP_DMA 120
-#define CLK_INFRA_NR_CLK 121
/* PERICFG */
#define CLK_PERI_PERIAXI 0
-#define CLK_PERI_NR_CLK 1
/* APMIXEDSYS */
@@ -314,7 +311,6 @@
/* SCP_ADSP */
#define CLK_SCP_ADSP_AUDIODSP 0
-#define CLK_SCP_ADSP_NR_CLK 1
/* IMP_IIC_WRAP_C */
@@ -322,7 +318,6 @@
#define CLK_IMP_IIC_WRAP_C_I2C11 1
#define CLK_IMP_IIC_WRAP_C_I2C12 2
#define CLK_IMP_IIC_WRAP_C_I2C13 3
-#define CLK_IMP_IIC_WRAP_C_NR_CLK 4
/* AUDSYS */
@@ -358,37 +353,31 @@
#define CLK_AUD_I2S7_B 29
#define CLK_AUD_I2S8_B 30
#define CLK_AUD_I2S9_B 31
-#define CLK_AUD_NR_CLK 32
/* IMP_IIC_WRAP_E */
#define CLK_IMP_IIC_WRAP_E_I2C3 0
-#define CLK_IMP_IIC_WRAP_E_NR_CLK 1
/* IMP_IIC_WRAP_S */
#define CLK_IMP_IIC_WRAP_S_I2C7 0
#define CLK_IMP_IIC_WRAP_S_I2C8 1
#define CLK_IMP_IIC_WRAP_S_I2C9 2
-#define CLK_IMP_IIC_WRAP_S_NR_CLK 3
/* IMP_IIC_WRAP_WS */
#define CLK_IMP_IIC_WRAP_WS_I2C1 0
#define CLK_IMP_IIC_WRAP_WS_I2C2 1
#define CLK_IMP_IIC_WRAP_WS_I2C4 2
-#define CLK_IMP_IIC_WRAP_WS_NR_CLK 3
/* IMP_IIC_WRAP_W */
#define CLK_IMP_IIC_WRAP_W_I2C5 0
-#define CLK_IMP_IIC_WRAP_W_NR_CLK 1
/* IMP_IIC_WRAP_N */
#define CLK_IMP_IIC_WRAP_N_I2C0 0
#define CLK_IMP_IIC_WRAP_N_I2C6 1
-#define CLK_IMP_IIC_WRAP_N_NR_CLK 2
/* MSDC_TOP */
@@ -407,17 +396,14 @@
#define CLK_MSDC_TOP_MEM_OFF_DLY_26M 12
#define CLK_MSDC_TOP_32K 13
#define CLK_MSDC_TOP_AHB2AXI_BRG_AXI 14
-#define CLK_MSDC_TOP_NR_CLK 15
/* MSDC */
#define CLK_MSDC_AXI_WRAP 0
-#define CLK_MSDC_NR_CLK 1
/* MFGCFG */
#define CLK_MFG_BG3D 0
-#define CLK_MFG_NR_CLK 1
/* MMSYS */
@@ -457,7 +443,6 @@
#define CLK_MM_DPI_DPI0 33
#define CLK_MM_26MHZ 34
#define CLK_MM_32KHZ 35
-#define CLK_MM_NR_CLK 36
/* IMGSYS */
@@ -465,7 +450,6 @@
#define CLK_IMG_LARB10 1
#define CLK_IMG_DIP 2
#define CLK_IMG_GALS 3
-#define CLK_IMG_NR_CLK 4
/* IMGSYS2 */
@@ -475,7 +459,6 @@
#define CLK_IMG2_WPE 3
#define CLK_IMG2_MSS 4
#define CLK_IMG2_GALS 5
-#define CLK_IMG2_NR_CLK 6
/* VDECSYS_SOC */
@@ -484,7 +467,6 @@
#define CLK_VDEC_SOC_LAT_ACTIVE 2
#define CLK_VDEC_SOC_VDEC 3
#define CLK_VDEC_SOC_VDEC_ACTIVE 4
-#define CLK_VDEC_SOC_NR_CLK 5
/* VDECSYS */
@@ -493,7 +475,6 @@
#define CLK_VDEC_LAT_ACTIVE 2
#define CLK_VDEC_VDEC 3
#define CLK_VDEC_ACTIVE 4
-#define CLK_VDEC_NR_CLK 5
/* VENCSYS */
@@ -501,7 +482,6 @@
#define CLK_VENC_SET1_VENC 1
#define CLK_VENC_SET2_JPGENC 2
#define CLK_VENC_SET5_GALS 3
-#define CLK_VENC_NR_CLK 4
/* CAMSYS */
@@ -521,28 +501,24 @@
#define CLK_CAM_FAKE_ENG 13
#define CLK_CAM_CCU_GALS 14
#define CLK_CAM_CAM2MM_GALS 15
-#define CLK_CAM_NR_CLK 16
/* CAMSYS_RAWA */
#define CLK_CAM_RAWA_LARBX 0
#define CLK_CAM_RAWA_CAM 1
#define CLK_CAM_RAWA_CAMTG 2
-#define CLK_CAM_RAWA_NR_CLK 3
/* CAMSYS_RAWB */
#define CLK_CAM_RAWB_LARBX 0
#define CLK_CAM_RAWB_CAM 1
#define CLK_CAM_RAWB_CAMTG 2
-#define CLK_CAM_RAWB_NR_CLK 3
/* CAMSYS_RAWC */
#define CLK_CAM_RAWC_LARBX 0
#define CLK_CAM_RAWC_CAM 1
#define CLK_CAM_RAWC_CAMTG 2
-#define CLK_CAM_RAWC_NR_CLK 3
/* IPESYS */
@@ -554,7 +530,6 @@
#define CLK_IPE_RSC 5
#define CLK_IPE_DPE 6
#define CLK_IPE_GALS 7
-#define CLK_IPE_NR_CLK 8
/* MDPSYS */
@@ -580,6 +555,5 @@
#define CLK_MDP_COLOR1 19
#define CLK_MDP_IMG_DL_RELAY0_ASYNC0 20
#define CLK_MDP_IMG_DL_RELAY1_ASYNC1 21
-#define CLK_MDP_NR_CLK 22
#endif /* _DT_BINDINGS_CLK_MT8192_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 31/33] dt-bindings: clock: mt8195: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (29 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 30/33] dt-bindings: clock: mt8192: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 32/33] dt-bindings: clock: mt8365: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 33/33] dt-bindings: clock: mt8516: " Akari Tsuyukusa
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_INFRA_AO_NR_CLK
- CLK_SCP_ADSP_NR_CLK
- CLK_PERI_AO_NR_CLK
- CLK_IMP_IIC_WRAP_S_NR_CLK
- CLK_IMP_IIC_WRAP_W_NR_CLK
- CLK_MFG_NR_CLK
- CLK_VPP0_NR_CLK
- CLK_WPE_NR_CLK
- CLK_WPE_VPP0_NR_CLK
- CLK_WPE_VPP1_NR_CLK
- CLK_VPP1_NR_CLK
- CLK_IMG_NR_CLK
- CLK_IMG1_DIP_TOP_NR_CLK
- CLK_IMG1_DIP_NR_NR_CLK
- CLK_IMG1_WPE_NR_CLK
- CLK_IPE_NR_CLK
- CLK_CAM_NR_CLK
- CLK_CAM_RAWA_NR_CLK
- CLK_CAM_YUVA_NR_CLK
- CLK_CAM_RAWB_NR_CLK
- CLK_CAM_YUVB_NR_CLK
- CLK_CAM_MRAW_NR_CLK
- CLK_CCU_NR_CLK
- CLK_VDEC_SOC_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VDEC_CORE1_NR_CLK
- CLK_VENC_NR_CLK
- CLK_VENC_CORE1_NR_CLK
- CLK_VDO0_NR_CLK
- CLK_VDO1_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8195-clk.h | 30 --------------------------
1 file changed, 30 deletions(-)
diff --git a/include/dt-bindings/clock/mt8195-clk.h b/include/dt-bindings/clock/mt8195-clk.h
index d70d017ad69c..01a511625ae3 100644
--- a/include/dt-bindings/clock/mt8195-clk.h
+++ b/include/dt-bindings/clock/mt8195-clk.h
@@ -352,7 +352,6 @@
#define CLK_INFRA_AO_UFS_RX_SYMBOL 91
#define CLK_INFRA_AO_UFS_RX_SYMBOL1 92
#define CLK_INFRA_AO_PERI_UFS_MEM_SUB 93
-#define CLK_INFRA_AO_NR_CLK 94
/* APMIXEDSYS */
@@ -385,7 +384,6 @@
/* SCP_ADSP */
#define CLK_SCP_ADSP_AUDIODSP 0
-#define CLK_SCP_ADSP_NR_CLK 1
/* PERICFG_AO */
@@ -405,14 +403,12 @@
#define CLK_PERI_AO_FNFI1X 13
#define CLK_PERI_AO_PCIE_P0_MEM 14
#define CLK_PERI_AO_PCIE_P1_MEM 15
-#define CLK_PERI_AO_NR_CLK 16
/* IMP_IIC_WRAP_S */
#define CLK_IMP_IIC_WRAP_S_I2C5 0
#define CLK_IMP_IIC_WRAP_S_I2C6 1
#define CLK_IMP_IIC_WRAP_S_I2C7 2
-#define CLK_IMP_IIC_WRAP_S_NR_CLK 3
/* IMP_IIC_WRAP_W */
@@ -421,12 +417,10 @@
#define CLK_IMP_IIC_WRAP_W_I2C2 2
#define CLK_IMP_IIC_WRAP_W_I2C3 3
#define CLK_IMP_IIC_WRAP_W_I2C4 4
-#define CLK_IMP_IIC_WRAP_W_NR_CLK 5
/* MFGCFG */
#define CLK_MFG_BG3D 0
-#define CLK_MFG_NR_CLK 1
/* VPPSYS0 */
@@ -472,7 +466,6 @@
#define CLK_VPP0_WARP0_MDP_DL_ASYNC 39
#define CLK_VPP0_WARP1_RELAY 40
#define CLK_VPP0_WARP1_MDP_DL_ASYNC 41
-#define CLK_VPP0_NR_CLK 42
/* WPESYS */
@@ -483,7 +476,6 @@
#define CLK_WPE_EVENT_TX 4
#define CLK_WPE_SMI_LARB7_P 5
#define CLK_WPE_SMI_LARB8_P 6
-#define CLK_WPE_NR_CLK 7
/* WPESYS_VPP0 */
@@ -510,7 +502,6 @@
#define CLK_WPE_VPP0_MDP_CROP 20
#define CLK_WPE_VPP0_ISP_CROP 21
#define CLK_WPE_VPP0_TOP 22
-#define CLK_WPE_VPP0_NR_CLK 23
/* WPESYS_VPP1 */
@@ -537,7 +528,6 @@
#define CLK_WPE_VPP1_MDP_CROP 20
#define CLK_WPE_VPP1_ISP_CROP 21
#define CLK_WPE_VPP1_TOP 22
-#define CLK_WPE_VPP1_NR_CLK 23
/* VPPSYS1 */
@@ -592,7 +582,6 @@
#define CLK_VPP1_VPP0_DL_ASYNC 48
#define CLK_VPP1_VPP0_DL_RELAY 49
#define CLK_VPP1_VPP_SPLIT_26M 50
-#define CLK_VPP1_NR_CLK 51
/* IMGSYS */
@@ -607,25 +596,21 @@
#define CLK_IMG_DIP1 8
#define CLK_IMG_WPE1 9
#define CLK_IMG_GALS 10
-#define CLK_IMG_NR_CLK 11
/* IMGSYS1_DIP_TOP */
#define CLK_IMG1_DIP_TOP_LARB10 0
#define CLK_IMG1_DIP_TOP_DIP_TOP 1
-#define CLK_IMG1_DIP_TOP_NR_CLK 2
/* IMGSYS1_DIP_NR */
#define CLK_IMG1_DIP_NR_RESERVE 0
#define CLK_IMG1_DIP_NR_DIP_NR 1
-#define CLK_IMG1_DIP_NR_NR_CLK 2
/* IMGSYS1_WPE */
#define CLK_IMG1_WPE_LARB11 0
#define CLK_IMG1_WPE_WPE 1
-#define CLK_IMG1_WPE_NR_CLK 2
/* IPESYS */
@@ -634,7 +619,6 @@
#define CLK_IPE_ME 2
#define CLK_IPE_TOP 3
#define CLK_IPE_SMI_LARB12 4
-#define CLK_IPE_NR_CLK 5
/* CAMSYS */
@@ -661,35 +645,30 @@
#define CLK_CAM_CAM2MM0_GALS 20
#define CLK_CAM_CAM2MM1_GALS 21
#define CLK_CAM_CAM2SYS_GALS 22
-#define CLK_CAM_NR_CLK 23
/* CAMSYS_RAWA */
#define CLK_CAM_RAWA_LARBX 0
#define CLK_CAM_RAWA_CAM 1
#define CLK_CAM_RAWA_CAMTG 2
-#define CLK_CAM_RAWA_NR_CLK 3
/* CAMSYS_YUVA */
#define CLK_CAM_YUVA_LARBX 0
#define CLK_CAM_YUVA_CAM 1
#define CLK_CAM_YUVA_CAMTG 2
-#define CLK_CAM_YUVA_NR_CLK 3
/* CAMSYS_RAWB */
#define CLK_CAM_RAWB_LARBX 0
#define CLK_CAM_RAWB_CAM 1
#define CLK_CAM_RAWB_CAMTG 2
-#define CLK_CAM_RAWB_NR_CLK 3
/* CAMSYS_YUVB */
#define CLK_CAM_YUVB_LARBX 0
#define CLK_CAM_YUVB_CAM 1
#define CLK_CAM_YUVB_CAMTG 2
-#define CLK_CAM_YUVB_NR_CLK 3
/* CAMSYS_MRAW */
@@ -699,7 +678,6 @@
#define CLK_CAM_MRAW_MRAW1 3
#define CLK_CAM_MRAW_MRAW2 4
#define CLK_CAM_MRAW_MRAW3 5
-#define CLK_CAM_MRAW_NR_CLK 6
/* CCUSYS */
@@ -707,28 +685,24 @@
#define CLK_CCU_AHB 1
#define CLK_CCU_CCU0 2
#define CLK_CCU_CCU1 3
-#define CLK_CCU_NR_CLK 4
/* VDECSYS_SOC */
#define CLK_VDEC_SOC_LARB1 0
#define CLK_VDEC_SOC_LAT 1
#define CLK_VDEC_SOC_VDEC 2
-#define CLK_VDEC_SOC_NR_CLK 3
/* VDECSYS */
#define CLK_VDEC_LARB1 0
#define CLK_VDEC_LAT 1
#define CLK_VDEC_VDEC 2
-#define CLK_VDEC_NR_CLK 3
/* VDECSYS_CORE1 */
#define CLK_VDEC_CORE1_LARB1 0
#define CLK_VDEC_CORE1_LAT 1
#define CLK_VDEC_CORE1_VDEC 2
-#define CLK_VDEC_CORE1_NR_CLK 3
/* APUSYS_PLL */
@@ -746,7 +720,6 @@
#define CLK_VENC_JPGDEC 3
#define CLK_VENC_JPGDEC_C1 4
#define CLK_VENC_GALS 5
-#define CLK_VENC_NR_CLK 6
/* VENCSYS_CORE1 */
@@ -756,7 +729,6 @@
#define CLK_VENC_CORE1_JPGDEC 3
#define CLK_VENC_CORE1_JPGDEC_C1 4
#define CLK_VENC_CORE1_GALS 5
-#define CLK_VENC_CORE1_NR_CLK 6
/* VDOSYS0 */
@@ -805,7 +777,6 @@
#define CLK_VDO0_DSI0_DSI 42
#define CLK_VDO0_DSI1_DSI 43
#define CLK_VDO0_DP_INTF0_DP_INTF 44
-#define CLK_VDO0_NR_CLK 45
/* VDOSYS1 */
@@ -860,7 +831,6 @@
#define CLK_VDO1_DISP_MONITOR_DPINTF 48
#define CLK_VDO1_26M_SLOW 49
#define CLK_VDO1_DPI1_HDMI 50
-#define CLK_VDO1_NR_CLK 51
#endif /* _DT_BINDINGS_CLK_MT8195_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 32/33] dt-bindings: clock: mt8365: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (30 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 31/33] dt-bindings: clock: mt8195: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 33/33] dt-bindings: clock: mt8516: " Akari Tsuyukusa
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_TOP_NR_CLK
- CLK_IFR_NR_CLK
- CLK_PERI_NR_CLK
- CLK_GCE_NR_CLK
- CLK_AUD_NR_CLK
- CLK_MIPI_RX_ANA_CSI0A_NR_CLK
- CLK_MIPI_RX_ANA_CSI0B_NR_CLK
- CLK_MIPI_RX_ANA_CSI1A_NR_CLK
- CLK_MIPI_RX_ANA_CSI1B_NR_CLK
- CLK_MIPI_RX_ANA_CSI2A_NR_CLK
- CLK_MIPI_RX_ANA_CSI2B_NR_CLK
- CLK_MCU_NR_CLK
- CLK_MFG_NR_CLK
- CLK_MM_NR_CLK
- CLK_CAM_NR_CLK
- CLK_VDEC_NR_CLK
- CLK_VENC_NR_CLK
- CLK_APU_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
.../dt-bindings/clock/mediatek,mt8365-clk.h | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/include/dt-bindings/clock/mediatek,mt8365-clk.h b/include/dt-bindings/clock/mediatek,mt8365-clk.h
index f9aff1775810..0a1f02a7d0d2 100644
--- a/include/dt-bindings/clock/mediatek,mt8365-clk.h
+++ b/include/dt-bindings/clock/mediatek,mt8365-clk.h
@@ -147,7 +147,6 @@
#define CLK_TOP_CONN_26M 137
#define CLK_TOP_DSP_32K 138
#define CLK_TOP_DSP_26M 139
-#define CLK_TOP_NR_CLK 140
/* INFRACFG */
#define CLK_IFR_PMIC_TMR 0
@@ -221,11 +220,9 @@
#define CLK_IFR_SSUSB_SYS 68
#define CLK_IFR_SSUSB_REF 69
#define CLK_IFR_SSUSB_XHCI 70
-#define CLK_IFR_NR_CLK 71
/* PERICFG */
#define CLK_PERIAXI 0
-#define CLK_PERI_NR_CLK 1
/* APMIXEDSYS */
#define CLK_APMIXED_ARMPLL 0
@@ -245,7 +242,6 @@
/* GCE */
#define CLK_GCE_FAXI 0
-#define CLK_GCE_NR_CLK 1
/* AUDIOTOP */
#define CLK_AUD_AFE 0
@@ -266,40 +262,31 @@
#define CLK_AUD_I2S2_BK 15
#define CLK_AUD_I2S3_BK 16
#define CLK_AUD_I2S4_BK 17
-#define CLK_AUD_NR_CLK 18
/* MIPI_CSI0A */
#define CLK_MIPI0A_CSR_CSI_EN_0A 0
-#define CLK_MIPI_RX_ANA_CSI0A_NR_CLK 1
/* MIPI_CSI0B */
#define CLK_MIPI0B_CSR_CSI_EN_0B 0
-#define CLK_MIPI_RX_ANA_CSI0B_NR_CLK 1
/* MIPI_CSI1A */
#define CLK_MIPI1A_CSR_CSI_EN_1A 0
-#define CLK_MIPI_RX_ANA_CSI1A_NR_CLK 1
/* MIPI_CSI1B */
#define CLK_MIPI1B_CSR_CSI_EN_1B 0
-#define CLK_MIPI_RX_ANA_CSI1B_NR_CLK 1
/* MIPI_CSI2A */
#define CLK_MIPI2A_CSR_CSI_EN_2A 0
-#define CLK_MIPI_RX_ANA_CSI2A_NR_CLK 1
/* MIPI_CSI2B */
#define CLK_MIPI2B_CSR_CSI_EN_2B 0
-#define CLK_MIPI_RX_ANA_CSI2B_NR_CLK 1
/* MCUCFG */
#define CLK_MCU_BUS_SEL 0
-#define CLK_MCU_NR_CLK 1
/* MFGCFG */
#define CLK_MFG_BG3D 0
#define CLK_MFG_MBIST_DIAG 1
-#define CLK_MFG_NR_CLK 2
/* MMSYS */
#define CLK_MM_MM_MDP_RDMA0 0
@@ -338,7 +325,6 @@
#define CLK_MM_MM_DPI0 33
#define CLK_MM_LVDSTX_PXL 34
#define CLK_MM_LVDSTX_CTS 35
-#define CLK_MM_NR_CLK 36
/* IMGSYS */
#define CLK_CAM_LARB2 0
@@ -349,17 +335,14 @@
#define CLK_CAMSV1 5
#define CLK_CAM_FDVT 6
#define CLK_CAM_WPE 7
-#define CLK_CAM_NR_CLK 8
/* VDECSYS */
#define CLK_VDEC_VDEC 0
#define CLK_VDEC_LARB1 1
-#define CLK_VDEC_NR_CLK 2
/* VENCSYS */
#define CLK_VENC 0
#define CLK_VENC_JPGENC 1
-#define CLK_VENC_NR_CLK 2
/* APUSYS */
#define CLK_APU_IPU_CK 0
@@ -368,6 +351,5 @@
#define CLK_APU_IF_CK 3
#define CLK_APU_EDMA 4
#define CLK_APU_AHB 5
-#define CLK_APU_NR_CLK 6
#endif /* _DT_BINDINGS_CLK_MT8365_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH linux-next 33/33] dt-bindings: clock: mt8516: Drop unused _NR macros
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
` (31 preceding siblings ...)
2026-11-29 1:47 ` [PATCH linux-next 32/33] dt-bindings: clock: mt8365: " Akari Tsuyukusa
@ 2026-11-29 1:47 ` Akari Tsuyukusa
32 siblings, 0 replies; 34+ messages in thread
From: Akari Tsuyukusa @ 2026-11-29 1:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Stephen Boyd, Brian Masney,
Jerome Brunet, Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Akari Tsuyukusa, Chen-Yu Tsai, Miles Chen,
open list:MEDIATEK CLOCK DRIVERS,
moderated list:MEDIATEK CLOCK DRIVERS,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Remove obsolete clock-count macros that are no longer referenced
by in-tree sources.
Removed definitions:
- CLK_IFR_NR_CLK
- CLK_AUD_NR_CLK
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
include/dt-bindings/clock/mt8516-clk.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/dt-bindings/clock/mt8516-clk.h b/include/dt-bindings/clock/mt8516-clk.h
index 816447b98edd..4f8a35cf987e 100644
--- a/include/dt-bindings/clock/mt8516-clk.h
+++ b/include/dt-bindings/clock/mt8516-clk.h
@@ -25,7 +25,6 @@
#define CLK_IFR_I2C0_SEL 2
#define CLK_IFR_I2C1_SEL 3
#define CLK_IFR_I2C2_SEL 4
-#define CLK_IFR_NR_CLK 5
/* TOPCKGEN */
@@ -223,6 +222,5 @@
#define CLK_AUD_DAC 10
#define CLK_AUD_DAC_PREDIS 11
#define CLK_AUD_TML 12
-#define CLK_AUD_NR_CLK 13
#endif /* _DT_BINDINGS_CLK_MT8516_H */
--
2.56.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
end of thread, other threads:[~2026-11-29 1:52 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 1:47 [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 01/33] clk: mediatek: Skip common MMIO mapping for PLL-only controllers Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 02/33] clk: mediatek: Fix NULL pointer dereference in pdev remove Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 03/33] clk: mediatek: Drop unused shared_io flag Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 04/33] clk: mediatek: Pass node to of_platform_populate() in common probe Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 05/33] clk: mediatek: Fix MFG mux notifier use-after-free Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 06/33] clk: mediatek: mt2701: Keep CPU mux descriptors alive Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 07/33] clk: mediatek: mt8167: Keep muxes " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 08/33] clk: mediatek: mt8516: Keep clock " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 09/33] clk: mediatek: Reserve missing MT2701 audsys clock IDs Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 10/33] clk: mediatek: Fix MT2701 onecell IDs after common probe migration Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 11/33] clk: mediatek: Fix MT6779 " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 12/33] clk: mediatek: Fix MT6797 " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 13/33] clk: mediatek: Fix MT8135 " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 14/33] clk: mediatek: Fix MT8173 " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 15/33] dt-bindings: clock: mt2701: Drop unused _NR macros Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 16/33] dt-bindings: clock: mt2712: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 17/33] dt-bindings: clock: mt6765: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 18/33] dt-bindings: clock: mt6779: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 19/33] dt-bindings: clock: mt6795: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 20/33] dt-bindings: clock: mt6797: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 21/33] dt-bindings: clock: mt7622: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 22/33] dt-bindings: clock: mt7629: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 23/33] dt-bindings: clock: mt7988: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 24/33] dt-bindings: clock: mt8135: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 25/33] dt-bindings: clock: mt8167: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 26/33] dt-bindings: clock: mt8173: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 27/33] dt-bindings: clock: mt8183: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 28/33] dt-bindings: clock: mt8186: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 29/33] dt-bindings: clock: mt8188: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 30/33] dt-bindings: clock: mt8192: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 31/33] dt-bindings: clock: mt8195: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 32/33] dt-bindings: clock: mt8365: " Akari Tsuyukusa
2026-11-29 1:47 ` [PATCH linux-next 33/33] dt-bindings: clock: mt8516: " Akari Tsuyukusa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox