c8c28bb4f04013f708beb21a6c1c132fe6dec82e
[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_BOOTM_LEN            SZ_128M
32
33 /*
34  * UART configuration
35  */
36 #define CONFIG_SYS_NS16550_SERIAL
37 #define CONFIG_SYS_NS16550_CLK          33330000
38 #define CONFIG_SYS_NS16550_MEM32
39
40 /*
41  * Ethernet PHY configuration
42  */
43
44 /*
45  * USB 1.1 configuration
46  */
47 #define CONFIG_USB_OHCI_NEW
48 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
49
50 /*
51  * Environment settings
52  */
53 #define CONFIG_EXTRA_ENV_SETTINGS \
54         "upgrade=if mmc rescan && " \
55                 "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
56                 "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \
57                 "\"Fail to upgrade.\n" \
58                 "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \
59                 "; fi\0" \
60         "core_dccm_0=0x10\0" \
61         "core_dccm_1=0x6\0" \
62         "core_dccm_2=0x10\0" \
63         "core_dccm_3=0x6\0" \
64         "core_iccm_0=0x10\0" \
65         "core_iccm_1=0x6\0" \
66         "core_iccm_2=0x10\0" \
67         "core_iccm_3=0x6\0" \
68         "core_mask=0xF\0" \
69         "dcache_ena=0x1\0" \
70         "icache_ena=0x1\0" \
71         "non_volatile_limit=0xE\0" \
72         "hsdk_hs34=setenv core_mask 0x2; setenv icache_ena 0x0; \
73 setenv dcache_ena 0x0; setenv core_iccm_1 0x7; \
74 setenv core_dccm_1 0x8; setenv non_volatile_limit 0x0;\0" \
75         "hsdk_hs36=setenv core_mask 0x1; setenv icache_ena 0x1; \
76 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
77 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
78         "hsdk_hs36_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
79 setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
80 setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
81         "hsdk_hs38=setenv core_mask 0x1; setenv icache_ena 0x1; \
82 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
83 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
84         "hsdk_hs38_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
85 setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
86 setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
87         "hsdk_hs38x2=setenv core_mask 0x3; setenv icache_ena 0x1; \
88 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
89 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
90 setenv core_iccm_1 0x6; setenv core_dccm_1 0x6;\0" \
91         "hsdk_hs38x3=setenv core_mask 0x7; setenv icache_ena 0x1; \
92 setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
93 setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
94 setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
95 setenv core_iccm_2 0x10; setenv core_dccm_2 0x10;\0" \
96         "hsdk_hs38x4=setenv core_mask 0xF; 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; \
100 setenv core_iccm_2 0x10; setenv core_dccm_2 0x10; \
101 setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
102
103 /*
104  * Environment configuration
105  */
106 #define CONFIG_BOOTFILE                 "uImage"
107
108 /* Cli configuration */
109 #define CONFIG_SYS_CBSIZE               SZ_2K
110
111 /*
112  * Callback configuration
113  */
114
115 #endif /* _CONFIG_HSDK_H_ */