"pll-audio-2x", "pll-audio" }; static SUNXI_CCU_MUX_WITH_GATE(i2s_clk, "i2s", i2s_parents, 0x0b8, 16, 2, BIT(31), CLK_SET_RATE_PARENT); static const char * const spdif_parents[] = { "pll-audio-8x", "pll-audio-4x", "pll-audio-2x", "pll-audio" }; static SUNXI_CCU_MUX_WITH_GATE(spdif_clk, "spdif", spdif_parents, 0x0c0, 16, 2, BIT(31), CLK_SET_RATE_PARENT); static const char * const keypad_parents[] = { "hosc", "losc"}; static const u8 keypad_table[] = { 0, 2 }; static struct ccu_mp keypad_clk = { .enable = BIT(31), .m = _SUNXI_CCU_DIV(8, 5), .p = _SUNXI_CCU_DIV(20, 2), .mux = _SUNXI_CCU_MUX_TABLE(24, 2, keypad_table), .common = { .reg = 0x0c4, .hw.init = CLK_HW_INIT_PARENTS("keypad", keypad_parents, &ccu_mp_ops, 0), }, }; static SUNXI_CCU_GATE(usb_ohci_clk, "usb-ohci", "pll-periph", 0x0cc, BIT(6), 0); static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "pll-periph", 0x0cc, BIT(8), 0); static SUNXI_CCU_GATE(usb_phy1_clk, "usb-phy1", "pll-periph",
static SUNXI_CCU_MP_WITH_MUX_GATE(ts_clk, "ts", mod0_default_parents, 0x428, 0, 4, /* M */ 16, 2, /* P */ 24, 4, /* mux */ BIT(31), /* gate */ 0); static const char * const ss_parents[] = { "osc24M", "pll-periph", "pll-periph1" }; static const u8 ss_table[] = { 0, 1, 13 }; static struct ccu_mp ss_clk = { .enable = BIT(31), .m = _SUNXI_CCU_DIV(0, 4), .p = _SUNXI_CCU_DIV(16, 2), .mux = _SUNXI_CCU_MUX_TABLE(24, 4, ss_table), .common = { .reg = 0x42c, .hw.init = CLK_HW_INIT_PARENTS("ss", ss_parents, &ccu_mp_ops, 0), }, }; static SUNXI_CCU_MP_WITH_MUX_GATE(spi0_clk, "spi0", mod0_default_parents, 0x430, 0, 4, /* M */ 16, 2, /* P */ 24, 4, /* mux */ BIT(31), /* gate */
0x12c, 0, 4, 24, 3, BIT(31), CLK_SET_RATE_PARENT); static const char * const csi_sclk_parents[] = { "pll-video0", "pll-video1", "pll9", "pll10", "pll-mipi", "pll-ve" }; static SUNXI_CCU_M_WITH_MUX_GATE(csi0_sclk_clk, "csi0-sclk", csi_sclk_parents, 0x134, 16, 4, 24, 3, BIT(31), 0); static const char * const csi_mclk_parents[] = { "pll-video0", "pll-video1", "osc24M" }; static const u8 csi_mclk_table[] = { 0, 1, 5 }; static struct ccu_div csi0_mclk_clk = { .enable = BIT(15), .div = _SUNXI_CCU_DIV(0, 4), .mux = _SUNXI_CCU_MUX_TABLE(8, 3, csi_mclk_table), .common = { .reg = 0x134, .hw.init = CLK_HW_INIT_PARENTS("csi0-mclk", csi_mclk_parents, &ccu_div_ops, 0), }, }; static struct ccu_div csi1_mclk_clk = { .enable = BIT(15), .div = _SUNXI_CCU_DIV(0, 4), .mux = _SUNXI_CCU_MUX_TABLE(8, 3, csi_mclk_table), .common = { .reg = 0x138,
static const char * const de_parents[] = { "pll-periph0-2x", "pll-de" }; static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents, 0x104, 0, 4, 24, 3, BIT(31), 0); static const char * const tcon0_parents[] = { "pll-mipi", "pll-video0-2x" }; static const u8 tcon0_table[] = { 0, 2, }; static SUNXI_CCU_MUX_TABLE_WITH_GATE(tcon0_clk, "tcon0", tcon0_parents, tcon0_table, 0x118, 24, 3, BIT(31), CLK_SET_RATE_PARENT); static const char * const tcon1_parents[] = { "pll-video0", "pll-video1" }; static const u8 tcon1_table[] = { 0, 2, }; static struct ccu_div tcon1_clk = { .enable = BIT(31), .div = _SUNXI_CCU_DIV(0, 4), .mux = _SUNXI_CCU_MUX_TABLE(24, 2, tcon1_table), .common = { .reg = 0x11c, .hw.init = CLK_HW_INIT_PARENTS("tcon1", tcon1_parents, &ccu_div_ops, CLK_SET_RATE_PARENT), }, }; static const char * const deinterlace_parents[] = { "pll-periph0", "pll-periph1" }; static SUNXI_CCU_M_WITH_MUX_GATE(deinterlace_clk, "deinterlace", deinterlace_parents, 0x124, 0, 4, 24, 3, BIT(31), 0); static SUNXI_CCU_GATE(csi_misc_clk, "csi-misc", "osc24M", 0x130, BIT(31), 0);