162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2022 MediaTek Inc.
462306a36Sopenharmony_ci * Author: Garmin Chang <garmin.chang@mediatek.com>
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include <dt-bindings/clock/mediatek,mt8188-clk.h>
862306a36Sopenharmony_ci#include <dt-bindings/reset/mt8188-resets.h>
962306a36Sopenharmony_ci#include <linux/clk-provider.h>
1062306a36Sopenharmony_ci#include <linux/platform_device.h>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include "clk-gate.h"
1362306a36Sopenharmony_ci#include "clk-mtk.h"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistatic const struct mtk_gate_regs infra_ao0_cg_regs = {
1662306a36Sopenharmony_ci	.set_ofs = 0x80,
1762306a36Sopenharmony_ci	.clr_ofs = 0x84,
1862306a36Sopenharmony_ci	.sta_ofs = 0x90,
1962306a36Sopenharmony_ci};
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cistatic const struct mtk_gate_regs infra_ao1_cg_regs = {
2262306a36Sopenharmony_ci	.set_ofs = 0x88,
2362306a36Sopenharmony_ci	.clr_ofs = 0x8c,
2462306a36Sopenharmony_ci	.sta_ofs = 0x94,
2562306a36Sopenharmony_ci};
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_cistatic const struct mtk_gate_regs infra_ao2_cg_regs = {
2862306a36Sopenharmony_ci	.set_ofs = 0xa4,
2962306a36Sopenharmony_ci	.clr_ofs = 0xa8,
3062306a36Sopenharmony_ci	.sta_ofs = 0xac,
3162306a36Sopenharmony_ci};
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_cistatic const struct mtk_gate_regs infra_ao3_cg_regs = {
3462306a36Sopenharmony_ci	.set_ofs = 0xc0,
3562306a36Sopenharmony_ci	.clr_ofs = 0xc4,
3662306a36Sopenharmony_ci	.sta_ofs = 0xc8,
3762306a36Sopenharmony_ci};
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_cistatic const struct mtk_gate_regs infra_ao4_cg_regs = {
4062306a36Sopenharmony_ci	.set_ofs = 0xe0,
4162306a36Sopenharmony_ci	.clr_ofs = 0xe4,
4262306a36Sopenharmony_ci	.sta_ofs = 0xe8,
4362306a36Sopenharmony_ci};
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#define GATE_INFRA_AO0_FLAGS(_id, _name, _parent, _shift, _flag)                \
4662306a36Sopenharmony_ci	GATE_MTK_FLAGS(_id, _name, _parent, &infra_ao0_cg_regs, _shift, \
4762306a36Sopenharmony_ci		&mtk_clk_gate_ops_setclr, _flag)
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci#define GATE_INFRA_AO0(_id, _name, _parent, _shift)	\
5062306a36Sopenharmony_ci	GATE_INFRA_AO0_FLAGS(_id, _name, _parent, _shift, 0)
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci#define GATE_INFRA_AO1_FLAGS(_id, _name, _parent, _shift, _flag)		\
5362306a36Sopenharmony_ci	GATE_MTK_FLAGS(_id, _name, _parent, &infra_ao1_cg_regs, _shift,	\
5462306a36Sopenharmony_ci		&mtk_clk_gate_ops_setclr, _flag)
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci#define GATE_INFRA_AO1(_id, _name, _parent, _shift)	\
5762306a36Sopenharmony_ci	GATE_INFRA_AO1_FLAGS(_id, _name, _parent, _shift, 0)
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci#define GATE_INFRA_AO2(_id, _name, _parent, _shift)			\
6062306a36Sopenharmony_ci	GATE_MTK(_id, _name, _parent, &infra_ao2_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci#define GATE_INFRA_AO2_FLAGS(_id, _name, _parent, _shift, _flag)		\
6362306a36Sopenharmony_ci	GATE_MTK_FLAGS(_id, _name, _parent, &infra_ao2_cg_regs, _shift,	\
6462306a36Sopenharmony_ci		&mtk_clk_gate_ops_setclr, _flag)
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci#define GATE_INFRA_AO3_FLAGS(_id, _name, _parent, _shift, _flag)		\
6762306a36Sopenharmony_ci	GATE_MTK_FLAGS(_id, _name, _parent, &infra_ao3_cg_regs, _shift,	\
6862306a36Sopenharmony_ci		&mtk_clk_gate_ops_setclr, _flag)
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci#define GATE_INFRA_AO3(_id, _name, _parent, _shift)	\
7162306a36Sopenharmony_ci	GATE_INFRA_AO3_FLAGS(_id, _name, _parent, _shift, 0)
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci#define GATE_INFRA_AO4_FLAGS(_id, _name, _parent, _shift, _flag)		\
7462306a36Sopenharmony_ci	GATE_MTK_FLAGS(_id, _name, _parent, &infra_ao4_cg_regs, _shift,	\
7562306a36Sopenharmony_ci		&mtk_clk_gate_ops_setclr, _flag)
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci#define GATE_INFRA_AO4(_id, _name, _parent, _shift)	\
7862306a36Sopenharmony_ci	GATE_INFRA_AO4_FLAGS(_id, _name, _parent, _shift, 0)
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_cistatic const struct mtk_gate infra_ao_clks[] = {
8162306a36Sopenharmony_ci	/* INFRA_AO0 */
8262306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PMIC_TMR, "infra_ao_pmic_tmr", "top_pwrap_ulposc", 0),
8362306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PMIC_AP, "infra_ao_pmic_ap", "top_pwrap_ulposc", 1),
8462306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PMIC_MD, "infra_ao_pmic_md", "top_pwrap_ulposc", 2),
8562306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PMIC_CONN, "infra_ao_pmic_conn", "top_pwrap_ulposc", 3),
8662306a36Sopenharmony_ci	/* infra_ao_sej is main clock is for secure engine with JTAG support */
8762306a36Sopenharmony_ci	GATE_INFRA_AO0_FLAGS(CLK_INFRA_AO_SEJ, "infra_ao_sej", "top_axi", 5, CLK_IS_CRITICAL),
8862306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_APXGPT, "infra_ao_apxgpt", "top_axi", 6),
8962306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_GCE, "infra_ao_gce", "top_axi", 8),
9062306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_GCE2, "infra_ao_gce2", "top_axi", 9),
9162306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_THERM, "infra_ao_therm", "top_axi", 10),
9262306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM_HCLK, "infra_ao_pwm_h", "top_axi", 15),
9362306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM1, "infra_ao_pwm1", "top_pwm", 16),
9462306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM2, "infra_ao_pwm2", "top_pwm", 17),
9562306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM3, "infra_ao_pwm3", "top_pwm", 18),
9662306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM4, "infra_ao_pwm4", "top_pwm", 19),
9762306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_PWM, "infra_ao_pwm", "top_pwm", 21),
9862306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART0, "infra_ao_uart0", "top_uart", 22),
9962306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART1, "infra_ao_uart1", "top_uart", 23),
10062306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART2, "infra_ao_uart2", "top_uart", 24),
10162306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART3, "infra_ao_uart3", "top_uart", 25),
10262306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART4, "infra_ao_uart4", "top_uart", 26),
10362306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_GCE_26M, "infra_ao_gce_26m", "clk26m", 27),
10462306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_CQ_DMA_FPC, "infra_ao_dma", "pad_fpc_ck", 28),
10562306a36Sopenharmony_ci	GATE_INFRA_AO0(CLK_INFRA_AO_UART5, "infra_ao_uart5", "top_uart", 29),
10662306a36Sopenharmony_ci	/* INFRA_AO1 */
10762306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_HDMI_26M, "infra_ao_hdmi_26m", "clk26m", 0),
10862306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_SPI0, "infra_ao_spi0", "top_spi", 1),
10962306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_MSDC0, "infra_ao_msdc0", "top_msdc5hclk", 2),
11062306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_MSDC1, "infra_ao_msdc1", "top_axi", 4),
11162306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_MSDC2, "infra_ao_msdc2", "top_axi", 5),
11262306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_MSDC0_SRC, "infra_ao_msdc0_clk", "top_msdc50_0", 6),
11362306a36Sopenharmony_ci	/* infra_ao_dvfsrc is for internal DVFS usage, should not be handled by Linux. */
11462306a36Sopenharmony_ci	GATE_INFRA_AO1_FLAGS(CLK_INFRA_AO_DVFSRC, "infra_ao_dvfsrc",
11562306a36Sopenharmony_ci			     "clk26m", 7, CLK_IS_CRITICAL),
11662306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_TRNG, "infra_ao_trng", "top_axi", 9),
11762306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_AUXADC, "infra_ao_auxadc", "clk26m", 10),
11862306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_CPUM, "infra_ao_cpum", "top_axi", 11),
11962306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_HDMI_32K, "infra_ao_hdmi_32k", "clk32k", 12),
12062306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_CEC_66M_HCLK, "infra_ao_cec_66m_hclk", "top_axi", 13),
12162306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_PCIE_TL_26M, "infra_ao_pcie_tl_26m", "clk26m", 15),
12262306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_MSDC1_SRC, "infra_ao_msdc1_clk", "top_msdc30_1", 16),
12362306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_CEC_66M_BCLK, "infra_ao_cec_66m_bclk", "top_axi", 17),
12462306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_PCIE_TL_96M, "infra_ao_pcie_tl_96m", "top_tl", 18),
12562306a36Sopenharmony_ci	/* infra_ao_dapc is for device access permission control module */
12662306a36Sopenharmony_ci	GATE_INFRA_AO1_FLAGS(CLK_INFRA_AO_DEVICE_APC, "infra_ao_dapc",
12762306a36Sopenharmony_ci			     "top_axi", 20, CLK_IS_CRITICAL),
12862306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_ECC_66M_HCLK, "infra_ao_ecc_66m_hclk", "top_axi", 23),
12962306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_DEBUGSYS, "infra_ao_debugsys", "top_axi", 24),
13062306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_AUDIO, "infra_ao_audio", "top_axi", 25),
13162306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_PCIE_TL_32K, "infra_ao_pcie_tl_32k", "clk32k", 26),
13262306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_DBG_TRACE, "infra_ao_dbg_trace", "top_axi", 29),
13362306a36Sopenharmony_ci	GATE_INFRA_AO1(CLK_INFRA_AO_DRAMC_F26M, "infra_ao_dramc26", "clk26m", 31),
13462306a36Sopenharmony_ci	/* INFRA_AO2 */
13562306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_IRTX, "infra_ao_irtx", "top_axi", 0),
13662306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_DISP_PWM, "infra_ao_disp_pwm", "top_disp_pwm0", 2),
13762306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_CLDMA_BCLK, "infra_ao_cldmabclk", "top_axi", 3),
13862306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_AUDIO_26M_BCLK, "infra_ao_audio26m", "clk26m", 4),
13962306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_SPI1, "infra_ao_spi1", "top_spi", 6),
14062306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_SPI2, "infra_ao_spi2", "top_spi", 9),
14162306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_SPI3, "infra_ao_spi3", "top_spi", 10),
14262306a36Sopenharmony_ci	GATE_INFRA_AO2_FLAGS(CLK_INFRA_AO_FSSPM, "infra_ao_fsspm",
14362306a36Sopenharmony_ci			     "top_sspm", 15, CLK_IS_CRITICAL),
14462306a36Sopenharmony_ci	GATE_INFRA_AO2_FLAGS(CLK_INFRA_AO_SSPM_BUS_HCLK, "infra_ao_sspm_hclk",
14562306a36Sopenharmony_ci			     "top_axi", 17, CLK_IS_CRITICAL),
14662306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_APDMA_BCLK, "infra_ao_apdma_bclk", "top_axi", 18),
14762306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_SPI4, "infra_ao_spi4", "top_spi", 25),
14862306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_SPI5, "infra_ao_spi5", "top_spi", 26),
14962306a36Sopenharmony_ci	GATE_INFRA_AO2(CLK_INFRA_AO_CQ_DMA, "infra_ao_cq_dma", "top_axi", 27),
15062306a36Sopenharmony_ci	/* INFRA_AO3 */
15162306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_MSDC0_SELF, "infra_ao_msdc0sf", "top_msdc50_0", 0),
15262306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_MSDC1_SELF, "infra_ao_msdc1sf", "top_msdc50_0", 1),
15362306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_MSDC2_SELF, "infra_ao_msdc2sf", "top_msdc50_0", 2),
15462306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_I2S_DMA, "infra_ao_i2s_dma", "top_axi", 5),
15562306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_AP_MSDC0, "infra_ao_ap_msdc0", "top_msdc50_0", 7),
15662306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_MD_MSDC0, "infra_ao_md_msdc0", "top_msdc50_0", 8),
15762306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_MSDC30_2, "infra_ao_msdc30_2", "top_msdc30_2", 9),
15862306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_GCPU, "infra_ao_gcpu", "top_gcpu", 10),
15962306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_PCIE_PERI_26M, "infra_ao_pcie_peri_26m", "clk26m", 15),
16062306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_GCPU_66M_BCLK, "infra_ao_gcpu_66m_bclk", "top_axi", 16),
16162306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_GCPU_133M_BCLK, "infra_ao_gcpu_133m_bclk", "top_axi", 17),
16262306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_DISP_PWM1, "infra_ao_disp_pwm1", "top_disp_pwm1", 20),
16362306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_FBIST2FPC, "infra_ao_fbist2fpc", "top_msdc50_0", 24),
16462306a36Sopenharmony_ci	/* infra_ao_dapc_sync is for device access permission control module */
16562306a36Sopenharmony_ci	GATE_INFRA_AO3_FLAGS(CLK_INFRA_AO_DEVICE_APC_SYNC, "infra_ao_dapc_sync",
16662306a36Sopenharmony_ci			     "top_axi", 25, CLK_IS_CRITICAL),
16762306a36Sopenharmony_ci	GATE_INFRA_AO3(CLK_INFRA_AO_PCIE_P1_PERI_26M, "infra_ao_pcie_p1_peri_26m", "clk26m", 26),
16862306a36Sopenharmony_ci	/* INFRA_AO4 */
16962306a36Sopenharmony_ci	/* infra_ao_133m_mclk_set/infra_ao_66m_mclk_set are main clocks of peripheral */
17062306a36Sopenharmony_ci	GATE_INFRA_AO4_FLAGS(CLK_INFRA_AO_133M_MCLK_CK, "infra_ao_133m_mclk_set",
17162306a36Sopenharmony_ci			     "top_axi", 0, CLK_IS_CRITICAL),
17262306a36Sopenharmony_ci	GATE_INFRA_AO4_FLAGS(CLK_INFRA_AO_66M_MCLK_CK, "infra_ao_66m_mclk_set",
17362306a36Sopenharmony_ci			     "top_axi", 1, CLK_IS_CRITICAL),
17462306a36Sopenharmony_ci	GATE_INFRA_AO4(CLK_INFRA_AO_PCIE_PL_P_250M_P0, "infra_ao_pcie_pl_p_250m_p0",
17562306a36Sopenharmony_ci		       "pextp_pipe", 7),
17662306a36Sopenharmony_ci	GATE_INFRA_AO4(CLK_INFRA_AO_RG_AES_MSDCFDE_CK_0P,
17762306a36Sopenharmony_ci		       "infra_ao_aes_msdcfde_0p", "top_aes_msdcfde", 18),
17862306a36Sopenharmony_ci};
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_cistatic u16 infra_ao_rst_ofs[] = {
18162306a36Sopenharmony_ci	INFRA_RST0_SET_OFFSET,
18262306a36Sopenharmony_ci	INFRA_RST1_SET_OFFSET,
18362306a36Sopenharmony_ci	INFRA_RST2_SET_OFFSET,
18462306a36Sopenharmony_ci	INFRA_RST3_SET_OFFSET,
18562306a36Sopenharmony_ci	INFRA_RST4_SET_OFFSET,
18662306a36Sopenharmony_ci};
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_cistatic u16 infra_ao_idx_map[] = {
18962306a36Sopenharmony_ci	[MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + 2,
19062306a36Sopenharmony_ci	[MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK + 4,
19162306a36Sopenharmony_ci	[MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5,
19262306a36Sopenharmony_ci};
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_cistatic const struct mtk_clk_rst_desc infra_ao_rst_desc = {
19562306a36Sopenharmony_ci	.version = MTK_RST_SET_CLR,
19662306a36Sopenharmony_ci	.rst_bank_ofs = infra_ao_rst_ofs,
19762306a36Sopenharmony_ci	.rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs),
19862306a36Sopenharmony_ci	.rst_idx_map = infra_ao_idx_map,
19962306a36Sopenharmony_ci	.rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map),
20062306a36Sopenharmony_ci};
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_cistatic const struct mtk_clk_desc infra_ao_desc = {
20362306a36Sopenharmony_ci	.clks = infra_ao_clks,
20462306a36Sopenharmony_ci	.num_clks = ARRAY_SIZE(infra_ao_clks),
20562306a36Sopenharmony_ci	.rst_desc = &infra_ao_rst_desc,
20662306a36Sopenharmony_ci};
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_cistatic const struct of_device_id of_match_clk_mt8188_infra_ao[] = {
20962306a36Sopenharmony_ci	{ .compatible = "mediatek,mt8188-infracfg-ao", .data = &infra_ao_desc },
21062306a36Sopenharmony_ci	{ /* sentinel */ }
21162306a36Sopenharmony_ci};
21262306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, of_match_clk_mt8188_infra_ao);
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_cistatic struct platform_driver clk_mt8188_infra_ao_drv = {
21562306a36Sopenharmony_ci	.probe = mtk_clk_simple_probe,
21662306a36Sopenharmony_ci	.remove_new = mtk_clk_simple_remove,
21762306a36Sopenharmony_ci	.driver = {
21862306a36Sopenharmony_ci		.name = "clk-mt8188-infra_ao",
21962306a36Sopenharmony_ci		.of_match_table = of_match_clk_mt8188_infra_ao,
22062306a36Sopenharmony_ci	},
22162306a36Sopenharmony_ci};
22262306a36Sopenharmony_cimodule_platform_driver(clk_mt8188_infra_ao_drv);
22362306a36Sopenharmony_ciMODULE_LICENSE("GPL");
224