Lines Matching +full:div +full:- +full:clk
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
45 #include <dev/clk/clk_div.h>
46 #include <dev/clk/clk_fixed.h>
47 #include <dev/clk/clk_mux.h>
49 #include <dev/clk/allwinner/aw_ccung.h>
51 #include <dt-bindings/clock/sun8i-r-ccu.h>
52 #include <dt-bindings/reset/sun8i-r-ccu.h>
54 /* Non-exported clocks */
67 CCU_GATE(CLK_APB0_PIO, "apb0-pio", "apb0", 0x28, 0)
68 CCU_GATE(CLK_APB0_IR, "apb0-ir", "apb0", 0x28, 1)
69 CCU_GATE(CLK_APB0_TIMER, "apb0-timer", "apb0", 0x28, 2)
70 CCU_GATE(CLK_APB0_RSB, "apb0-rsb", "apb0", 0x28, 3)
71 CCU_GATE(CLK_APB0_UART, "apb0-uart", "apb0", 0x28, 4)
72 CCU_GATE(CLK_APB0_I2C, "apb0-i2c", "apb0", 0x28, 6)
73 CCU_GATE(CLK_APB0_TWD, "apb0-twd", "apb0", 0x28, 7)
77 static const char *a83t_ar100_parents[] = {"osc16M-d512", "osc24M", "pll_periph", "osc16M"};
82 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */
89 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */
100 1, /* div */
109 0, NULL); /* flags, div table */
145 { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &ar100_clk},
146 { .type = AW_CLK_DIV, .clk.div = &apb0_clk},
147 { .type = AW_CLK_FIXED, .clk.fixed = &ahb0_clk},
148 { .type = AW_CLK_NM, .clk.nm = &r_ccu_ir_clk},
152 { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &a83t_ar100_clk},
153 { .type = AW_CLK_DIV, .clk.div = &apb0_clk},
154 { .type = AW_CLK_FIXED, .clk.fixed = &ahb0_clk},
155 { .type = AW_CLK_NM, .clk.nm = &a83t_ir_clk},
160 { "allwinner,sun8i-h3-r-ccu", 1 },
163 { "allwinner,sun50i-a64-r-ccu", 1 },
175 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in ccu_sun8i_r_probe()
189 sc->resets = ccu_sun8i_r_resets; in ccu_sun8i_r_attach()
190 sc->nresets = nitems(ccu_sun8i_r_resets); in ccu_sun8i_r_attach()
191 sc->gates = ccu_sun8i_r_gates; in ccu_sun8i_r_attach()
192 sc->ngates = nitems(ccu_sun8i_r_gates); in ccu_sun8i_r_attach()
193 sc->clks = clks; in ccu_sun8i_r_attach()
194 sc->nclks = nitems(clks); in ccu_sun8i_r_attach()
220 if (!ofw_bus_is_compatible(dev, "allwinner,sun8i-a83t-r-ccu")) in ccu_a83t_r_probe()
234 sc->resets = ccu_sun8i_r_resets; in ccu_a83t_r_attach()
235 sc->nresets = nitems(ccu_sun8i_r_resets); in ccu_a83t_r_attach()
236 sc->gates = ccu_sun8i_r_gates; in ccu_a83t_r_attach()
237 sc->ngates = nitems(ccu_sun8i_r_gates); in ccu_a83t_r_attach()
238 sc->clks = a83t_clks; in ccu_a83t_r_attach()
239 sc->nclks = nitems(a83t_clks); in ccu_a83t_r_attach()