blob: cdf4fddd9408436d0eb6c70db7efd27e4401a1c4 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Alexey Brodkin88961bc2016-11-25 16:23:43 +03002/*
3 * Copyright (C) 2017 Synopsys, Inc. All rights reserved.
Alexey Brodkin88961bc2016-11-25 16:23:43 +03004 */
5
6#ifndef _CONFIG_HSDK_H_
7#define _CONFIG_HSDK_H_
8
9#include <linux/sizes.h>
10
11/*
12 * CPU configuration
13 */
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +030014#define NR_CPUS 4
Alexey Brodkin88961bc2016-11-25 16:23:43 +030015#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
Alexey Brodkin75429682018-01-19 16:13:51 +030032#define CONFIG_SYS_BOOTM_LEN SZ_128M
Alexey Brodkin88961bc2016-11-25 16:23:43 +030033#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_DW_SERIAL
44#define CONFIG_SYS_NS16550_SERIAL
45#define CONFIG_SYS_NS16550_CLK 33330000
46#define CONFIG_SYS_NS16550_MEM32
47
48/*
49 * Ethernet PHY configuration
50 */
Alexey Brodkin88961bc2016-11-25 16:23:43 +030051
52/*
53 * USB 1.1 configuration
54 */
55#define CONFIG_USB_OHCI_NEW
56#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
57
58/*
59 * Environment settings
60 */
61#define CONFIG_ENV_SIZE SZ_16K
Alexey Brodkin88961bc2016-11-25 16:23:43 +030062
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +030063#define CONFIG_EXTRA_ENV_SETTINGS \
Eugeniy Paltsev55457592018-06-04 14:52:32 +030064 "upgrade=if mmc rescan && " \
65 "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
66 "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \
67 "\"Fail to upgrade.\n" \
68 "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \
69 "; fi\0" \
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +030070 "core_dccm_0=0x10\0" \
71 "core_dccm_1=0x6\0" \
72 "core_dccm_2=0x10\0" \
73 "core_dccm_3=0x6\0" \
74 "core_iccm_0=0x10\0" \
75 "core_iccm_1=0x6\0" \
76 "core_iccm_2=0x10\0" \
77 "core_iccm_3=0x6\0" \
78 "core_mask=0xF\0" \
79 "dcache_ena=0x1\0" \
80 "icache_ena=0x1\0" \
81 "non_volatile_limit=0xE\0" \
82 "hsdk_hs34=setenv core_mask 0x2; setenv icache_ena 0x0; \
83setenv dcache_ena 0x0; setenv core_iccm_1 0x7; \
84setenv core_dccm_1 0x8; setenv non_volatile_limit 0x0;\0" \
85 "hsdk_hs36=setenv core_mask 0x1; setenv icache_ena 0x1; \
86setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
87setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
88 "hsdk_hs36_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
89setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
90setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
91 "hsdk_hs38=setenv core_mask 0x1; setenv icache_ena 0x1; \
92setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
93setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
94 "hsdk_hs38_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
95setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
96setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
97 "hsdk_hs38x2=setenv core_mask 0x3; setenv icache_ena 0x1; \
98setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
99setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
100setenv core_iccm_1 0x6; setenv core_dccm_1 0x6;\0" \
101 "hsdk_hs38x3=setenv core_mask 0x7; setenv icache_ena 0x1; \
102setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
103setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
104setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
105setenv core_iccm_2 0x10; setenv core_dccm_2 0x10;\0" \
106 "hsdk_hs38x4=setenv core_mask 0xF; setenv icache_ena 0x1; \
107setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
108setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
109setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
110setenv core_iccm_2 0x10; setenv core_dccm_2 0x10; \
111setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
112
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300113/*
114 * Environment configuration
115 */
116#define CONFIG_BOOTFILE "uImage"
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300117#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
118
119/*
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +0300120 * Misc utility configuration
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300121 */
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +0300122#define CONFIG_BOUNCE_BUFFER
123
124/* Cli configuration */
125#define CONFIG_SYS_CBSIZE SZ_2K
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300126
127/*
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +0300128 * Callback configuration
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300129 */
Eugeniy Paltsev24e026e2018-03-26 15:57:37 +0300130#define CONFIG_BOARD_LATE_INIT
Alexey Brodkin88961bc2016-11-25 16:23:43 +0300131
132#endif /* _CONFIG_HSDK_H_ */