#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <dt-bindings/clock/sprd,sc9860-clk.h>
#include "common.h"
#include "composite.h"
#include "div.h"
#include "gate.h"
#include "mux.h"
#include "pll.h"
static CLK_FIXED_FACTOR(fac_4m, "fac-4m", "ext-26m",
6, 1, 0);
static CLK_FIXED_FACTOR(fac_2m, "fac-2m", "ext-26m",
13, 1, 0);
static CLK_FIXED_FACTOR(fac_1m, "fac-1m", "ext-26m",
26, 1, 0);
static CLK_FIXED_FACTOR(fac_250k, "fac-250k", "ext-26m",
104, 1, 0);
static CLK_FIXED_FACTOR(fac_rpll0_26m, "rpll0-26m", "ext-26m",
1, 1, 0);
static CLK_FIXED_FACTOR(fac_rpll1_26m, "rpll1-26m", "ext-26m",
1, 1, 0);
static CLK_FIXED_FACTOR(fac_rco_25m, "rco-25m", "ext-rc0-100m",
4, 1, 0);
static CLK_FIXED_FACTOR(fac_rco_4m, "rco-4m", "ext-rc0-100m",
25, 1, 0);
static CLK_FIXED_FACTOR(fac_rco_2m, "rco-2m", "ext-rc0-100m",
50, 1, 0);
static CLK_FIXED_FACTOR(fac_3k2, "fac-3k2", "ext-32k",
10, 1, 0);
static CLK_FIXED_FACTOR(fac_1k, "fac-1k", "ext-32k",
32, 1, 0);
static SPRD_SC_GATE_CLK(mpll0_gate, "mpll0-gate", "ext-26m", 0xb0,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(mpll1_gate, "mpll1-gate", "ext-26m", 0xb0,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dpll0_gate, "dpll0-gate", "ext-26m", 0xb4,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dpll1_gate, "dpll1-gate", "ext-26m", 0xb4,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ltepll0_gate, "ltepll0-gate", "ext-26m", 0xb8,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(twpll_gate, "twpll-gate", "ext-26m", 0xbc,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ltepll1_gate, "ltepll1-gate", "ext-26m", 0x10c,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(rpll0_gate, "rpll0-gate", "ext-26m", 0x16c,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(rpll1_gate, "rpll1-gate", "ext-26m", 0x16c,
0x1000, BIT(18), 0, 0);
static SPRD_SC_GATE_CLK(cppll_gate, "cppll-gate", "ext-26m", 0x2b4,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpll_gate, "gpll-gate", "ext-26m", 0x32c,
0x1000, BIT(0), CLK_IGNORE_UNUSED, CLK_GATE_SET_TO_DISABLE);
static struct sprd_clk_common *sc9860_pmu_gate_clks[] = …;
static struct clk_hw_onecell_data sc9860_pmu_gate_hws = …;
static const struct sprd_clk_desc sc9860_pmu_gate_desc = …;
static const u64 itable1[4] = …;
static const u64 itable2[4] = …;
static const struct clk_bit_field f_mpll0[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_K_FVCO(mpll0_clk, "mpll0", "mpll0-gate", 0x24,
2, itable2, f_mpll0, 200,
1000, 1000, 1, 1300000000);
static const struct clk_bit_field f_mpll1[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(mpll1_clk, "mpll1", "mpll1-gate", 0x2c,
2, itable2, f_mpll1, 200);
static const struct clk_bit_field f_dpll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(dpll0_clk, "dpll0", "dpll0-gate", 0x34,
2, itable1, f_dpll, 200);
static SPRD_PLL_WITH_ITABLE_1K(dpll1_clk, "dpll1", "dpll1-gate", 0x3c,
2, itable1, f_dpll, 200);
static const struct clk_bit_field f_rpll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(rpll0_clk, "rpll0", "rpll0-gate", 0x44,
3, itable1, f_rpll, 200);
static SPRD_PLL_WITH_ITABLE_1K(rpll1_clk, "rpll1", "rpll1-gate", 0x50,
3, itable1, f_rpll, 200);
static const struct clk_bit_field f_twpll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(twpll_clk, "twpll", "twpll-gate", 0x5c,
2, itable2, f_twpll, 200);
static const struct clk_bit_field f_ltepll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(ltepll0_clk, "ltepll0", "ltepll0-gate",
0x64, 2, itable1,
f_ltepll, 200);
static SPRD_PLL_WITH_ITABLE_1K(ltepll1_clk, "ltepll1", "ltepll1-gate",
0x6c, 2, itable1,
f_ltepll, 200);
static const struct clk_bit_field f_gpll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_K_FVCO(gpll_clk, "gpll", "gpll-gate", 0x9c,
2, itable1, f_gpll, 200,
1000, 1000, 1, 600000000);
static const struct clk_bit_field f_cppll[PLL_FACT_MAX] = …;
static SPRD_PLL_WITH_ITABLE_1K(cppll_clk, "cppll", "cppll-gate", 0xc4,
2, itable1, f_cppll, 200);
static CLK_FIXED_FACTOR(gpll_42m5, "gpll-42m5", "gpll", 20, 1, 0);
static CLK_FIXED_FACTOR(twpll_768m, "twpll-768m", "twpll", 2, 1, 0);
static CLK_FIXED_FACTOR(twpll_384m, "twpll-384m", "twpll", 4, 1, 0);
static CLK_FIXED_FACTOR(twpll_192m, "twpll-192m", "twpll", 8, 1, 0);
static CLK_FIXED_FACTOR(twpll_96m, "twpll-96m", "twpll", 16, 1, 0);
static CLK_FIXED_FACTOR(twpll_48m, "twpll-48m", "twpll", 32, 1, 0);
static CLK_FIXED_FACTOR(twpll_24m, "twpll-24m", "twpll", 64, 1, 0);
static CLK_FIXED_FACTOR(twpll_12m, "twpll-12m", "twpll", 128, 1, 0);
static CLK_FIXED_FACTOR(twpll_512m, "twpll-512m", "twpll", 3, 1, 0);
static CLK_FIXED_FACTOR(twpll_256m, "twpll-256m", "twpll", 6, 1, 0);
static CLK_FIXED_FACTOR(twpll_128m, "twpll-128m", "twpll", 12, 1, 0);
static CLK_FIXED_FACTOR(twpll_64m, "twpll-64m", "twpll", 24, 1, 0);
static CLK_FIXED_FACTOR(twpll_307m2, "twpll-307m2", "twpll", 5, 1, 0);
static CLK_FIXED_FACTOR(twpll_153m6, "twpll-153m6", "twpll", 10, 1, 0);
static CLK_FIXED_FACTOR(twpll_76m8, "twpll-76m8", "twpll", 20, 1, 0);
static CLK_FIXED_FACTOR(twpll_51m2, "twpll-51m2", "twpll", 30, 1, 0);
static CLK_FIXED_FACTOR(twpll_38m4, "twpll-38m4", "twpll", 40, 1, 0);
static CLK_FIXED_FACTOR(twpll_19m2, "twpll-19m2", "twpll", 80, 1, 0);
static CLK_FIXED_FACTOR(l0_614m4, "l0-614m4", "ltepll0", 2, 1, 0);
static CLK_FIXED_FACTOR(l0_409m6, "l0-409m6", "ltepll0", 3, 1, 0);
static CLK_FIXED_FACTOR(l0_38m, "l0-38m", "ltepll0", 32, 1, 0);
static CLK_FIXED_FACTOR(l1_38m, "l1-38m", "ltepll1", 32, 1, 0);
static CLK_FIXED_FACTOR(rpll0_192m, "rpll0-192m", "rpll0", 6, 1, 0);
static CLK_FIXED_FACTOR(rpll0_96m, "rpll0-96m", "rpll0", 12, 1, 0);
static CLK_FIXED_FACTOR(rpll0_48m, "rpll0-48m", "rpll0", 24, 1, 0);
static CLK_FIXED_FACTOR(rpll1_468m, "rpll1-468m", "rpll1", 2, 1, 0);
static CLK_FIXED_FACTOR(rpll1_192m, "rpll1-192m", "rpll1", 6, 1, 0);
static CLK_FIXED_FACTOR(rpll1_96m, "rpll1-96m", "rpll1", 12, 1, 0);
static CLK_FIXED_FACTOR(rpll1_64m, "rpll1-64m", "rpll1", 18, 1, 0);
static CLK_FIXED_FACTOR(rpll1_48m, "rpll1-48m", "rpll1", 24, 1, 0);
static CLK_FIXED_FACTOR(dpll0_50m, "dpll0-50m", "dpll0", 16, 1, 0);
static CLK_FIXED_FACTOR(dpll1_50m, "dpll1-50m", "dpll1", 16, 1, 0);
static CLK_FIXED_FACTOR(cppll_50m, "cppll-50m", "cppll", 18, 1, 0);
static CLK_FIXED_FACTOR(m0_39m, "m0-39m", "mpll0", 32, 1, 0);
static CLK_FIXED_FACTOR(m1_63m, "m1-63m", "mpll1", 32, 1, 0);
static struct sprd_clk_common *sc9860_pll_clks[] = …;
static struct clk_hw_onecell_data sc9860_pll_hws = …;
static const struct sprd_clk_desc sc9860_pll_desc = …;
#define SC9860_MUX_FLAG …
static const char * const ap_apb_parents[] = …;
static SPRD_MUX_CLK(ap_apb, "ap-apb", ap_apb_parents,
0x20, 0, 1, SC9860_MUX_FLAG);
static const char * const ap_apb_usb3[] = …;
static SPRD_MUX_CLK(ap_usb3, "ap-usb3", ap_apb_usb3,
0x2c, 0, 1, SC9860_MUX_FLAG);
static const char * const uart_parents[] = …;
static SPRD_COMP_CLK(uart0_clk, "uart0", uart_parents, 0x30,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(uart1_clk, "uart1", uart_parents, 0x34,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(uart2_clk, "uart2", uart_parents, 0x38,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(uart3_clk, "uart3", uart_parents, 0x3c,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(uart4_clk, "uart4", uart_parents, 0x40,
0, 2, 8, 3, 0);
static const char * const i2c_parents[] = …;
static SPRD_COMP_CLK(i2c0_clk, "i2c0", i2c_parents, 0x44,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(i2c1_clk, "i2c1", i2c_parents, 0x48,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(i2c2_clk, "i2c2", i2c_parents, 0x4c,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(i2c3_clk, "i2c3", i2c_parents, 0x50,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(i2c4_clk, "i2c4", i2c_parents, 0x54,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(i2c5_clk, "i2c5", i2c_parents, 0x58,
0, 2, 8, 3, 0);
static const char * const spi_parents[] = …;
static SPRD_COMP_CLK(spi0_clk, "spi0", spi_parents, 0x5c,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(spi1_clk, "spi1", spi_parents, 0x60,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(spi2_clk, "spi2", spi_parents, 0x64,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(spi3_clk, "spi3", spi_parents, 0x68,
0, 2, 8, 3, 0);
static const char * const iis_parents[] = …;
static SPRD_COMP_CLK(iis0_clk, "iis0", iis_parents, 0x6c,
0, 2, 8, 6, 0);
static SPRD_COMP_CLK(iis1_clk, "iis1", iis_parents, 0x70,
0, 2, 8, 6, 0);
static SPRD_COMP_CLK(iis2_clk, "iis2", iis_parents, 0x74,
0, 2, 8, 6, 0);
static SPRD_COMP_CLK(iis3_clk, "iis3", iis_parents, 0x78,
0, 2, 8, 6, 0);
static struct sprd_clk_common *sc9860_ap_clks[] = …;
static struct clk_hw_onecell_data sc9860_ap_clk_hws = …;
static const struct sprd_clk_desc sc9860_ap_clk_desc = …;
static const char * const aon_apb_parents[] = …;
static SPRD_COMP_CLK(aon_apb, "aon-apb", aon_apb_parents, 0x230,
0, 3, 8, 2, 0);
static const char * const aux_parents[] = …;
static SPRD_COMP_CLK(aux0_clk, "aux0", aux_parents, 0x238,
0, 5, 8, 4, 0);
static SPRD_COMP_CLK(aux1_clk, "aux1", aux_parents, 0x23c,
0, 5, 8, 4, 0);
static SPRD_COMP_CLK(aux2_clk, "aux2", aux_parents, 0x240,
0, 5, 8, 4, 0);
static SPRD_COMP_CLK(probe_clk, "probe", aux_parents, 0x244,
0, 5, 8, 4, 0);
static const char * const sp_ahb_parents[] = …;
static SPRD_COMP_CLK(sp_ahb, "sp-ahb", sp_ahb_parents, 0x2d0,
0, 3, 8, 2, 0);
static const char * const cci_parents[] = …;
static SPRD_COMP_CLK(cci_clk, "cci", cci_parents, 0x300,
0, 2, 8, 2, 0);
static SPRD_COMP_CLK(gic_clk, "gic", cci_parents, 0x304,
0, 2, 8, 2, 0);
static SPRD_COMP_CLK(cssys_clk, "cssys", cci_parents, 0x310,
0, 2, 8, 2, 0);
static const char * const sdio_2x_parents[] = …;
static SPRD_COMP_CLK(sdio0_2x, "sdio0-2x", sdio_2x_parents, 0x328,
0, 3, 8, 4, 0);
static SPRD_COMP_CLK(sdio1_2x, "sdio1-2x", sdio_2x_parents, 0x330,
0, 3, 8, 4, 0);
static SPRD_COMP_CLK(sdio2_2x, "sdio2-2x", sdio_2x_parents, 0x338,
0, 3, 8, 4, 0);
static SPRD_COMP_CLK(emmc_2x, "emmc-2x", sdio_2x_parents, 0x340,
0, 3, 8, 4, 0);
static SPRD_DIV_CLK(sdio0_1x, "sdio0-1x", "sdio0-2x", 0x32c,
8, 1, 0);
static SPRD_DIV_CLK(sdio1_1x, "sdio1-1x", "sdio1-2x", 0x334,
8, 1, 0);
static SPRD_DIV_CLK(sdio2_1x, "sdio2-1x", "sdio2-2x", 0x33c,
8, 1, 0);
static SPRD_DIV_CLK(emmc_1x, "emmc-1x", "emmc-2x", 0x344,
8, 1, 0);
static const char * const adi_parents[] = …;
static SPRD_MUX_CLK(adi_clk, "adi", adi_parents, 0x234,
0, 3, SC9860_MUX_FLAG);
static const char * const pwm_parents[] = …;
static SPRD_MUX_CLK(pwm0_clk, "pwm0", pwm_parents, 0x248,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(pwm1_clk, "pwm1", pwm_parents, 0x24c,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(pwm2_clk, "pwm2", pwm_parents, 0x250,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(pwm3_clk, "pwm3", pwm_parents, 0x254,
0, 3, SC9860_MUX_FLAG);
static const char * const efuse_parents[] = …;
static SPRD_MUX_CLK(efuse_clk, "efuse", efuse_parents, 0x258,
0, 1, SC9860_MUX_FLAG);
static const char * const cm3_uart_parents[] = …;
static SPRD_MUX_CLK(cm3_uart0, "cm3-uart0", cm3_uart_parents, 0x25c,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(cm3_uart1, "cm3-uart1", cm3_uart_parents, 0x260,
0, 3, SC9860_MUX_FLAG);
static const char * const thm_parents[] = …;
static SPRD_MUX_CLK(thm_clk, "thm", thm_parents, 0x270,
0, 1, SC9860_MUX_FLAG);
static const char * const cm3_i2c_parents[] = …;
static SPRD_MUX_CLK(cm3_i2c0, "cm3-i2c0", cm3_i2c_parents, 0x274,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(cm3_i2c1, "cm3-i2c1", cm3_i2c_parents, 0x278,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(aon_i2c, "aon-i2c", cm3_i2c_parents, 0x280,
0, 3, SC9860_MUX_FLAG);
static const char * const cm4_spi_parents[] = …;
static SPRD_MUX_CLK(cm4_spi, "cm4-spi", cm4_spi_parents, 0x27c,
0, 3, SC9860_MUX_FLAG);
static SPRD_MUX_CLK(avs_clk, "avs", uart_parents, 0x284,
0, 2, SC9860_MUX_FLAG);
static const char * const ca53_dap_parents[] = …;
static SPRD_MUX_CLK(ca53_dap, "ca53-dap", ca53_dap_parents, 0x288,
0, 3, SC9860_MUX_FLAG);
static const char * const ca53_ts_parents[] = …;
static SPRD_MUX_CLK(ca53_ts, "ca53-ts", ca53_ts_parents, 0x290,
0, 2, SC9860_MUX_FLAG);
static const char * const djtag_tck_parents[] = …;
static SPRD_MUX_CLK(djtag_tck, "djtag-tck", djtag_tck_parents, 0x2c8,
0, 1, SC9860_MUX_FLAG);
static const char * const pmu_parents[] = …;
static SPRD_MUX_CLK(pmu_clk, "pmu", pmu_parents, 0x2e0,
0, 2, SC9860_MUX_FLAG);
static const char * const pmu_26m_parents[] = …;
static SPRD_MUX_CLK(pmu_26m, "pmu-26m", pmu_26m_parents, 0x2e4,
0, 1, SC9860_MUX_FLAG);
static const char * const debounce_parents[] = …;
static SPRD_MUX_CLK(debounce_clk, "debounce", debounce_parents, 0x2e8,
0, 2, SC9860_MUX_FLAG);
static const char * const otg2_ref_parents[] = …;
static SPRD_MUX_CLK(otg2_ref, "otg2-ref", otg2_ref_parents, 0x2f4,
0, 1, SC9860_MUX_FLAG);
static const char * const usb3_ref_parents[] = …;
static SPRD_MUX_CLK(usb3_ref, "usb3-ref", usb3_ref_parents, 0x2f8,
0, 2, SC9860_MUX_FLAG);
static const char * const ap_axi_parents[] = …;
static SPRD_MUX_CLK(ap_axi, "ap-axi", ap_axi_parents, 0x324,
0, 2, SC9860_MUX_FLAG);
static struct sprd_clk_common *sc9860_aon_prediv[] = …;
static struct clk_hw_onecell_data sc9860_aon_prediv_hws = …;
static const struct sprd_clk_desc sc9860_aon_prediv_desc = …;
static SPRD_SC_GATE_CLK(usb3_eb, "usb3-eb", "ap-axi", 0x0,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(usb3_suspend, "usb3-suspend", "ap-axi", 0x0,
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(usb3_ref_eb, "usb3-ref-eb", "ap-axi", 0x0,
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dma_eb, "dma-eb", "ap-axi", 0x0,
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(sdio0_eb, "sdio0-eb", "ap-axi", 0x0,
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(sdio1_eb, "sdio1-eb", "ap-axi", 0x0,
0x1000, BIT(8), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(sdio2_eb, "sdio2-eb", "ap-axi", 0x0,
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(emmc_eb, "emmc-eb", "ap-axi", 0x0,
0x1000, BIT(10), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(rom_eb, "rom-eb", "ap-axi", 0x0,
0x1000, BIT(12), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(busmon_eb, "busmon-eb", "ap-axi", 0x0,
0x1000, BIT(13), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(cc63s_eb, "cc63s-eb", "ap-axi", 0x0,
0x1000, BIT(22), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(cc63p_eb, "cc63p-eb", "ap-axi", 0x0,
0x1000, BIT(23), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ce0_eb, "ce0-eb", "ap-axi", 0x0,
0x1000, BIT(24), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ce1_eb, "ce1-eb", "ap-axi", 0x0,
0x1000, BIT(25), CLK_IGNORE_UNUSED, 0);
static struct sprd_clk_common *sc9860_apahb_gate[] = …;
static struct clk_hw_onecell_data sc9860_apahb_gate_hws = …;
static const struct sprd_clk_desc sc9860_apahb_gate_desc = …;
static SPRD_SC_GATE_CLK(avs_lit_eb, "avs-lit-eb", "aon-apb", 0x0,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(avs_big_eb, "avs-big-eb", "aon-apb", 0x0,
0x1000, BIT(1), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc5_eb, "ap-intc5-eb", "aon-apb", 0x0,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpio_eb, "gpio-eb", "aon-apb", 0x0,
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pwm0_eb, "pwm0-eb", "aon-apb", 0x0,
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pwm1_eb, "pwm1-eb", "aon-apb", 0x0,
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pwm2_eb, "pwm2-eb", "aon-apb", 0x0,
0x1000, BIT(6), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pwm3_eb, "pwm3-eb", "aon-apb", 0x0,
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(kpd_eb, "kpd-eb", "aon-apb", 0x0,
0x1000, BIT(8), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_sys_eb, "aon-sys-eb", "aon-apb", 0x0,
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_sys_eb, "ap-sys-eb", "aon-apb", 0x0,
0x1000, BIT(10), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_tmr_eb, "aon-tmr-eb", "aon-apb", 0x0,
0x1000, BIT(11), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr0_eb, "ap-tmr0-eb", "aon-apb", 0x0,
0x1000, BIT(12), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(efuse_eb, "efuse-eb", "aon-apb", 0x0,
0x1000, BIT(13), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(eic_eb, "eic-eb", "aon-apb", 0x0,
0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pub1_reg_eb, "pub1-reg-eb", "aon-apb", 0x0,
0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(adi_eb, "adi-eb", "aon-apb", 0x0,
0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc0_eb, "ap-intc0-eb", "aon-apb", 0x0,
0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc1_eb, "ap-intc1-eb", "aon-apb", 0x0,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc2_eb, "ap-intc2-eb", "aon-apb", 0x0,
0x1000, BIT(19), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc3_eb, "ap-intc3-eb", "aon-apb", 0x0,
0x1000, BIT(20), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_intc4_eb, "ap-intc4-eb", "aon-apb", 0x0,
0x1000, BIT(21), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(splk_eb, "splk-eb", "aon-apb", 0x0,
0x1000, BIT(22), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(mspi_eb, "mspi-eb", "aon-apb", 0x0,
0x1000, BIT(23), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pub0_reg_eb, "pub0-reg-eb", "aon-apb", 0x0,
0x1000, BIT(24), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pin_eb, "pin-eb", "aon-apb", 0x0,
0x1000, BIT(25), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_ckg_eb, "aon-ckg-eb", "aon-apb", 0x0,
0x1000, BIT(26), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpu_eb, "gpu-eb", "aon-apb", 0x0,
0x1000, BIT(27), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(apcpu_ts0_eb, "apcpu-ts0-eb", "aon-apb", 0x0,
0x1000, BIT(28), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(apcpu_ts1_eb, "apcpu-ts1-eb", "aon-apb", 0x0,
0x1000, BIT(29), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dap_eb, "dap-eb", "aon-apb", 0x0,
0x1000, BIT(30), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c_eb, "i2c-eb", "aon-apb", 0x0,
0x1000, BIT(31), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(pmu_eb, "pmu-eb", "aon-apb", 0x4,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(thm_eb, "thm-eb", "aon-apb", 0x4,
0x1000, BIT(1), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aux0_eb, "aux0-eb", "aon-apb", 0x4,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aux1_eb, "aux1-eb", "aon-apb", 0x4,
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aux2_eb, "aux2-eb", "aon-apb", 0x4,
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(probe_eb, "probe-eb", "aon-apb", 0x4,
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpu0_avs_eb, "gpu0-avs-eb", "aon-apb", 0x4,
0x1000, BIT(6), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpu1_avs_eb, "gpu1-avs-eb", "aon-apb", 0x4,
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(apcpu_wdg_eb, "apcpu-wdg-eb", "aon-apb", 0x4,
0x1000, BIT(8), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr1_eb, "ap-tmr1-eb", "aon-apb", 0x4,
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr2_eb, "ap-tmr2-eb", "aon-apb", 0x4,
0x1000, BIT(10), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(disp_emc_eb, "disp-emc-eb", "aon-apb", 0x4,
0x1000, BIT(11), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(zip_emc_eb, "zip-emc-eb", "aon-apb", 0x4,
0x1000, BIT(12), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gsp_emc_eb, "gsp-emc-eb", "aon-apb", 0x4,
0x1000, BIT(13), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(osc_aon_eb, "osc-aon-eb", "aon-apb", 0x4,
0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(lvds_trx_eb, "lvds-trx-eb", "aon-apb", 0x4,
0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(lvds_tcxo_eb, "lvds-tcxo-eb", "aon-apb", 0x4,
0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(mdar_eb, "mdar-eb", "aon-apb", 0x4,
0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(rtc4m0_cal_eb, "rtc4m0-cal-eb", "aon-apb", 0x4,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(rct100m_cal_eb, "rct100m-cal-eb", "aon-apb", 0x4,
0x1000, BIT(19), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(djtag_eb, "djtag-eb", "aon-apb", 0x4,
0x1000, BIT(20), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(mbox_eb, "mbox-eb", "aon-apb", 0x4,
0x1000, BIT(21), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_dma_eb, "aon-dma-eb", "aon-apb", 0x4,
0x1000, BIT(22), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dbg_emc_eb, "dbg-emc-eb", "aon-apb", 0x4,
0x1000, BIT(23), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(lvds_pll_div_en, "lvds-pll-div-en", "aon-apb", 0x4,
0x1000, BIT(24), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(def_eb, "def-eb", "aon-apb", 0x4,
0x1000, BIT(25), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_apb_rsv0, "aon-apb-rsv0", "aon-apb", 0x4,
0x1000, BIT(26), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(orp_jtag_eb, "orp-jtag-eb", "aon-apb", 0x4,
0x1000, BIT(27), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(vsp_eb, "vsp-eb", "aon-apb", 0x4,
0x1000, BIT(28), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(cam_eb, "cam-eb", "aon-apb", 0x4,
0x1000, BIT(29), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(disp_eb, "disp-eb", "aon-apb", 0x4,
0x1000, BIT(30), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dbg_axi_if_eb, "dbg-axi-if-eb", "aon-apb", 0x4,
0x1000, BIT(31), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(sdio0_2x_en, "sdio0-2x-en", "aon-apb", 0x13c,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(sdio1_2x_en, "sdio1-2x-en", "aon-apb", 0x13c,
0x1000, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(sdio2_2x_en, "sdio2-2x-en", "aon-apb", 0x13c,
0x1000, BIT(6), 0, 0);
static SPRD_SC_GATE_CLK(emmc_2x_en, "emmc-2x-en", "aon-apb", 0x13c,
0x1000, BIT(9), 0, 0);
static SPRD_SC_GATE_CLK(arch_rtc_eb, "arch-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(kpb_rtc_eb, "kpb-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(1), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_syst_rtc_eb, "aon-syst-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_syst_rtc_eb, "ap-syst-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(aon_tmr_rtc_eb, "aon-tmr-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr0_rtc_eb, "ap-tmr0-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(eic_rtc_eb, "eic-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(6), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(eic_rtcdv5_eb, "eic-rtcdv5-eb", "aon-apb", 0x10,
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_wdg_rtc_eb, "ap-wdg-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr1_rtc_eb, "ap-tmr1-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_tmr2_rtc_eb, "ap-tmr2-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(dcxo_tmr_rtc_eb, "dcxo-tmr-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(bb_cal_rtc_eb, "bb-cal-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(avs_big_rtc_eb, "avs-big-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(20), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(avs_lit_rtc_eb, "avs-lit-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(21), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(avs_gpu0_rtc_eb, "avs-gpu0-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(22), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(avs_gpu1_rtc_eb, "avs-gpu1-rtc-eb", "aon-apb", 0x10,
0x1000, BIT(23), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(gpu_ts_eb, "gpu-ts-eb", "aon-apb", 0x10,
0x1000, BIT(24), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(rtcdv10_eb, "rtcdv10-eb", "aon-apb", 0x10,
0x1000, BIT(27), CLK_IGNORE_UNUSED, 0);
static struct sprd_clk_common *sc9860_aon_gate[] = …;
static struct clk_hw_onecell_data sc9860_aon_gate_hws = …;
static const struct sprd_clk_desc sc9860_aon_gate_desc = …;
static const u8 mcu_table[] = …;
static const char * const lit_mcu_parents[] = …;
static SPRD_COMP_CLK_TABLE(lit_mcu, "lit-mcu", lit_mcu_parents, 0x20,
mcu_table, 0, 4, 4, 3, 0);
static const char * const big_mcu_parents[] = …;
static SPRD_COMP_CLK_TABLE(big_mcu, "big-mcu", big_mcu_parents, 0x24,
mcu_table, 0, 4, 4, 3, 0);
static struct sprd_clk_common *sc9860_aonsecure_clk[] = …;
static struct clk_hw_onecell_data sc9860_aonsecure_clk_hws = …;
static const struct sprd_clk_desc sc9860_aonsecure_clk_desc = …;
static SPRD_SC_GATE_CLK(agcp_iis0_eb, "agcp-iis0-eb", "aon-apb",
0x0, 0x100, BIT(0), 0, 0);
static SPRD_SC_GATE_CLK(agcp_iis1_eb, "agcp-iis1-eb", "aon-apb",
0x0, 0x100, BIT(1), 0, 0);
static SPRD_SC_GATE_CLK(agcp_iis2_eb, "agcp-iis2-eb", "aon-apb",
0x0, 0x100, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(agcp_iis3_eb, "agcp-iis3-eb", "aon-apb",
0x0, 0x100, BIT(3), 0, 0);
static SPRD_SC_GATE_CLK(agcp_uart_eb, "agcp-uart-eb", "aon-apb",
0x0, 0x100, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(agcp_dmacp_eb, "agcp-dmacp-eb", "aon-apb",
0x0, 0x100, BIT(5), 0, 0);
static SPRD_SC_GATE_CLK(agcp_dmaap_eb, "agcp-dmaap-eb", "aon-apb",
0x0, 0x100, BIT(6), 0, 0);
static SPRD_SC_GATE_CLK(agcp_arc48k_eb, "agcp-arc48k-eb", "aon-apb",
0x0, 0x100, BIT(10), 0, 0);
static SPRD_SC_GATE_CLK(agcp_src44p1k_eb, "agcp-src44p1k-eb", "aon-apb",
0x0, 0x100, BIT(11), 0, 0);
static SPRD_SC_GATE_CLK(agcp_mcdt_eb, "agcp-mcdt-eb", "aon-apb",
0x0, 0x100, BIT(12), 0, 0);
static SPRD_SC_GATE_CLK(agcp_vbcifd_eb, "agcp-vbcifd-eb", "aon-apb",
0x0, 0x100, BIT(13), 0, 0);
static SPRD_SC_GATE_CLK(agcp_vbc_eb, "agcp-vbc-eb", "aon-apb",
0x0, 0x100, BIT(14), 0, 0);
static SPRD_SC_GATE_CLK(agcp_spinlock_eb, "agcp-spinlock-eb", "aon-apb",
0x0, 0x100, BIT(15), 0, 0);
static SPRD_SC_GATE_CLK(agcp_icu_eb, "agcp-icu-eb", "aon-apb",
0x0, 0x100, BIT(16), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(agcp_ap_ashb_eb, "agcp-ap-ashb-eb", "aon-apb",
0x0, 0x100, BIT(17), 0, 0);
static SPRD_SC_GATE_CLK(agcp_cp_ashb_eb, "agcp-cp-ashb-eb", "aon-apb",
0x0, 0x100, BIT(18), 0, 0);
static SPRD_SC_GATE_CLK(agcp_aud_eb, "agcp-aud-eb", "aon-apb",
0x0, 0x100, BIT(19), 0, 0);
static SPRD_SC_GATE_CLK(agcp_audif_eb, "agcp-audif-eb", "aon-apb",
0x0, 0x100, BIT(20), 0, 0);
static struct sprd_clk_common *sc9860_agcp_gate[] = …;
static struct clk_hw_onecell_data sc9860_agcp_gate_hws = …;
static const struct sprd_clk_desc sc9860_agcp_gate_desc = …;
static const char * const gpu_parents[] = …;
static SPRD_COMP_CLK(gpu_clk, "gpu", gpu_parents, 0x20,
0, 2, 8, 4, 0);
static struct sprd_clk_common *sc9860_gpu_clk[] = …;
static struct clk_hw_onecell_data sc9860_gpu_clk_hws = …;
static const struct sprd_clk_desc sc9860_gpu_clk_desc = …;
static const char * const ahb_parents[] = …;
static SPRD_MUX_CLK(ahb_vsp, "ahb-vsp", ahb_parents, 0x20,
0, 2, SC9860_MUX_FLAG);
static const char * const vsp_parents[] = …;
static SPRD_COMP_CLK(vsp_clk, "vsp", vsp_parents, 0x24, 0, 3, 8, 2, 0);
static const char * const dispc_parents[] = …;
static SPRD_COMP_CLK(vsp_enc, "vsp-enc", dispc_parents, 0x28, 0, 2, 8, 2, 0);
static const char * const vpp_parents[] = …;
static SPRD_MUX_CLK(vpp_clk, "vpp", vpp_parents, 0x2c,
0, 2, SC9860_MUX_FLAG);
static const char * const vsp_26m_parents[] = …;
static SPRD_MUX_CLK(vsp_26m, "vsp-26m", vsp_26m_parents, 0x30,
0, 1, SC9860_MUX_FLAG);
static struct sprd_clk_common *sc9860_vsp_clk[] = …;
static struct clk_hw_onecell_data sc9860_vsp_clk_hws = …;
static const struct sprd_clk_desc sc9860_vsp_clk_desc = …;
static SPRD_SC_GATE_CLK(vsp_dec_eb, "vsp-dec-eb", "ahb-vsp", 0x0,
0x1000, BIT(0), 0, 0);
static SPRD_SC_GATE_CLK(vsp_ckg_eb, "vsp-ckg-eb", "ahb-vsp", 0x0,
0x1000, BIT(1), 0, 0);
static SPRD_SC_GATE_CLK(vsp_mmu_eb, "vsp-mmu-eb", "ahb-vsp", 0x0,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(vsp_enc_eb, "vsp-enc-eb", "ahb-vsp", 0x0,
0x1000, BIT(3), 0, 0);
static SPRD_SC_GATE_CLK(vpp_eb, "vpp-eb", "ahb-vsp", 0x0,
0x1000, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(vsp_26m_eb, "vsp-26m-eb", "ahb-vsp", 0x0,
0x1000, BIT(5), 0, 0);
static SPRD_GATE_CLK(vsp_axi_gate, "vsp-axi-gate", "ahb-vsp", 0x8,
BIT(0), 0, 0);
static SPRD_GATE_CLK(vsp_enc_gate, "vsp-enc-gate", "ahb-vsp", 0x8,
BIT(1), 0, 0);
static SPRD_GATE_CLK(vpp_axi_gate, "vpp-axi-gate", "ahb-vsp", 0x8,
BIT(2), 0, 0);
static SPRD_GATE_CLK(vsp_bm_gate, "vsp-bm-gate", "ahb-vsp", 0x8,
BIT(8), 0, 0);
static SPRD_GATE_CLK(vsp_enc_bm_gate, "vsp-enc-bm-gate", "ahb-vsp", 0x8,
BIT(9), 0, 0);
static SPRD_GATE_CLK(vpp_bm_gate, "vpp-bm-gate", "ahb-vsp", 0x8,
BIT(10), 0, 0);
static struct sprd_clk_common *sc9860_vsp_gate[] = …;
static struct clk_hw_onecell_data sc9860_vsp_gate_hws = …;
static const struct sprd_clk_desc sc9860_vsp_gate_desc = …;
static SPRD_MUX_CLK(ahb_cam, "ahb-cam", ahb_parents, 0x20,
0, 2, SC9860_MUX_FLAG);
static const char * const sensor_parents[] = …;
static SPRD_COMP_CLK(sensor0_clk, "sensor0", sensor_parents, 0x24,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(sensor1_clk, "sensor1", sensor_parents, 0x28,
0, 2, 8, 3, 0);
static SPRD_COMP_CLK(sensor2_clk, "sensor2", sensor_parents, 0x2c,
0, 2, 8, 3, 0);
static SPRD_GATE_CLK(mipi_csi0_eb, "mipi-csi0-eb", "ahb-cam", 0x4c,
BIT(16), 0, 0);
static SPRD_GATE_CLK(mipi_csi1_eb, "mipi-csi1-eb", "ahb-cam", 0x50,
BIT(16), 0, 0);
static struct sprd_clk_common *sc9860_cam_clk[] = …;
static struct clk_hw_onecell_data sc9860_cam_clk_hws = …;
static const struct sprd_clk_desc sc9860_cam_clk_desc = …;
static SPRD_SC_GATE_CLK(dcam0_eb, "dcam0-eb", "ahb-cam", 0x0,
0x1000, BIT(0), 0, 0);
static SPRD_SC_GATE_CLK(dcam1_eb, "dcam1-eb", "ahb-cam", 0x0,
0x1000, BIT(1), 0, 0);
static SPRD_SC_GATE_CLK(isp0_eb, "isp0-eb", "ahb-cam", 0x0,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(csi0_eb, "csi0-eb", "ahb-cam", 0x0,
0x1000, BIT(3), 0, 0);
static SPRD_SC_GATE_CLK(csi1_eb, "csi1-eb", "ahb-cam", 0x0,
0x1000, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(jpg0_eb, "jpg0-eb", "ahb-cam", 0x0,
0x1000, BIT(5), 0, 0);
static SPRD_SC_GATE_CLK(jpg1_eb, "jpg1-eb", "ahb-cam", 0x0,
0x1000, BIT(6), 0, 0);
static SPRD_SC_GATE_CLK(cam_ckg_eb, "cam-ckg-eb", "ahb-cam", 0x0,
0x1000, BIT(7), 0, 0);
static SPRD_SC_GATE_CLK(cam_mmu_eb, "cam-mmu-eb", "ahb-cam", 0x0,
0x1000, BIT(8), 0, 0);
static SPRD_SC_GATE_CLK(isp1_eb, "isp1-eb", "ahb-cam", 0x0,
0x1000, BIT(9), 0, 0);
static SPRD_SC_GATE_CLK(cpp_eb, "cpp-eb", "ahb-cam", 0x0,
0x1000, BIT(10), 0, 0);
static SPRD_SC_GATE_CLK(mmu_pf_eb, "mmu-pf-eb", "ahb-cam", 0x0,
0x1000, BIT(11), 0, 0);
static SPRD_SC_GATE_CLK(isp2_eb, "isp2-eb", "ahb-cam", 0x0,
0x1000, BIT(12), 0, 0);
static SPRD_SC_GATE_CLK(dcam2isp_if_eb, "dcam2isp-if-eb", "ahb-cam", 0x0,
0x1000, BIT(13), 0, 0);
static SPRD_SC_GATE_CLK(isp2dcam_if_eb, "isp2dcam-if-eb", "ahb-cam", 0x0,
0x1000, BIT(14), 0, 0);
static SPRD_SC_GATE_CLK(isp_lclk_eb, "isp-lclk-eb", "ahb-cam", 0x0,
0x1000, BIT(15), 0, 0);
static SPRD_SC_GATE_CLK(isp_iclk_eb, "isp-iclk-eb", "ahb-cam", 0x0,
0x1000, BIT(16), 0, 0);
static SPRD_SC_GATE_CLK(isp_mclk_eb, "isp-mclk-eb", "ahb-cam", 0x0,
0x1000, BIT(17), 0, 0);
static SPRD_SC_GATE_CLK(isp_pclk_eb, "isp-pclk-eb", "ahb-cam", 0x0,
0x1000, BIT(18), 0, 0);
static SPRD_SC_GATE_CLK(isp_isp2dcam_eb, "isp-isp2dcam-eb", "ahb-cam", 0x0,
0x1000, BIT(19), 0, 0);
static SPRD_SC_GATE_CLK(dcam0_if_eb, "dcam0-if-eb", "ahb-cam", 0x0,
0x1000, BIT(20), 0, 0);
static SPRD_SC_GATE_CLK(clk26m_if_eb, "clk26m-if-eb", "ahb-cam", 0x0,
0x1000, BIT(21), 0, 0);
static SPRD_GATE_CLK(cphy0_gate, "cphy0-gate", "ahb-cam", 0x8,
BIT(0), 0, 0);
static SPRD_GATE_CLK(mipi_csi0_gate, "mipi-csi0-gate", "ahb-cam", 0x8,
BIT(1), 0, 0);
static SPRD_GATE_CLK(cphy1_gate, "cphy1-gate", "ahb-cam", 0x8,
BIT(2), 0, 0);
static SPRD_GATE_CLK(mipi_csi1, "mipi-csi1", "ahb-cam", 0x8,
BIT(3), 0, 0);
static SPRD_GATE_CLK(dcam0_axi_gate, "dcam0-axi-gate", "ahb-cam", 0x8,
BIT(4), 0, 0);
static SPRD_GATE_CLK(dcam1_axi_gate, "dcam1-axi-gate", "ahb-cam", 0x8,
BIT(5), 0, 0);
static SPRD_GATE_CLK(sensor0_gate, "sensor0-gate", "ahb-cam", 0x8,
BIT(6), 0, 0);
static SPRD_GATE_CLK(sensor1_gate, "sensor1-gate", "ahb-cam", 0x8,
BIT(7), 0, 0);
static SPRD_GATE_CLK(jpg0_axi_gate, "jpg0-axi-gate", "ahb-cam", 0x8,
BIT(8), 0, 0);
static SPRD_GATE_CLK(gpg1_axi_gate, "gpg1-axi-gate", "ahb-cam", 0x8,
BIT(9), 0, 0);
static SPRD_GATE_CLK(isp0_axi_gate, "isp0-axi-gate", "ahb-cam", 0x8,
BIT(10), 0, 0);
static SPRD_GATE_CLK(isp1_axi_gate, "isp1-axi-gate", "ahb-cam", 0x8,
BIT(11), 0, 0);
static SPRD_GATE_CLK(isp2_axi_gate, "isp2-axi-gate", "ahb-cam", 0x8,
BIT(12), 0, 0);
static SPRD_GATE_CLK(cpp_axi_gate, "cpp-axi-gate", "ahb-cam", 0x8,
BIT(13), 0, 0);
static SPRD_GATE_CLK(d0_if_axi_gate, "d0-if-axi-gate", "ahb-cam", 0x8,
BIT(14), 0, 0);
static SPRD_GATE_CLK(d2i_if_axi_gate, "d2i-if-axi-gate", "ahb-cam", 0x8,
BIT(15), 0, 0);
static SPRD_GATE_CLK(i2d_if_axi_gate, "i2d-if-axi-gate", "ahb-cam", 0x8,
BIT(16), 0, 0);
static SPRD_GATE_CLK(spare_axi_gate, "spare-axi-gate", "ahb-cam", 0x8,
BIT(17), 0, 0);
static SPRD_GATE_CLK(sensor2_gate, "sensor2-gate", "ahb-cam", 0x8,
BIT(18), 0, 0);
static SPRD_SC_GATE_CLK(d0if_in_d_en, "d0if-in-d-en", "ahb-cam", 0x28,
0x1000, BIT(0), 0, 0);
static SPRD_SC_GATE_CLK(d1if_in_d_en, "d1if-in-d-en", "ahb-cam", 0x28,
0x1000, BIT(1), 0, 0);
static SPRD_SC_GATE_CLK(d0if_in_d2i_en, "d0if-in-d2i-en", "ahb-cam", 0x28,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(d1if_in_d2i_en, "d1if-in-d2i-en", "ahb-cam", 0x28,
0x1000, BIT(3), 0, 0);
static SPRD_SC_GATE_CLK(ia_in_d2i_en, "ia-in-d2i-en", "ahb-cam", 0x28,
0x1000, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(ib_in_d2i_en, "ib-in-d2i-en", "ahb-cam", 0x28,
0x1000, BIT(5), 0, 0);
static SPRD_SC_GATE_CLK(ic_in_d2i_en, "ic-in-d2i-en", "ahb-cam", 0x28,
0x1000, BIT(6), 0, 0);
static SPRD_SC_GATE_CLK(ia_in_i_en, "ia-in-i-en", "ahb-cam", 0x28,
0x1000, BIT(7), 0, 0);
static SPRD_SC_GATE_CLK(ib_in_i_en, "ib-in-i-en", "ahb-cam", 0x28,
0x1000, BIT(8), 0, 0);
static SPRD_SC_GATE_CLK(ic_in_i_en, "ic-in-i-en", "ahb-cam", 0x28,
0x1000, BIT(9), 0, 0);
static struct sprd_clk_common *sc9860_cam_gate[] = …;
static struct clk_hw_onecell_data sc9860_cam_gate_hws = …;
static const struct sprd_clk_desc sc9860_cam_gate_desc = …;
static SPRD_MUX_CLK(ahb_disp, "ahb-disp", ahb_parents, 0x20,
0, 2, SC9860_MUX_FLAG);
static SPRD_COMP_CLK(dispc0_dpi, "dispc0-dpi", dispc_parents, 0x34,
0, 2, 8, 2, 0);
static SPRD_COMP_CLK(dispc1_dpi, "dispc1-dpi", dispc_parents, 0x40,
0, 2, 8, 2, 0);
static struct sprd_clk_common *sc9860_disp_clk[] = …;
static struct clk_hw_onecell_data sc9860_disp_clk_hws = …;
static const struct sprd_clk_desc sc9860_disp_clk_desc = …;
static SPRD_SC_GATE_CLK(dispc0_eb, "dispc0-eb", "ahb-disp", 0x0,
0x1000, BIT(0), 0, 0);
static SPRD_SC_GATE_CLK(dispc1_eb, "dispc1-eb", "ahb-disp", 0x0,
0x1000, BIT(1), 0, 0);
static SPRD_SC_GATE_CLK(dispc_mmu_eb, "dispc-mmu-eb", "ahb-disp", 0x0,
0x1000, BIT(2), 0, 0);
static SPRD_SC_GATE_CLK(gsp0_eb, "gsp0-eb", "ahb-disp", 0x0,
0x1000, BIT(3), 0, 0);
static SPRD_SC_GATE_CLK(gsp1_eb, "gsp1-eb", "ahb-disp", 0x0,
0x1000, BIT(4), 0, 0);
static SPRD_SC_GATE_CLK(gsp0_mmu_eb, "gsp0-mmu-eb", "ahb-disp", 0x0,
0x1000, BIT(5), 0, 0);
static SPRD_SC_GATE_CLK(gsp1_mmu_eb, "gsp1-mmu-eb", "ahb-disp", 0x0,
0x1000, BIT(6), 0, 0);
static SPRD_SC_GATE_CLK(dsi0_eb, "dsi0-eb", "ahb-disp", 0x0,
0x1000, BIT(7), 0, 0);
static SPRD_SC_GATE_CLK(dsi1_eb, "dsi1-eb", "ahb-disp", 0x0,
0x1000, BIT(8), 0, 0);
static SPRD_SC_GATE_CLK(disp_ckg_eb, "disp-ckg-eb", "ahb-disp", 0x0,
0x1000, BIT(9), 0, 0);
static SPRD_SC_GATE_CLK(disp_gpu_eb, "disp-gpu-eb", "ahb-disp", 0x0,
0x1000, BIT(10), 0, 0);
static SPRD_SC_GATE_CLK(gpu_mtx_eb, "gpu-mtx-eb", "ahb-disp", 0x0,
0x1000, BIT(13), 0, 0);
static SPRD_SC_GATE_CLK(gsp_mtx_eb, "gsp-mtx-eb", "ahb-disp", 0x0,
0x1000, BIT(14), 0, 0);
static SPRD_SC_GATE_CLK(tmc_mtx_eb, "tmc-mtx-eb", "ahb-disp", 0x0,
0x1000, BIT(15), 0, 0);
static SPRD_SC_GATE_CLK(dispc_mtx_eb, "dispc-mtx-eb", "ahb-disp", 0x0,
0x1000, BIT(16), 0, 0);
static SPRD_GATE_CLK(dphy0_gate, "dphy0-gate", "ahb-disp", 0x8,
BIT(0), 0, 0);
static SPRD_GATE_CLK(dphy1_gate, "dphy1-gate", "ahb-disp", 0x8,
BIT(1), 0, 0);
static SPRD_GATE_CLK(gsp0_a_gate, "gsp0-a-gate", "ahb-disp", 0x8,
BIT(2), 0, 0);
static SPRD_GATE_CLK(gsp1_a_gate, "gsp1-a-gate", "ahb-disp", 0x8,
BIT(3), 0, 0);
static SPRD_GATE_CLK(gsp0_f_gate, "gsp0-f-gate", "ahb-disp", 0x8,
BIT(4), 0, 0);
static SPRD_GATE_CLK(gsp1_f_gate, "gsp1-f-gate", "ahb-disp", 0x8,
BIT(5), 0, 0);
static SPRD_GATE_CLK(d_mtx_f_gate, "d-mtx-f-gate", "ahb-disp", 0x8,
BIT(6), 0, 0);
static SPRD_GATE_CLK(d_mtx_a_gate, "d-mtx-a-gate", "ahb-disp", 0x8,
BIT(7), 0, 0);
static SPRD_GATE_CLK(d_noc_f_gate, "d-noc-f-gate", "ahb-disp", 0x8,
BIT(8), 0, 0);
static SPRD_GATE_CLK(d_noc_a_gate, "d-noc-a-gate", "ahb-disp", 0x8,
BIT(9), 0, 0);
static SPRD_GATE_CLK(gsp_mtx_f_gate, "gsp-mtx-f-gate", "ahb-disp", 0x8,
BIT(10), 0, 0);
static SPRD_GATE_CLK(gsp_mtx_a_gate, "gsp-mtx-a-gate", "ahb-disp", 0x8,
BIT(11), 0, 0);
static SPRD_GATE_CLK(gsp_noc_f_gate, "gsp-noc-f-gate", "ahb-disp", 0x8,
BIT(12), 0, 0);
static SPRD_GATE_CLK(gsp_noc_a_gate, "gsp-noc-a-gate", "ahb-disp", 0x8,
BIT(13), 0, 0);
static SPRD_GATE_CLK(dispm0idle_gate, "dispm0idle-gate", "ahb-disp", 0x8,
BIT(14), 0, 0);
static SPRD_GATE_CLK(gspm0idle_gate, "gspm0idle-gate", "ahb-disp", 0x8,
BIT(15), 0, 0);
static struct sprd_clk_common *sc9860_disp_gate[] = …;
static struct clk_hw_onecell_data sc9860_disp_gate_hws = …;
static const struct sprd_clk_desc sc9860_disp_gate_desc = …;
static SPRD_SC_GATE_CLK(sim0_eb, "sim0-eb", "ap-apb", 0x0,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(iis0_eb, "iis0-eb", "ap-apb", 0x0,
0x1000, BIT(1), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(iis1_eb, "iis1-eb", "ap-apb", 0x0,
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(iis2_eb, "iis2-eb", "ap-apb", 0x0,
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(iis3_eb, "iis3-eb", "ap-apb", 0x0,
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(spi0_eb, "spi0-eb", "ap-apb", 0x0,
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(spi1_eb, "spi1-eb", "ap-apb", 0x0,
0x1000, BIT(6), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(spi2_eb, "spi2-eb", "ap-apb", 0x0,
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c0_eb, "i2c0-eb", "ap-apb", 0x0,
0x1000, BIT(8), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c1_eb, "i2c1-eb", "ap-apb", 0x0,
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c2_eb, "i2c2-eb", "ap-apb", 0x0,
0x1000, BIT(10), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c3_eb, "i2c3-eb", "ap-apb", 0x0,
0x1000, BIT(11), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c4_eb, "i2c4-eb", "ap-apb", 0x0,
0x1000, BIT(12), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(i2c5_eb, "i2c5-eb", "ap-apb", 0x0,
0x1000, BIT(13), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(uart0_eb, "uart0-eb", "ap-apb", 0x0,
0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(uart1_eb, "uart1-eb", "ap-apb", 0x0,
0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(uart2_eb, "uart2-eb", "ap-apb", 0x0,
0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(uart3_eb, "uart3-eb", "ap-apb", 0x0,
0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(uart4_eb, "uart4-eb", "ap-apb", 0x0,
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(ap_ckg_eb, "ap-ckg-eb", "ap-apb", 0x0,
0x1000, BIT(19), CLK_IGNORE_UNUSED, 0);
static SPRD_SC_GATE_CLK(spi3_eb, "spi3-eb", "ap-apb", 0x0,
0x1000, BIT(20), CLK_IGNORE_UNUSED, 0);
static struct sprd_clk_common *sc9860_apapb_gate[] = …;
static struct clk_hw_onecell_data sc9860_apapb_gate_hws = …;
static const struct sprd_clk_desc sc9860_apapb_gate_desc = …;
static const struct of_device_id sprd_sc9860_clk_ids[] = …;
MODULE_DEVICE_TABLE(of, sprd_sc9860_clk_ids);
static int sc9860_clk_probe(struct platform_device *pdev)
{ … }
static struct platform_driver sc9860_clk_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;