Lines Matching +full:tcon +full:- +full:top

1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/clk-provider.h>
24 #include "ccu-sun50i-a100.h"
51 .hw.init = CLK_HW_INIT("pll-cpux", "dcxo24M",
67 .hw.init = CLK_HW_INIT("pll-ddr0", "dcxo24M",
85 .hw.init = CLK_HW_INIT("pll-periph0", "dcxo24M",
102 .hw.init = CLK_HW_INIT("pll-periph1", "dcxo24M",
118 .hw.init = CLK_HW_INIT("pll-gpu", "dcxo24M",
138 .hw.init = CLK_HW_INIT("pll-video0", "dcxo24M",
154 .hw.init = CLK_HW_INIT("pll-video1", "dcxo24M",
170 .hw.init = CLK_HW_INIT("pll-video2", "dcxo24M",
185 .hw.init = CLK_HW_INIT("pll-ve", "dcxo24M",
211 .hw.init = CLK_HW_INIT("pll-com", "dcxo24M",
227 .hw.init = CLK_HW_INIT("pll-video3", "dcxo24M",
259 .hw.init = CLK_HW_INIT("pll-audio", "dcxo24M",
266 "iosc", "pll-cpux",
267 "pll-periph0" };
271 static SUNXI_CCU_M(cpux_apb_clk, "cpux-apb", "cpux", 0x500, 8, 2, 0);
274 "iosc", "pll-periph0",
275 "pll-periph0-2x" };
276 static SUNXI_CCU_MP_WITH_MUX(psi_ahb1_ahb2_clk, "psi-ahb1-ahb2",
284 "psi-ahb1-ahb2",
285 "pll-periph0",
286 "pll-periph0-2x" };
305 static const char * const mbus_parents[] = { "dcxo24M", "pll-ddr0",
306 "pll-periph0",
307 "pll-periph0-2x" };
314 static const char * const de_parents[] = { "pll-com", "pll-periph0-2x" };
321 static SUNXI_CCU_GATE(bus_de_clk, "bus-de", "psi-ahb1-ahb2",
324 static const char * const g2d_parents[] = { "pll-com", "pll-periph0-2x",
325 "pll-video0-2x", "pll-video1-2x",
326 "pll-video2-2x"};
335 static SUNXI_CCU_GATE(bus_g2d_clk, "bus-g2d", "psi-ahb1-ahb2",
338 static const char * const gpu_parents[] = { "pll-gpu" };
345 static SUNXI_CCU_GATE(bus_gpu_clk, "bus-gpu", "psi-ahb1-ahb2",
348 static const char * const ce_parents[] = { "dcxo24M", "pll-periph0-2x" };
356 static SUNXI_CCU_GATE(bus_ce_clk, "bus-ce", "psi-ahb1-ahb2",
359 static const char * const ve_parents[] = { "pll-ve" };
366 static SUNXI_CCU_GATE(bus_ve_clk, "bus-ve", "psi-ahb1-ahb2",
369 static SUNXI_CCU_GATE(bus_dma_clk, "bus-dma", "psi-ahb1-ahb2",
372 static SUNXI_CCU_GATE(bus_msgbox_clk, "bus-msgbox", "psi-ahb1-ahb2",
375 static SUNXI_CCU_GATE(bus_spinlock_clk, "bus-spinlock", "psi-ahb1-ahb2",
378 static SUNXI_CCU_GATE(bus_hstimer_clk, "bus-hstimer", "psi-ahb1-ahb2",
383 static SUNXI_CCU_GATE(bus_dbg_clk, "bus-dbg", "psi-ahb1-ahb2",
386 static SUNXI_CCU_GATE(bus_psi_clk, "bus-psi", "psi-ahb1-ahb2",
389 static SUNXI_CCU_GATE(bus_pwm_clk, "bus-pwm", "apb1", 0x7ac, BIT(0), 0);
391 static SUNXI_CCU_GATE(bus_iommu_clk, "bus-iommu", "apb1", 0x7bc, BIT(0), 0);
393 static SUNXI_CCU_GATE(mbus_dma_clk, "mbus-dma", "mbus",
395 static SUNXI_CCU_GATE(mbus_ve_clk, "mbus-ve", "mbus",
397 static SUNXI_CCU_GATE(mbus_ce_clk, "mbus-ce", "mbus",
399 static SUNXI_CCU_GATE(mbus_nand_clk, "mbus-nand", "mbus",
401 static SUNXI_CCU_GATE(mbus_csi_clk, "mbus-csi", "mbus",
403 static SUNXI_CCU_GATE(mbus_isp_clk, "mbus-isp", "mbus",
405 static SUNXI_CCU_GATE(mbus_g2d_clk, "mbus-g2d", "mbus",
408 static SUNXI_CCU_GATE(bus_dram_clk, "bus-dram", "psi-ahb1-ahb2",
412 "pll-periph0",
413 "pll-periph1",
414 "pll-periph0-2x",
415 "pll-periph1-2x" };
430 static SUNXI_CCU_GATE(bus_nand_clk, "bus-nand", "ahb3", 0x82c, BIT(0), 0);
432 static const char * const mmc_parents[] = { "dcxo24M", "pll-periph0-2x",
433 "pll-periph1-2x" };
439 2, /* post-div */
447 2, /* post-div */
455 2, /* post-div */
458 static SUNXI_CCU_GATE(bus_mmc0_clk, "bus-mmc0", "ahb3", 0x84c, BIT(0), 0);
459 static SUNXI_CCU_GATE(bus_mmc1_clk, "bus-mmc1", "ahb3", 0x84c, BIT(1), 0);
460 static SUNXI_CCU_GATE(bus_mmc2_clk, "bus-mmc2", "ahb3", 0x84c, BIT(2), 0);
462 static SUNXI_CCU_GATE(bus_uart0_clk, "bus-uart0", "apb2", 0x90c, BIT(0), 0);
463 static SUNXI_CCU_GATE(bus_uart1_clk, "bus-uart1", "apb2", 0x90c, BIT(1), 0);
464 static SUNXI_CCU_GATE(bus_uart2_clk, "bus-uart2", "apb2", 0x90c, BIT(2), 0);
465 static SUNXI_CCU_GATE(bus_uart3_clk, "bus-uart3", "apb2", 0x90c, BIT(3), 0);
466 static SUNXI_CCU_GATE(bus_uart4_clk, "bus-uart4", "apb2", 0x90c, BIT(4), 0);
468 static SUNXI_CCU_GATE(bus_i2c0_clk, "bus-i2c0", "apb2", 0x91c, BIT(0), 0);
469 static SUNXI_CCU_GATE(bus_i2c1_clk, "bus-i2c1", "apb2", 0x91c, BIT(1), 0);
470 static SUNXI_CCU_GATE(bus_i2c2_clk, "bus-i2c2", "apb2", 0x91c, BIT(2), 0);
471 static SUNXI_CCU_GATE(bus_i2c3_clk, "bus-i2c3", "apb2", 0x91c, BIT(3), 0);
494 static SUNXI_CCU_GATE(bus_spi0_clk, "bus-spi0", "ahb3", 0x96c, BIT(0), 0);
495 static SUNXI_CCU_GATE(bus_spi1_clk, "bus-spi1", "ahb3", 0x96c, BIT(1), 0);
496 static SUNXI_CCU_GATE(bus_spi2_clk, "bus-spi2", "ahb3", 0x96c, BIT(2), 0);
498 static SUNXI_CCU_GATE(emac_25m_clk, "emac-25m", "ahb3", 0x970,
501 static SUNXI_CCU_GATE(bus_emac_clk, "bus-emac", "ahb3", 0x97c, BIT(0), 0);
504 "pll-periph0", "pll-periph1" };
505 static SUNXI_CCU_MP_WITH_MUX_GATE(ir_rx_clk, "ir-rx", ir_parents, 0x990,
512 static SUNXI_CCU_GATE(bus_ir_rx_clk, "bus-ir-rx", "ahb3", 0x99c, BIT(0), 0);
514 static SUNXI_CCU_MP_WITH_MUX_GATE(ir_tx_clk, "ir-tx", ir_parents, 0x9c0,
521 static SUNXI_CCU_GATE(bus_ir_tx_clk, "bus-ir-tx", "apb1", 0x9cc, BIT(0), 0);
523 static SUNXI_CCU_GATE(bus_gpadc_clk, "bus-gpadc", "apb1", 0x9ec, BIT(0), 0);
525 static SUNXI_CCU_GATE(bus_ths_clk, "bus-ths", "apb1", 0x9fc, BIT(0), 0);
527 static const char * const audio_parents[] = { "pll-audio", "pll-com-audio" };
580 static SUNXI_CCU_GATE(bus_i2s0_clk, "bus-i2s0", "apb1", 0xa20, BIT(0), 0);
581 static SUNXI_CCU_GATE(bus_i2s1_clk, "bus-i2s1", "apb1", 0xa20, BIT(1), 0);
582 static SUNXI_CCU_GATE(bus_i2s2_clk, "bus-i2s2", "apb1", 0xa20, BIT(2), 0);
583 static SUNXI_CCU_GATE(bus_i2s3_clk, "bus-i2s3", "apb1", 0xa20, BIT(3), 0);
598 static SUNXI_CCU_GATE(bus_spdif_clk, "bus-spdif", "apb1", 0xa2c, BIT(0), 0);
613 static SUNXI_CCU_GATE(bus_dmic_clk, "bus-dmic", "apb1", 0xa4c, BIT(0), 0);
615 static SUNXI_CCU_M_WITH_MUX_GATE(audio_codec_dac_clk, "audio-codec-dac",
622 static SUNXI_CCU_M_WITH_MUX_GATE(audio_codec_adc_clk, "audio-codec-adc",
629 static SUNXI_CCU_M_WITH_MUX_GATE(audio_codec_4x_clk, "audio-codec-4x",
636 static SUNXI_CCU_GATE(bus_audio_codec_clk, "bus-audio-codec", "apb1", 0xa5c,
646 static SUNXI_CCU_GATE(usb_ohci0_clk, "usb-ohci0", "osc12M", 0xa70, BIT(31), 0);
647 static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "dcxo24M", 0xa70, BIT(29), 0);
649 static SUNXI_CCU_GATE(usb_ohci1_clk, "usb-ohci1", "osc12M", 0xa74, BIT(31), 0);
650 static SUNXI_CCU_GATE(usb_phy1_clk, "usb-phy1", "dcxo24M", 0xa74, BIT(29), 0);
652 static SUNXI_CCU_GATE(bus_ohci0_clk, "bus-ohci0", "ahb3", 0xa8c, BIT(0), 0);
653 static SUNXI_CCU_GATE(bus_ohci1_clk, "bus-ohci1", "ahb3", 0xa8c, BIT(1), 0);
654 static SUNXI_CCU_GATE(bus_ehci0_clk, "bus-ehci0", "ahb3", 0xa8c, BIT(4), 0);
655 static SUNXI_CCU_GATE(bus_ehci1_clk, "bus-ehci1", "ahb3", 0xa8c, BIT(5), 0);
656 static SUNXI_CCU_GATE(bus_otg_clk, "bus-otg", "ahb3", 0xa8c, BIT(8), 0);
658 static SUNXI_CCU_GATE(bus_lradc_clk, "bus-lradc", "ahb3", 0xa9c, BIT(0), 0);
660 static SUNXI_CCU_GATE(bus_dpss_top0_clk, "bus-dpss-top0", "ahb3",
663 static SUNXI_CCU_GATE(bus_dpss_top1_clk, "bus-dpss-top1", "ahb3",
666 static const char * const mipi_dsi_parents[] = { "dcxo24M", "pll-periph0-2x",
667 "pll-periph0" };
668 static SUNXI_CCU_M_WITH_MUX_GATE(mipi_dsi_clk, "mipi-dsi",
676 static SUNXI_CCU_GATE(bus_mipi_dsi_clk, "bus-mipi-dsi", "ahb3",
679 static const char * const tcon_lcd_parents[] = { "pll-video0-4x",
680 "pll-video1-4x",
681 "pll-video2-4x",
682 "pll-video3-4x",
683 "pll-periph0-2x" };
684 static SUNXI_CCU_MP_WITH_MUX_GATE(tcon_lcd_clk, "tcon-lcd0",
692 static SUNXI_CCU_GATE(bus_tcon_lcd_clk, "bus-tcon-lcd0", "ahb3",
696 "pll-periph0" };
705 static SUNXI_CCU_GATE(bus_ledc_clk, "bus-ledc", "ahb3", 0xbfc, BIT(0), 0);
707 static const char * const csi_top_parents[] = { "pll-periph0-2x",
708 "pll-video0-2x",
709 "pll-video1-2x",
710 "pll-video2-2x",
711 "pll-video3-2x" };
712 static SUNXI_CCU_M_WITH_MUX_GATE(csi_top_clk, "csi-top",
719 static const char * const csi0_mclk_parents[] = { "dcxo24M", "pll-video2",
720 "pll-video3", "pll-video0",
721 "pll-video1" };
722 static SUNXI_CCU_M_WITH_MUX_GATE(csi0_mclk_clk, "csi0-mclk",
729 static const char * const csi1_mclk_parents[] = { "dcxo24M", "pll-video3",
730 "pll-video0", "pll-video1",
731 "pll-video2" };
732 static SUNXI_CCU_M_WITH_MUX_GATE(csi1_mclk_clk, "csi1-mclk",
739 static SUNXI_CCU_GATE(bus_csi_clk, "bus-csi", "ahb3", 0xc1c, BIT(0), 0);
741 static const char * const csi_isp_parents[] = { "pll-periph0-2x",
742 "pll-video0-2x",
743 "pll-video1-2x",
744 "pll-video2-2x",
745 "pll-video3-2x" };
746 static SUNXI_CCU_M_WITH_MUX_GATE(csi_isp_clk, "csi-isp",
756 static CLK_FIXED_FACTOR_HW(pll_com_audio_clk, "pll-com-audio",
760 static CLK_FIXED_FACTOR_HW(pll_periph0_2x_clk, "pll-periph0-2x",
764 static CLK_FIXED_FACTOR_HW(pll_periph1_2x_clk, "pll-periph1-2x",
771 static CLK_FIXED_FACTOR_HWS(pll_video0_4x_clk, "pll-video0-4x",
774 static CLK_FIXED_FACTOR_HWS(pll_video0_2x_clk, "pll-video0-2x",
781 static CLK_FIXED_FACTOR_HWS(pll_video1_4x_clk, "pll-video1-4x",
784 static CLK_FIXED_FACTOR_HWS(pll_video1_2x_clk, "pll-video1-2x",
791 static CLK_FIXED_FACTOR_HWS(pll_video2_4x_clk, "pll-video2-4x",
794 static CLK_FIXED_FACTOR_HWS(pll_video2_2x_clk, "pll-video2-2x",
801 static CLK_FIXED_FACTOR_HWS(pll_video3_4x_clk, "pll-video3-4x",
804 static CLK_FIXED_FACTOR_HWS(pll_video3_2x_clk, "pll-video3-2x",
1220 * See the comment before pll-video0 definition for the reason. in sun50i_a100_ccu_probe()
1231 * See the comment before pll-audio definition for the reason. in sun50i_a100_ccu_probe()
1250 ret = sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_a100_ccu_desc); in sun50i_a100_ccu_probe()
1265 { .compatible = "allwinner,sun50i-a100-ccu" },
1272 .name = "sun50i-a100-ccu",