1/*- 2 * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD: releng/10.3/sys/arm/allwinner/a10_clk.h 266337 2014-05-17 18:53:36Z ian $ 27 */ 28 29#ifndef _A10_CLK_H_ 30#define _A10_CLK_H_ 31 32#define CCMU_BASE 0xe1c20000 33 34#define CCM_PLL1_CFG 0x0000 35#define CCM_PLL1_TUN 0x0004 36#define CCM_PLL2_CFG 0x0008 37#define CCM_PLL2_TUN 0x000c 38#define CCM_PLL3_CFG 0x0010 39#define CCM_PLL3_TUN 0x0014 40#define CCM_PLL4_CFG 0x0018 41#define CCM_PLL4_TUN 0x001c 42#define CCM_PLL5_CFG 0x0020 43#define CCM_PLL5_TUN 0x0024 44#define CCM_PLL6_CFG 0x0028 45#define CCM_PLL6_TUN 0x002c 46#define CCM_PLL7_CFG 0x0030 47#define CCM_PLL7_TUN 0x0034 48#define CCM_PLL1_TUN2 0x0038 49#define CCM_PLL5_TUN2 0x003c 50#define CCM_PLL_LOCK_DBG 0x004c 51#define CCM_OSC24M_CFG 0x0050 52#define CCM_CPU_AHB_APB0_CFG 0x0054 53#define CCM_APB1_CLK_DIV 0x0058 54#define CCM_AXI_GATING 0x005c 55#define CCM_AHB_GATING0 0x0060 56#define CCM_AHB_GATING1 0x0064 57#define CCM_APB0_GATING 0x0068 58#define CCM_APB1_GATING 0x006c 59#define CCM_NAND_SCLK_CFG 0x0080 60#define CCM_MS_SCLK_CFG 0x0084 61#define CCM_MMC0_SCLK_CFG 0x0088 62#define CCM_MMC1_SCLK_CFG 0x008c 63#define CCM_MMC2_SCLK_CFG 0x0090 64#define CCM_MMC3_SCLK_CFG 0x0094 65#define CCM_TS_CLK 0x0098 66#define CCM_SS_CLK 0x009c 67#define CCM_SPI0_CLK 0x00a0 68#define CCM_SPI1_CLK 0x00a4 69#define CCM_SPI2_CLK 0x00a8 70#define CCM_PATA_CLK 0x00ac 71#define CCM_IR0_CLK 0x00b0 72#define CCM_IR1_CLK 0x00b4 73#define CCM_IIS_CLK 0x00b8 74#define CCM_AC97_CLK 0x00bc 75#define CCM_SPDIF_CLK 0x00c0 76#define CCM_KEYPAD_CLK 0x00c4 77#define CCM_SATA_CLK 0x00c8 78#define CCM_USB_CLK 0x00cc 79#define CCM_GPS_CLK 0x00d0 80#define CCM_SPI3_CLK 0x00d4 81#define CCM_DRAM_CLK 0x0100 82#define CCM_BE0_SCLK 0x0104 83#define CCM_BE1_SCLK 0x0108 84#define CCM_FE0_CLK 0x010c 85#define CCM_FE1_CLK 0x0110 86#define CCM_MP_CLK 0x0114 87#define CCM_LCD0_CH0_CLK 0x0118 88#define CCM_LCD1_CH0_CLK 0x011c 89#define CCM_CSI_ISP_CLK 0x0120 90#define CCM_TVD_CLK 0x0128 91#define CCM_LCD0_CH1_CLK 0x012c 92#define CCM_LCD1_CH1_CLK 0x0130 93#define CCM_CS0_CLK 0x0134 94#define CCM_CS1_CLK 0x0138 95#define CCM_VE_CLK 0x013c 96#define CCM_AUDIO_CODEC_CLK 0x0140 97#define CCM_AVS_CLK 0x0144 98#define CCM_ACE_CLK 0x0148 99#define CCM_LVDS_CLK 0x014c 100#define CCM_HDMI_CLK 0x0150 101#define CCM_MALI400_CLK 0x0154 102 103#define CCM_AHB_GATING_USB0 (1 << 0) 104#define CCM_AHB_GATING_EHCI0 (1 << 1) 105#define CCM_AHB_GATING_EHCI1 (1 << 3) 106#define CCM_AHB_GATING_EMAC (1 << 17) 107 108#define CCM_USB_PHY (1 << 8) 109#define CCM_USB0_RESET (1 << 0) 110#define CCM_USB1_RESET (1 << 1) 111#define CCM_USB2_RESET (1 << 2) 112 113int a10_clk_usb_activate(void); 114int a10_clk_usb_deactivate(void); 115int a10_clk_emac_activate(void); 116 117#endif /* _A10_CLK_H_ */ 118