Home | History | Annotate | Line # | Download | only in samsung
exynos_reg.h revision 1.1
      1  1.1  matt /* $NetBSD */
      2  1.1  matt /*-
      3  1.1  matt  * Copyright (c) 2014 The NetBSD Foundation, Inc.
      4  1.1  matt  * All rights reserved.
      5  1.1  matt  *
      6  1.1  matt  * This code is derived from software contributed to The NetBSD Foundation
      7  1.1  matt  * by Reinoud Zandijk.
      8  1.1  matt  *
      9  1.1  matt  * Redistribution and use in source and binary forms, with or without
     10  1.1  matt  * modification, are permitted provided that the following conditions
     11  1.1  matt  * are met:
     12  1.1  matt  * 1. Redistributions of source code must retain the above copyright
     13  1.1  matt  *    notice, this list of conditions and the following disclaimer.
     14  1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  matt  *    documentation and/or other materials provided with the distribution.
     17  1.1  matt  *
     18  1.1  matt  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     19  1.1  matt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     20  1.1  matt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     21  1.1  matt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     22  1.1  matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23  1.1  matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24  1.1  matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25  1.1  matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26  1.1  matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27  1.1  matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28  1.1  matt  * POSSIBILITY OF SUCH DAMAGE.
     29  1.1  matt  */
     30  1.1  matt 
     31  1.1  matt #ifndef _ARM_SAMSUNG_EXYNOS_REG_H_
     32  1.1  matt #define _ARM_SAMSUNG_EXYNOS_REG_H_
     33  1.1  matt 
     34  1.1  matt /*
     35  1.1  matt  *
     36  1.1  matt  * The exynos can boot from its iROM or from an external Nand memory. Since
     37  1.1  matt  * these are normally hardly used they are excluded from the normal register
     38  1.1  matt  * space here.
     39  1.1  matt  *
     40  1.1  matt  * XXX What about the audio subsystem region. Where are the docs?
     41  1.1  matt  *
     42  1.1  matt  * EXYNOS_CORE_PBASE points to the main SFR region.
     43  1.1  matt  *
     44  1.1  matt  * Notes:
     45  1.1  matt  *
     46  1.1  matt  * SFR		Special Function Register
     47  1.1  matt  * ISP		In-System Programming, like a JTAG
     48  1.1  matt  * ACP		Accelerator Coherency Port
     49  1.1  matt  * SSS		Security Sub System
     50  1.1  matt  * GIC		Generic Interurrupt Controller
     51  1.1  matt  * PMU		Power Management Unit
     52  1.1  matt  * DMC		2D Graphics engine
     53  1.1  matt  * LEFTBUS	Data bus / Peripheral bus
     54  1.1  matt  * RIGHTBUS	,,
     55  1.1  matt  * G3D		3D Graphics engine
     56  1.1  matt  * MFC		Multi-Format Codec
     57  1.1  matt  * LCD0		LCD display
     58  1.1  matt  * MCT		Multi Core Timer
     59  1.1  matt  * CMU		Clock Management Unit
     60  1.1  matt  * TMU		Thermal Management Unit
     61  1.1  matt  * PPMU		Pin Parametric Measurement Unit (?)
     62  1.1  matt  * MMU		Memory Management Unit
     63  1.1  matt  * MCTimer	?
     64  1.1  matt  * WDT		Watch Dog Timer
     65  1.1  matt  * RTC		Real Time Clock
     66  1.1  matt  * KEYIF	Keypad interface
     67  1.1  matt  * SECKEY	?
     68  1.1  matt  * TZPC		TrustZone Protection Controller
     69  1.1  matt  * UART		Universal asynchronous receiver/transmitter
     70  1.1  matt  * I2C		Inter IC Connect
     71  1.1  matt  * SPI		Serial Peripheral Interface Bus
     72  1.1  matt  * I2S		Inter-IC Sound, Integrated Interchip Sound, or IIS
     73  1.1  matt  * PCM		Pulse-code modulation, audio stream at set fixed rate
     74  1.1  matt  * SPDIF	Sony/Philips Digital Interface Format
     75  1.1  matt  * Slimbus	Serial Low-power Inter-chip Media Bus
     76  1.1  matt  * SMMU		System mmu. No idea as how its programmed (or not)
     77  1.1  matt  * PERI-L	UART, I2C, SPI, I2S, PCM, SPDIF, PWM, I2CHDMI, Slimbus
     78  1.1  matt  * PERI-R	CHIPID, SYSREG, PMU/CMU/TMU Bus I/F, MCTimer, WDT, RTC, KEYIF,
     79  1.1  matt  * 		SECKEY, TZPC
     80  1.1  matt  */
     81  1.1  matt 
     82  1.1  matt /*
     83  1.1  matt  * Common to Exynos4 and Exynos 5
     84  1.1  matt  * */
     85  1.1  matt #define EXYNOS_CORE_PBASE		0x10000000	/* SFR */
     86  1.1  matt #define EXYNOS_CORE_SIZE		0x10000000
     87  1.1  matt 
     88  1.1  matt 
     89  1.1  matt #define EXYNOS_CHIPID_OFFSET		0x00000000
     90  1.1  matt #define  EXYNOS_PROD_ID_OFFSET		(EXYNOS_CHIPID_OFFSET + 0)
     91  1.1  matt #define  EXYNOS_PACKAGE_ID_OFFSET	(EXYNOS_CHIPID_OFFSET + 4)
     92  1.1  matt 
     93  1.1  matt #define EXYNOS_PACKAGE_ID_2_GIG		0x06030058
     94  1.1  matt 
     95  1.1  matt /* standard block size for offsets defined below */
     96  1.1  matt #define EXYNOS_BLOCK_SIZE		0x00010000
     97  1.1  matt 
     98  1.1  matt #define EXYNOS_WDT_WTCON		0x0000
     99  1.1  matt #define  WTCON_PRESCALER		__BITS(15,8)
    100  1.1  matt #define  WTCON_ENABLE			__BIT(5)
    101  1.1  matt #define  WTCON_CLOCK_SELECT		__BITS(4,3)
    102  1.1  matt #define  WTCON_CLOCK_SELECT_16		__SHIFTIN(0, WTCON_CLOCK_SELECT)
    103  1.1  matt #define  WTCON_CLOCK_SELECT_32		__SHIFTIN(1, WTCON_CLOCK_SELECT)
    104  1.1  matt #define  WTCON_CLOCK_SELECT_64		__SHIFTIN(2, WTCON_CLOCK_SELECT)
    105  1.1  matt #define  WTCON_CLOCK_SELECT_128		__SHIFTIN(3, WTCON_CLOCK_SELECT)
    106  1.1  matt #define  WTCON_INT_ENABLE		__BIT(2)
    107  1.1  matt #define  WTCON_RESET_ENABLE		__BIT(0)
    108  1.1  matt #define EXYNOS_WDT_WTDAT		0x0004
    109  1.1  matt #define  WTDAT_RELOAD			__BITS(15,0)
    110  1.1  matt #define EXYNOS_WDT_WTCNT		0x0008
    111  1.1  matt #define  WTCNT_COUNT			__BITS(15,0)
    112  1.1  matt #define EXYNOS_WDT_WTCLRINT		0x000C
    113  1.1  matt 
    114  1.1  matt 
    115  1.1  matt /* standard frequency settings */
    116  1.1  matt #define EXYNOS_ACLK_REF_FREQ		(200*1000*1000)	/* 200 Mhz */
    117  1.1  matt #define EXYNOS_UART_FREQ		(109*1000*1000) /* should be EXYNOS_ACLK_REF_FREQ! */
    118  1.1  matt 
    119  1.1  matt #if defined(EXYNOS5)
    120  1.1  matt #include <arm/samsung/exynos5_reg.h>
    121  1.1  matt #endif
    122  1.1  matt #if defined(EXYNOS4)
    123  1.1  matt #include <arm/samsung/exynos4_reg.h>
    124  1.1  matt #endif
    125  1.1  matt 
    126  1.1  matt #endif /* _ARM_SAMSUNG_EXYNOS_REG_H_ */
    127