serial: Get rid of CONFIG_DW_SERIAL
[platform/kernel/u-boot.git] / include / configs / hsdk.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2017 Synopsys, Inc. All rights reserved.
4  */
5
6 #ifndef _CONFIG_HSDK_H_
7 #define _CONFIG_HSDK_H_
8
9 #include <linux/sizes.h>
10
11 /*
12  *  CPU configuration
13  */
14 #define NR_CPUS                         4
15 #define ARC_PERIPHERAL_BASE             0xF0000000
16 #define ARC_DWMMC_BASE                  (ARC_PERIPHERAL_BASE + 0xA000)
17 #define ARC_DWGMAC_BASE                 (ARC_PERIPHERAL_BASE + 0x18000)
18
19 /*
20  * Memory configuration
21  */
22 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_TEXT_BASE
23
24 #define CONFIG_SYS_DDR_SDRAM_BASE       0x80000000
25 #define CONFIG_SYS_SDRAM_BASE           CONFIG_SYS_DDR_SDRAM_BASE
26 #define CONFIG_SYS_SDRAM_SIZE           SZ_1G
27
28 #define CONFIG_SYS_INIT_SP_ADDR         \
29         (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
30
31 #define CONFIG_SYS_MALLOC_LEN           SZ_2M
32 #define CONFIG_SYS_BOOTM_LEN            SZ_128M
33 #define CONFIG_SYS_LOAD_ADDR            0x82000000
34
35 /*
36  * This board might be of different versions so handle it
37  */
38 #define CONFIG_BOARD_TYPES
39
40 /*
41  * UART configuration
42  */
43 #define CONFIG_SYS_NS16550_SERIAL
44 #define CONFIG_SYS_NS16550_CLK          33330000
45 #define CONFIG_SYS_NS16550_MEM32
46
47 /*
48  * Ethernet PHY configuration
49  */
50
51 /*
52  * USB 1.1 configuration
53  */
54 #define CONFIG_USB_OHCI_NEW
55 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
56
57 /*
58  * Environment settings
59  */
60 #define CONFIG_ENV_SIZE                 SZ_16K
61
62 #define CONFIG_EXTRA_ENV_SETTINGS \
63         "upgrade=if mmc rescan && " \
64                 "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
65                 "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \
66                 "\"Fail to upgrade.\n" \
67                 "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \
68                 "; fi\0" \
69         "core_dccm_0=0x10\0" \
70         "core_dccm_1=0x6\0" \
71         "core_dccm_2=0x10\0" \
72         "core_dccm_3=0x6\0" \
73         "core_iccm_0=0x10\0" \
74         "core_iccm_1=0x6\0" \
75         "core_iccm_2=0x10\0" \
76         "core_iccm_3=0x6\0" \
77         "core_mask=0xF\0" \
78         "dcache_ena=0x1\0" \
79         "icache_ena=0x1\0" \
80         "non_volatile_limit=0xE\0" \
81         "hsdk_hs34=setenv core_mask 0x2; setenv icache_ena 0x0; \
82 setenv dcache_ena 0x0; setenv core_iccm_1 0x7; \
83 setenv core_dccm_1 0x8; setenv non_volatile_limit 0x0;\0" \
84         "hsdk_hs36=setenv core_mask 0x1; setenv icache_ena 0x1; \
85 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
86 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
87         "hsdk_hs36_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
88 setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
89 setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
90         "hsdk_hs38=setenv core_mask 0x1; setenv icache_ena 0x1; \
91 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
92 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
93         "hsdk_hs38_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
94 setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
95 setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
96         "hsdk_hs38x2=setenv core_mask 0x3; setenv icache_ena 0x1; \
97 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
98 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
99 setenv core_iccm_1 0x6; setenv core_dccm_1 0x6;\0" \
100         "hsdk_hs38x3=setenv core_mask 0x7; setenv icache_ena 0x1; \
101 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
102 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
103 setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
104 setenv core_iccm_2 0x10; setenv core_dccm_2 0x10;\0" \
105         "hsdk_hs38x4=setenv core_mask 0xF; setenv icache_ena 0x1; \
106 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
107 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
108 setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
109 setenv core_iccm_2 0x10; setenv core_dccm_2 0x10; \
110 setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
111
112 /*
113  * Environment configuration
114  */
115 #define CONFIG_BOOTFILE                 "uImage"
116 #define CONFIG_LOADADDR                 CONFIG_SYS_LOAD_ADDR
117
118 /* Cli configuration */
119 #define CONFIG_SYS_CBSIZE               SZ_2K
120
121 /*
122  * Callback configuration
123  */
124 #define CONFIG_BOARD_LATE_INIT
125
126 #endif /* _CONFIG_HSDK_H_ */