},
};
+/* GPIO 24M */
+static struct clk_gate g12a_24m = {
+ .reg = (void *)HHI_XTAL_DIVN_CNTL,
+ .bit_idx = 11,
+ .lock = &clk_lock,
+ .hw.init = &(struct clk_init_data){
+ .name = "g12a_24m",
+ .ops = &clk_gate_ops,
+ .parent_names = (const char *[]){ "xtal" },
+ .num_parents = 1,
+ .flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
+ },
+};
+
+/* GPIO 12M */
+static struct clk_divider g12a_12m_div = {
+ .reg = (void *)HHI_XTAL_DIVN_CNTL,
+ .shift = 10,
+ .width = 1,
+ .lock = &clk_lock,
+ .hw.init = &(struct clk_init_data){
+ .name = "g12a_12m_div",
+ .ops = &clk_divider_ops,
+ .parent_names = (const char *[]){ "xtal" },
+ .num_parents = 1,
+ .flags = CLK_SET_RATE_PARENT,
+ },
+};
+
+static struct clk_gate g12a_12m_gate = {
+ .reg = (void *)HHI_XTAL_DIVN_CNTL,
+ .bit_idx = 11,
+ .lock = &clk_lock,
+ .hw.init = &(struct clk_init_data){
+ .name = "g12a_12m_gate",
+ .ops = &clk_gate_ops,
+ .parent_names = (const char *[]){ "g12a_12m_div" },
+ .num_parents = 1,
+ .flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
+ },
+};
+
+
/* Everything Else (EE) domain gates */
static MESON_GATE(g12a_ddr, HHI_GCLK_MPEG0, 0);
static MESON_GATE(g12a_dos, HHI_GCLK_MPEG0, 1);
[CLKID_CPU_CLK] = &g12a_cpu_clk.mux.hw,
[CLKID_PCIE_PLL] = &g12a_pcie_pll.hw,
+ [CLKID_24M] = &g12a_24m.hw,
+ [CLKID_12M_DIV] = &g12a_12m_div.hw,
+ [CLKID_12M_GATE] = &g12a_12m_gate.hw,
};
/* Convenience tables to populate base addresses in .probe */
&g12a_vclk2_venclmmc,
&g12a_vclk2_vencl,
&g12a_vclk2_other1,
+ &g12a_24m,
+ &g12a_12m_gate,
};
static void __init g12a_clkc_init(struct device_node *np)
g12a_mpeg_clk_sel.reg = clk_base + (u64)g12a_mpeg_clk_sel.reg;
g12a_mpeg_clk_div.reg = clk_base + (u64)g12a_mpeg_clk_div.reg;
+ g12a_12m_div.reg = clk_base + (u64)g12a_12m_div.reg;
+
/* Populate base address for gates */
for (i = 0; i < ARRAY_SIZE(g12a_clk_gates); i++)
g12a_clk_gates[i]->reg = clk_base +
#define CLKID_SPICC1_COMP (CLKID_MISC_BASE + 7)
#define CLKID_TS_COMP (CLKID_MISC_BASE + 8)
+/*gpio 12M/24M */
+#define CLKID_24M (CLKID_MISC_BASE + 9)
+#define CLKID_12M_DIV (CLKID_MISC_BASE + 10)
+#define CLKID_12M_GATE (CLKID_MISC_BASE + 11)
+
/*G12B clk*/
-#define CLKID_G12B_ADD_BASE (CLKID_MISC_BASE + 9)
+#define CLKID_G12B_ADD_BASE (CLKID_MISC_BASE + 12)
#define CLKID_CPUB_FCLK_P (CLKID_G12B_ADD_BASE + 0)
#define CLKID_CPUB_CLK (CLKID_G12B_ADD_BASE + 1)
/*G12B gate*/