]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/device/c6474/target.h
6474 Additions
[keystone-rtos/ibl.git] / src / device / c6474 / target.h
1 /**************************************************************************
2  * FILE PURPOSE: Target specific definitions
3  **************************************************************************
4  * FILE NAME: target.h
5  *
6  * DESCRIPTION: This file defines target specific values used by low level
7  *                              drivers.
8  *
9  * @file target.h
10  *
11  * @brief
12  *  Low level target specific values are defined
13  *
14  ***************************************************************************/
15  
16  
17 /** 
18  *  @brief
19  *   Device EMAC definitions
20  */
21 #define TARGET_DEVICE_CPMAC
22  
23 #define TARGET_EMAC_N_PORTS            1
25 #define TARGET_EMAC_BASE_ADDRESSES     { 0x02c80000u }
26 #define TARGET_EMAC_DSC_BASE_ADDR      { 0x02c82000u }
28 #define TARGET_SGMII_BASE_ADDRESSES    { 0x02c40000u }
30 /* SGMII offsets (at least the serdes configs, vary between devices, so
31  * they are defined here. */
32 #define TARGET_SGMII_IDVER             0x000
33 #define TARGET_SGMII_SOFT_RESET        0x004
34 #define TARGET_SGMII_CONTROL           0x010
35 #define TARGET_SGMII_STATUS            0x014
36 #define TARGET_SGMII_MR_ADV_ABILITY    0x018
37 #define TARGET_SGMII_MR_LP_ADV_ABILITY 0x020
38 #define TARGET_SGMII_TX_CFG            0x030
39 #define TARGET_SGMII_RX_CFG            0x034
40 #define TARGET_SGMII_AUX_CFG           0x038
42 /* Leave mdio disabled */
43 #define dev_mdio_open()     1
46 /* The mac control register values */
47 #define TARGET_MAC_CONTROL        ( 1 << 18)            /* EXT_EN              */     \
48                             | ( 0 << 9 )            /* Round robin         */     \
49                                 | ( 1 << 7 )            /* GIG                 */     \
50                             | ( 0 << 6 )            /* TX pacing disabled  */     \
51                             | ( 1 << 5 )            /* GMII RX & TX        */     \
52                             | ( 0 << 4 )            /* TX flow disabled    */     \
53                             | ( 0 << 3 )            /* RX flow disabled    */     \
54                             | ( 0 << 1 )            /* Loopback enabled    */     \
55                             | ( 1 << 0 )            /* full duplex         */
58 /**
59  *  @brief
60  *    Device Timer definitions
61  */
62 #define TIMER0_BASE             0x02910000u
64 #define TIMER_INPUT_DIVIDER     6           /* Timer driven from cpu clock / 6 */
67 /**
68  *  @def MAIN_PLL
69  */
70 #define MAIN_PLL        0   /**< The index to the main PLL */
73 /**
74  *  @brief
75  *    Device PLL definitions
76  */
77 #define DEVICE_PLL_BASE(x)  ((x) == MAIN_PLL ? 0x29a0000 : 0)
80 /**
81  * @brief 
82  *  Device PSC definitions
83  */
84 #define DEVICE_PSC_BASE     0x02ac0000u
86 /**
87  * @brief
88  *  The ethernet is in the always on domain */
89 #define TARGET_PWR_ETH(x)   -1
91 /**
92  *  @brief
93  *    The nand is done through gpio, which is always powered up.
94  *    A value < 0 tells the low level psc driver to simply return success
95  */
96 #define TARGET_PWR_NAND     -1
99 /**
100  *  @brief
101  *    Device DDR controller definitions
102  */
103 #define DEVICE_DDR_BASE  0x70000000
105 /**
106  * @brief
107  *  The highest module number
108  */
109 #define TARGET_PWR_MAX_MOD  5
110  
112 /**
113  * @brief
114  *   The base address of MDIO 
115  */
116 #define TARGET_MDIO_BASE    0x2c81800
118 /**
119  *  @brief
120  *    GPIO address
121  */
122 #define GPIO_GPIOPID_REG                0x02B00000
123 #define GPIO_GPIOEMU_REG                0x02B00004
124 #define GPIO_BINTEN_REG                 0x02B00008
125 #define GPIO_DIR_REG                    0x02B00010
126 #define GPIO_OUT_DATA_REG               0x02B00014
127 #define GPIO_SET_DATA_REG               0x02B00018
128 #define GPIO_CLEAR_DATA_REG             0x02B0001C
129 #define GPIO_IN_DATA_REG                0x02B00020
130 #define GPIO_SET_RIS_TRIG_REG   0x02B00024
131 #define GPIO_CLR_RIS_TRIG_REG   0x02B00028
132 #define GPIO_SET_FAL_TRIG_REG   0x02B0002C
133 #define GPIO_CLR_FAL_TRIG_REG   0x02B00030
135 /**
136  *  @brief
137  *    GPIO pin mapping 
138  */
139 #define NAND_CLE_GPIO_PIN       GPIO_8     // High: Command Cycle occuring
140 #define NAND_ALE_GPIO_PIN       GPIO_9     // High: Address input cycle oddcuring
141 #define NAND_NWE_GPIO_PIN       GPIO_10
142 #define NAND_NRE_GPIO_PIN       GPIO_12
143 #define NAND_NCE_GPIO_PIN       GPIO_13
144 #define NAND_MODE_GPIO          GPIO_14
146 /**
147  *  @brief
148  *      The standard NAND delay must be big enough to handle the highest possible
149  *      operating frequency of the device */
150 #define TARGET_NAND_STD_DELAY                           25 // In cpu cycles
152 /**
153  *  @brief
154  *      The base address of the I2C peripheral, and the module divisor of the cpu clock
155  */
156 #define DEVICE_I2C_BASE                 0x02b04000
157 #define DEVICE_I2C_MODULE_DIVISOR       6
158