Lines Matching +full:- +full:dig +full:- +full:div

1 // SPDX-License-Identifier: GPL-2.0-only
6 #include <linux/clk-provider.h>
24 #include "ccu-sun8i-a23-a33.h"
38 .hw.init = CLK_HW_INIT("pll-cpux", "osc24M",
49 * With sigma-delta modulation for fractional-N on the audio PLL,
63 static SUNXI_CCU_NM_WITH_SDM_GATE_LOCK(pll_audio_base_clk, "pll-audio-base",
73 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video_clk, "pll-video",
85 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve",
97 static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_ddr_clk, "pll-ddr",
106 static SUNXI_CCU_NK_WITH_GATE_LOCK_POSTDIV(pll_periph_clk, "pll-periph",
112 2, /* post-div */
115 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_gpu_clk, "pll-gpu",
130 * The MIPI mode is a standard NKM-style clock. The HDMI mode is an
135 static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_mipi_clk, "pll-mipi",
136 "pll-video", 0x040,
144 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_hsic_clk, "pll-hsic",
156 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_de_clk, "pll-de",
169 "pll-cpux" , "pll-cpux" };
176 "axi" , "pll-periph" };
181 .div = _SUNXI_CCU_DIV_FLAGS(4, 2, CLK_DIVIDER_POWER_OF_TWO),
202 { .val = 0, .div = 2 },
203 { .val = 1, .div = 2 },
204 { .val = 2, .div = 4 },
205 { .val = 3, .div = 8 },
212 "pll-periph" , "pll-periph" };
219 static SUNXI_CCU_GATE(bus_mipi_dsi_clk, "bus-mipi-dsi", "ahb1",
221 static SUNXI_CCU_GATE(bus_dma_clk, "bus-dma", "ahb1",
223 static SUNXI_CCU_GATE(bus_mmc0_clk, "bus-mmc0", "ahb1",
225 static SUNXI_CCU_GATE(bus_mmc1_clk, "bus-mmc1", "ahb1",
227 static SUNXI_CCU_GATE(bus_mmc2_clk, "bus-mmc2", "ahb1",
229 static SUNXI_CCU_GATE(bus_nand_clk, "bus-nand", "ahb1",
231 static SUNXI_CCU_GATE(bus_dram_clk, "bus-dram", "ahb1",
233 static SUNXI_CCU_GATE(bus_hstimer_clk, "bus-hstimer", "ahb1",
235 static SUNXI_CCU_GATE(bus_spi0_clk, "bus-spi0", "ahb1",
237 static SUNXI_CCU_GATE(bus_spi1_clk, "bus-spi1", "ahb1",
239 static SUNXI_CCU_GATE(bus_otg_clk, "bus-otg", "ahb1",
241 static SUNXI_CCU_GATE(bus_ehci_clk, "bus-ehci", "ahb1",
243 static SUNXI_CCU_GATE(bus_ohci_clk, "bus-ohci", "ahb1",
246 static SUNXI_CCU_GATE(bus_ve_clk, "bus-ve", "ahb1",
248 static SUNXI_CCU_GATE(bus_lcd_clk, "bus-lcd", "ahb1",
250 static SUNXI_CCU_GATE(bus_csi_clk, "bus-csi", "ahb1",
252 static SUNXI_CCU_GATE(bus_de_be_clk, "bus-de-be", "ahb1",
254 static SUNXI_CCU_GATE(bus_de_fe_clk, "bus-de-fe", "ahb1",
256 static SUNXI_CCU_GATE(bus_gpu_clk, "bus-gpu", "ahb1",
258 static SUNXI_CCU_GATE(bus_msgbox_clk, "bus-msgbox", "ahb1",
260 static SUNXI_CCU_GATE(bus_spinlock_clk, "bus-spinlock", "ahb1",
262 static SUNXI_CCU_GATE(bus_drc_clk, "bus-drc", "ahb1",
265 static SUNXI_CCU_GATE(bus_codec_clk, "bus-codec", "apb1",
267 static SUNXI_CCU_GATE(bus_pio_clk, "bus-pio", "apb1",
269 static SUNXI_CCU_GATE(bus_i2s0_clk, "bus-i2s0", "apb1",
271 static SUNXI_CCU_GATE(bus_i2s1_clk, "bus-i2s1", "apb1",
274 static SUNXI_CCU_GATE(bus_i2c0_clk, "bus-i2c0", "apb2",
276 static SUNXI_CCU_GATE(bus_i2c1_clk, "bus-i2c1", "apb2",
278 static SUNXI_CCU_GATE(bus_i2c2_clk, "bus-i2c2", "apb2",
280 static SUNXI_CCU_GATE(bus_uart0_clk, "bus-uart0", "apb2",
282 static SUNXI_CCU_GATE(bus_uart1_clk, "bus-uart1", "apb2",
284 static SUNXI_CCU_GATE(bus_uart2_clk, "bus-uart2", "apb2",
286 static SUNXI_CCU_GATE(bus_uart3_clk, "bus-uart3", "apb2",
288 static SUNXI_CCU_GATE(bus_uart4_clk, "bus-uart4", "apb2",
291 static const char * const mod0_default_parents[] = { "osc24M", "pll-periph" };
349 static const char * const i2s_parents[] = { "pll-audio-8x", "pll-audio-4x",
350 "pll-audio-2x", "pll-audio" };
358 static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
360 static SUNXI_CCU_GATE(usb_phy1_clk, "usb-phy1", "osc24M",
362 static SUNXI_CCU_GATE(usb_hsic_clk, "usb-hsic", "pll-hsic",
364 static SUNXI_CCU_GATE(usb_hsic_12M_clk, "usb-hsic-12M", "osc24M",
366 static SUNXI_CCU_GATE(usb_ohci_clk, "usb-ohci", "osc24M",
369 static SUNXI_CCU_GATE(dram_ve_clk, "dram-ve", "pll-ddr",
371 static SUNXI_CCU_GATE(dram_csi_clk, "dram-csi", "pll-ddr",
373 static SUNXI_CCU_GATE(dram_drc_clk, "dram-drc", "pll-ddr",
375 static SUNXI_CCU_GATE(dram_de_fe_clk, "dram-de-fe", "pll-ddr",
377 static SUNXI_CCU_GATE(dram_de_be_clk, "dram-de-be", "pll-ddr",
380 static const char * const de_parents[] = { "pll-video", "pll-periph-2x",
381 "pll-gpu", "pll-de" };
383 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(de_be_clk, "de-be",
387 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(de_fe_clk, "de-fe",
391 static const char * const lcd_ch0_parents[] = { "pll-video", "pll-video-2x",
392 "pll-mipi" };
394 static SUNXI_CCU_MUX_TABLE_WITH_GATE(lcd_ch0_clk, "lcd-ch0",
399 static const char * const lcd_ch1_parents[] = { "pll-video", "pll-video-2x" };
401 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(lcd_ch1_clk, "lcd-ch1",
405 static const char * const csi_sclk_parents[] = { "pll-video", "pll-de",
406 "pll-mipi", "pll-ve" };
408 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(csi_sclk_clk, "csi-sclk",
412 static const char * const csi_mclk_parents[] = { "pll-video", "pll-de",
415 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(csi_mclk_clk, "csi-mclk",
419 static SUNXI_CCU_M_WITH_GATE(ve_clk, "ve", "pll-ve",
422 static SUNXI_CCU_GATE(ac_dig_clk, "ac-dig", "pll-audio",
427 static const char * const mbus_parents[] = { "osc24M", "pll-periph-2x",
428 "pll-ddr" };
432 static const char * const dsi_sclk_parents[] = { "pll-video", "pll-video-2x" };
434 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(dsi_sclk_clk, "dsi-sclk",
438 static const char * const dsi_dphy_parents[] = { "pll-video", "pll-periph" };
440 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(dsi_dphy_clk, "dsi-dphy",
448 static SUNXI_CCU_M_WITH_GATE(gpu_clk, "gpu", "pll-gpu",
451 static const char * const ats_parents[] = { "osc24M", "pll-periph" };
551 static CLK_FIXED_FACTOR_HWS(pll_audio_clk, "pll-audio",
554 static CLK_FIXED_FACTOR_HWS(pll_audio_2x_clk, "pll-audio-2x",
557 static CLK_FIXED_FACTOR_HWS(pll_audio_4x_clk, "pll-audio-4x",
560 static CLK_FIXED_FACTOR_HWS(pll_audio_8x_clk, "pll-audio-8x",
563 static CLK_FIXED_FACTOR_HW(pll_periph_2x_clk, "pll-periph-2x",
566 static CLK_FIXED_FACTOR_HW(pll_video_2x_clk, "pll-video-2x",
738 /* Force the PLL-Audio-1x divider to 1 */ in sun8i_a23_ccu_setup()
743 /* Force PLL-MIPI to MIPI mode */ in sun8i_a23_ccu_setup()
750 CLK_OF_DECLARE(sun8i_a23_ccu, "allwinner,sun8i-a23-ccu",