blob: f40e927536e67d2a048a7d7eac5ef8be7bf9f78d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*******************************************************************************
2* °æÈ¨ËùÓÐ (C)2010, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
3*
4* ÎļþÃû³Æ£º config.h
5* Îļþ±êʶ£º /include/config.h
6* ÄÚÈÝÕªÒª£º ÒýÈ뿪·¢°åµÄÅäÖÃÎļþ
7* ÆäËü˵Ã÷£º
8* µ±Ç°°æ±¾£º 1.0
9* ×÷¡¡¡¡Õߣº ÎÌÔÆ·å
10* Íê³ÉÈÕÆÚ£º 2010-9-30
11*
12*
13*******************************************************************************/
14#ifndef __INCLUDE_CONFIG_H_
15#define __INCLUDE_CONFIG_H_
16/*********************************************************************************
171:open 0:close
18* ¹¦ÄÜ SIM_EN USE_ASIC SYNC_USB_CTRL SYNC_USB_HSIC SYNC_SETADDRESS
19* FPGA 1 0 0 0 0
20* usb_ctrlÑéÖ¤ 0 1 1 1 1
21* usb_hsicÑéÖ¤ 0 1 1 1 1
22* usbtimeoutÑéÖ¤0 1 1 1 1
23* asic 1 1 0 0 0
24**********************************************************************************/
25#define SIM_EN 1
26#define USE_ASIC 1
27#define SYNC_USB_CTRL 0
28#define SYNC_USB_HSIC 0
29#define SYNC_SETADDRESS 0
30
31#if !USE_ASIC ///0:fpga 1:asic
32// CPUʱÖÓÆµÂÊ
33#define SYS_CPU_FREQ 50000000 // ¶¨ÒåCPUʱÖÓ,ÓÃÓÚ¼ÆÊ±
34#define SYS_UART_CLK 25000000 // ʱÖÓÆµÂÊ
35#define SYS_UART_CLK_CONFIG_PLL 25000000 // ʱÖÓÆµÂÊ
36#else
37// CPUʱÖÓÆµÂÊ
38#define SYS_CPU_FREQ 208000000 // ¶¨ÒåCPUʱÖÓ,ÓÃÓÚ¼ÆÊ±
39#define SYS_UART_CLK (26000000/6) // ʱÖÓÆµÂÊ
40#define SYS_UART_CLK_CONFIG_PLL 104000000 // ʱÖÓÆµÂÊ
41#define ZX_TOP_CRM_BASE 0x0013B000
42#define ZX_SOC_SYS_BASE 0x00140000
43
44#endif
45// Æô¶¯Ä£Ê½Ñ¡Ôñ¼Ä´æÆ÷
46#define SYS_BOOTSEL_BASE 0x0013b004 // ¶¨ÒåBOOTSEL¼Ä´æÆ÷µØÖ·
47
48#define SOC_CRM_BASE (0x0010c000)
49#define BOOT_SEL (0x3c)
50#define NAND_CFG (0x34)
51#define SOC_MOD_CLKEN0 ZX_TOP_CRM_BASE+0x6c
52#define SOC_MOD_CLKEN1 ZX_TOP_CRM_BASE+0x6c
53#define SOC_MOD_RSTEN ZX_TOP_CRM_BASE + 0x80
54#define SOC_MOD_USBSTATECTRL ZX_TOP_CRM_BASE + 0x84
55#define SOC_MOD_RSTEN1 (0x0010c064)
56
57#define CFG_STACK_TOP 0x0008AFE0 // ¶¨ÒåÁËÕ»¶¥
58
59// UART ²ÎÊý
60#define SYS_UART_BASE 0x00102000 // »ùµØÖ·
61//#define SYS_UART_CLK 25000000 // ʱÖÓÆµÂÊ
62#define CFG_UART_BAUDRATE 115200 // ²¨ÌØÂÊ
63#define CFG_BUF_SIZE 64 // Êý¾Ý»º³åÇø´óС
64#if !USE_ASIC
65// USB ²ÎÊý
66#define SYS_USB_BASE 0x01500000 // »ùµØÖ·
67#define SYS_USB_HSIC_BASE 0x01600000 // »ùµØÖ·
68#else
69#define SYS_USB_BASE 0x01500000 // »ùµØÖ·
70#define SYS_USB_HSIC_BASE 0x01600000 // »ùµØÖ·
71#endif
72
73
74// NAND FLASH ²ÎÊý
75#define SYS_NAND_BASE 0x01207000 // ¼Ä´æÆ÷»ùµØÖ·
76#define SYS_NAND_DATA 0x01208000 // Êý¾Ý»ùµØÖ·
77
78// ͨÓòÎÊý
79#define CFG_LOAD_BASE 0x0008B000 // ¼ÓÔØ´úÂëµ½¸ÃµØÖ·,±ØÐë4K¶ÔÆë
80#define SYS_LOAD_LEN 0x1000 // ¼ÓÔØ³¤¶È
81#define CFG_PRINT_BUF_SIZE 256
82
83#define POWER_DOMAIN_ISO ZX_SOC_SYS_BASE+0x110
84#define POWER_DOMAIN_POWERON ZX_SOC_SYS_BASE+0x114
85#define POWER_DOMAIN_RST ZX_SOC_SYS_BASE+0x10C
86
87//ÑéÖ¤ÐèÒª
88#if SYNC_USB_CTRL
89#define ARM_PORTA (0x102040)
90#endif
91
92#if SYNC_USB_HSIC
93#define REG_GPIO_OUT 0x01400014
94#define REG_GPIO_IN 0x01409020
95#endif
96#endif