Lines Matching +full:lock +full:- +full:offset
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
47 #include <dt-bindings/clock/sun50i-a64-ccu.h>
48 #include <dt-bindings/reset/sun50i-a64-ccu.h>
50 /* Non-exported clocks */
141 CCU_GATE(CLK_BUS_MIPI_DSI, "bus-mipi-dsi", "ahb1", 0x60, 1)
142 CCU_GATE(CLK_BUS_CE, "bus-ce", "ahb1", 0x60, 5)
143 CCU_GATE(CLK_BUS_DMA, "bus-dma", "ahb1", 0x60, 6)
144 CCU_GATE(CLK_BUS_MMC0, "bus-mmc0", "ahb1", 0x60, 8)
145 CCU_GATE(CLK_BUS_MMC1, "bus-mmc1", "ahb1", 0x60, 9)
146 CCU_GATE(CLK_BUS_MMC2, "bus-mmc2", "ahb1", 0x60, 10)
147 CCU_GATE(CLK_BUS_NAND, "bus-nand", "ahb1", 0x60, 13)
148 CCU_GATE(CLK_BUS_DRAM, "bus-dram", "ahb1", 0x60, 14)
149 CCU_GATE(CLK_BUS_EMAC, "bus-emac", "ahb2", 0x60, 16)
150 CCU_GATE(CLK_BUS_TS, "bus-ts", "ahb1", 0x60, 18)
151 CCU_GATE(CLK_BUS_HSTIMER, "bus-hstimer", "ahb1", 0x60, 19)
152 CCU_GATE(CLK_BUS_SPI0, "bus-spi0", "ahb1", 0x60, 20)
153 CCU_GATE(CLK_BUS_SPI1, "bus-spi1", "ahb1", 0x60, 21)
154 CCU_GATE(CLK_BUS_OTG, "bus-otg", "ahb1", 0x60, 23)
155 CCU_GATE(CLK_BUS_EHCI0, "bus-ehci0", "ahb1", 0x60, 24)
156 CCU_GATE(CLK_BUS_EHCI1, "bus-ehci1", "ahb2", 0x60, 25)
157 CCU_GATE(CLK_BUS_OHCI0, "bus-ohci0", "ahb1", 0x60, 28)
158 CCU_GATE(CLK_BUS_OHCI1, "bus-ohci1", "ahb2", 0x60, 29)
160 CCU_GATE(CLK_BUS_VE, "bus-ve", "ahb1", 0x64, 0)
161 CCU_GATE(CLK_BUS_TCON0, "bus-tcon0", "ahb1", 0x64, 3)
162 CCU_GATE(CLK_BUS_TCON1, "bus-tcon1", "ahb1", 0x64, 4)
163 CCU_GATE(CLK_BUS_DEINTERLACE, "bus-deinterlace", "ahb1", 0x64, 5)
164 CCU_GATE(CLK_BUS_CSI, "bus-csi", "ahb1", 0x64, 8)
165 CCU_GATE(CLK_BUS_HDMI, "bus-hdmi", "ahb1", 0x64, 11)
166 CCU_GATE(CLK_BUS_DE, "bus-de", "ahb1", 0x64, 12)
167 CCU_GATE(CLK_BUS_GPU, "bus-gpu", "ahb1", 0x64, 20)
168 CCU_GATE(CLK_BUS_MSGBOX, "bus-msgbox", "ahb1", 0x64, 21)
169 CCU_GATE(CLK_BUS_SPINLOCK, "bus-spinlock", "ahb1", 0x64, 22)
171 CCU_GATE(CLK_BUS_CODEC, "bus-codec", "apb1", 0x68, 0)
172 CCU_GATE(CLK_BUS_SPDIF, "bus-spdif", "apb1", 0x68, 1)
173 CCU_GATE(CLK_BUS_PIO, "bus-pio", "apb1", 0x68, 5)
174 CCU_GATE(CLK_BUS_THS, "bus-ths", "apb1", 0x68, 8)
175 CCU_GATE(CLK_BUS_I2S0, "bus-i2s0", "apb1", 0x68, 12)
176 CCU_GATE(CLK_BUS_I2S1, "bus-i2s1", "apb1", 0x68, 13)
177 CCU_GATE(CLK_BUS_I2S2, "bus-i2s2", "apb1", 0x68, 14)
179 CCU_GATE(CLK_BUS_I2C0, "bus-i2c0", "apb2", 0x6C, 0)
180 CCU_GATE(CLK_BUS_I2C1, "bus-i2c1", "apb2", 0x6C, 1)
181 CCU_GATE(CLK_BUS_I2C2, "bus-i2c2", "apb2", 0x6C, 2)
182 CCU_GATE(CLK_BUS_SCR, "bus-src", "apb2", 0x6C, 5)
183 CCU_GATE(CLK_BUS_UART0, "bus-uart0", "apb2", 0x6C, 16)
184 CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb2", 0x6C, 17)
185 CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb2", 0x6C, 18)
186 CCU_GATE(CLK_BUS_UART3, "bus-uart3", "apb2", 0x6C, 19)
187 CCU_GATE(CLK_BUS_UART4, "bus-uart4", "apb2", 0x6C, 20)
189 CCU_GATE(CLK_BUS_DBG, "bus-dbg", "ahb1", 0x70, 7)
193 CCU_GATE(CLK_USB_PHY0, "usb-phy0", "osc24M", 0xcc, 8)
194 CCU_GATE(CLK_USB_PHY1, "usb-phy1", "osc24M", 0xcc, 9)
195 CCU_GATE(CLK_USB_HSIC, "usb-hsic", "pll_hsic", 0xcc, 10)
196 CCU_GATE(CLK_USB_HSIC_12M, "usb-hsic-12M", "osc12M", 0xcc, 11)
197 CCU_GATE(CLK_USB_OHCI0, "usb-ohci0", "osc12M", 0xcc, 16)
198 CCU_GATE(CLK_USB_OHCI1, "usb-ohci1", "usb-ohci0", 0xcc, 17)
200 CCU_GATE(CLK_DRAM_VE, "dram-ve", "dram", 0x100, 0)
201 CCU_GATE(CLK_DRAM_CSI, "dram-csi", "dram", 0x100, 1)
202 CCU_GATE(CLK_DRAM_DEINTERLACE, "dram-deinterlace", "dram", 0x100, 2)
203 CCU_GATE(CLK_DRAM_TS, "dram-ts", "dram", 0x100, 3)
205 CCU_GATE(CLK_CSI_MISC, "csi-misc", "osc24M", 0x130, 31)
207 CCU_GATE(CLK_AC_DIG_4X, "ac-dig-4x", "pll_audio-4x", 0x140, 30)
208 CCU_GATE(CLK_AC_DIG, "ac-dig", "pll_audio", 0x140, 31)
212 CCU_GATE(CLK_HDMI_DDC, "hdmi-ddc", "osc24M", 0x154, 31)
229 0x00, /* offset */
235 28, 1000, /* lock */
242 0x08, /* offset */
248 28, 1000, /* lock */
254 "pll_audio-2x", /* name */
262 "pll_audio-4x", /* name */
270 "pll_audio-8x", /* name */
281 0x10, /* offset */
284 31, 28, 1000, /* gate, lock, lock retries */
292 "pll_video0-2x", /* name */
303 0x18, /* offset */
306 31, 28, 1000, /* gate, lock, lock retries */
316 0x20, /* offset */
322 28, 1000, /* lock */
331 0x28, /* offset */
337 28, 1000, /* lock */
353 0x2C, /* offset */
359 28, 1000, /* lock */
374 0x30, /* offset */
377 31, 28, 1000, /* gate, lock, lock retries */
387 0x38, /* offset */
390 31, 28, 1000, /* gate, lock, lock retries */
410 0x44, /* offset */
413 31, 28, 1000, /* gate, lock, lock retries */
423 0x48, /* offset */
426 31, 28, 1000, /* gate, lock, lock retries */
436 0x4C, /* offset */
442 28, 1000, /* lock */
450 0x50, 16, 2); /* offset, shift, width */
456 0x50, /* offset */
464 0x50, /* offset */
471 0x54, /* offset */
488 0x54, /* offset */
497 0x58, /* offset */
507 0x5c, /* offset */
524 0x74, /* offset */
532 0x80, /* offset */
541 0x88, /* offset */
551 0x8c, /* offset */
561 0x90, /* offset */
572 0x98, /* offset */
581 0x9C, /* offset */
590 0xA0, /* offset */
600 0xA4, /* offset */
608 static const char *i2s_parents[] = {"pll_audio-8x", "pll_audio-4x", "pll_audio-2x", "pll_audio"};
611 0xb0, 16, 2); /* offset, mux shift, mux width */
614 0xb4, 16, 2); /* offset, mux shift, mux width */
617 0xb8, 16, 2); /* offset, mux shift, mux width */
622 0xC0, /* offset */
634 0xF4, /* offset */
643 0x104, /* offset */
649 static const char *tcon0_parents[] = {"pll_mipi", NULL, "pll_video0-2x"};
653 0x118, 24, 2); /* offset, shift, width */
658 0x11C, /* offset */
668 0x124, /* offset */
676 CLK_CSI_SCLK, "csi-sclk", csi_sclk_parents, /* id, name, parents */
677 0x134, /* offset */
685 CLK_CSI_MCLK, "csi-mclk", csi_mclk_parents, /* id, name, parents */
686 0x134, /* offset */
695 0x13C, /* offset */
704 0x150, /* offset */
713 0x15C, /* offset */
722 0x1A0, /* offset */
798 if (!ofw_bus_is_compatible(dev, "allwinner,sun50i-a64-ccu")) in ccu_a64_probe()
812 sc->resets = a64_ccu_resets; in ccu_a64_attach()
813 sc->nresets = nitems(a64_ccu_resets); in ccu_a64_attach()
814 sc->gates = a64_ccu_gates; in ccu_a64_attach()
815 sc->ngates = nitems(a64_ccu_gates); in ccu_a64_attach()
816 sc->clks = a64_ccu_clks; in ccu_a64_attach()
817 sc->nclks = nitems(a64_ccu_clks); in ccu_a64_attach()
818 sc->clk_init = a64_init_clks; in ccu_a64_attach()
819 sc->n_clk_init = nitems(a64_init_clks); in ccu_a64_attach()