},
};
+static struct meson_clk_pll g12b_sys1_pll = {
+ .m = {
+ .reg_off = HHI_SYS1_PLL_CNTL0,
+ .shift = 0,
+ .width = 9,
+ },
+ .n = {
+ .reg_off = HHI_SYS1_PLL_CNTL0,
+ .shift = 10,
+ .width = 5,
+ },
+ .od = {
+ .reg_off = HHI_SYS1_PLL_CNTL0,
+ .shift = 16,
+ .width = 3,
+ },
+ .rate_table = g12a_pll_rate_table,
+ .rate_count = ARRAY_SIZE(g12a_pll_rate_table),
+ .lock = &clk_lock,
+ .hw.init = &(struct clk_init_data){
+ .name = "sys1_pll",
+ .ops = &meson_g12a_pll_ops,
+ .parent_names = (const char *[]){ "xtal" },
+ .num_parents = 1,
+ .flags = CLK_GET_RATE_NOCACHE,
+ },
+};
+
static struct meson_clk_pll g12a_gp0_pll = {
.m = {
.reg_off = HHI_GP0_PLL_CNTL0,
static struct clk_hw *g12a_clk_hws[] = {
[CLKID_SYS_PLL] = &g12a_sys_pll.hw,
+ [CLKID_SYS1_PLL] = &g12b_sys1_pll.hw,
[CLKID_FIXED_PLL] = &g12a_fixed_pll.hw,
[CLKID_GP0_PLL] = &g12a_gp0_pll.hw,
[CLKID_HIFI_PLL] = &g12a_hifi_pll.hw,
static struct meson_clk_pll *const g12a_clk_plls[] = {
&g12a_fixed_pll,
&g12a_sys_pll,
+ &g12b_sys1_pll,
&g12a_gp0_pll,
&g12a_hifi_pll,
&g12a_pcie_pll,
#define HHI_SYS_PLL_CNTL5 0x308 /* 0xc2 offset in data sheet */
#define HHI_SYS_PLL_CNTL6 0x30c /* 0xc3 offset in data sheet */
+/* For G12B only */
+#define HHI_SYS1_PLL_CNTL0 0x380 /* 0xe0 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL1 0x384 /* 0xe1 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL2 0x388 /* 0xe2 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL3 0x38c /* 0xe3 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL4 0x390 /* 0xe4 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL5 0x394 /* 0xe5 offset in data sheet */
+#define HHI_SYS1_PLL_CNTL6 0x398 /* 0xe6 offset in data sheet */
+/*****************/
+
#define HHI_SPICC_CLK_CNTL 0x3dc /* 0xf7 offset in data sheet */
/* AO registers*/
#define AO_RTI_PWR_CNTL_REG0 0x10 /* 0x4 offset in data sheet */
#define CLKID_SPICC1_COMP (CLKID_MISC_BASE + 7)
#define CLKID_TS_COMP (CLKID_MISC_BASE + 8)
-#define CLKID_AO_BASE (CLKID_MISC_BASE + 9)
+/*G12B clk*/
+#define CLKID_G12B_ADD_BASE (CLKID_MISC_BASE + 9)
+#define CLKID_SYS1_PLL (CLKID_G12B_ADD_BASE + 0)
+
+#define CLKID_AO_BASE (CLKID_G12B_ADD_BASE + 1)
#define CLKID_AO_CLK81 (CLKID_AO_BASE + 0)
#define CLKID_SARADC_MUX (CLKID_AO_BASE + 1)
#define CLKID_SARADC_DIV (CLKID_AO_BASE + 2)