Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2017 Synopsys, Inc. All rights reserved. |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _CONFIG_HSDK_H_ |
| 7 | #define _CONFIG_HSDK_H_ |
| 8 | |
| 9 | #include <linux/sizes.h> |
| 10 | |
| 11 | /* |
| 12 | * CPU configuration |
| 13 | */ |
Eugeniy Paltsev | 24e026e | 2018-03-26 15:57:37 +0300 | [diff] [blame] | 14 | #define NR_CPUS 4 |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 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 | */ |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 22 | |
| 23 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000 |
| 24 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
| 25 | #define CONFIG_SYS_SDRAM_SIZE SZ_1G |
| 26 | |
| 27 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 28 | (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) |
| 29 | |
Alexey Brodkin | 7542968 | 2018-01-19 16:13:51 +0300 | [diff] [blame] | 30 | #define CONFIG_SYS_BOOTM_LEN SZ_128M |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 31 | |
| 32 | /* |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 33 | * UART configuration |
| 34 | */ |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 35 | #define CONFIG_SYS_NS16550_SERIAL |
| 36 | #define CONFIG_SYS_NS16550_CLK 33330000 |
| 37 | #define CONFIG_SYS_NS16550_MEM32 |
| 38 | |
| 39 | /* |
| 40 | * Ethernet PHY configuration |
| 41 | */ |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 42 | |
| 43 | /* |
| 44 | * USB 1.1 configuration |
| 45 | */ |
| 46 | #define CONFIG_USB_OHCI_NEW |
| 47 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1 |
| 48 | |
| 49 | /* |
| 50 | * Environment settings |
| 51 | */ |
Eugeniy Paltsev | 24e026e | 2018-03-26 15:57:37 +0300 | [diff] [blame] | 52 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Eugeniy Paltsev | 5545759 | 2018-06-04 14:52:32 +0300 | [diff] [blame] | 53 | "upgrade=if mmc rescan && " \ |
| 54 | "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \ |
| 55 | "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \ |
| 56 | "\"Fail to upgrade.\n" \ |
| 57 | "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \ |
| 58 | "; fi\0" \ |
Eugeniy Paltsev | 24e026e | 2018-03-26 15:57:37 +0300 | [diff] [blame] | 59 | "core_dccm_0=0x10\0" \ |
| 60 | "core_dccm_1=0x6\0" \ |
| 61 | "core_dccm_2=0x10\0" \ |
| 62 | "core_dccm_3=0x6\0" \ |
| 63 | "core_iccm_0=0x10\0" \ |
| 64 | "core_iccm_1=0x6\0" \ |
| 65 | "core_iccm_2=0x10\0" \ |
| 66 | "core_iccm_3=0x6\0" \ |
| 67 | "core_mask=0xF\0" \ |
| 68 | "dcache_ena=0x1\0" \ |
| 69 | "icache_ena=0x1\0" \ |
| 70 | "non_volatile_limit=0xE\0" \ |
| 71 | "hsdk_hs34=setenv core_mask 0x2; setenv icache_ena 0x0; \ |
| 72 | setenv dcache_ena 0x0; setenv core_iccm_1 0x7; \ |
| 73 | setenv core_dccm_1 0x8; setenv non_volatile_limit 0x0;\0" \ |
| 74 | "hsdk_hs36=setenv core_mask 0x1; setenv icache_ena 0x1; \ |
| 75 | setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \ |
| 76 | setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \ |
| 77 | "hsdk_hs36_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \ |
| 78 | setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \ |
| 79 | setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \ |
| 80 | "hsdk_hs38=setenv core_mask 0x1; setenv icache_ena 0x1; \ |
| 81 | setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \ |
| 82 | setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \ |
| 83 | "hsdk_hs38_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \ |
| 84 | setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \ |
| 85 | setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \ |
| 86 | "hsdk_hs38x2=setenv core_mask 0x3; setenv icache_ena 0x1; \ |
| 87 | setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \ |
| 88 | setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \ |
| 89 | setenv core_iccm_1 0x6; setenv core_dccm_1 0x6;\0" \ |
| 90 | "hsdk_hs38x3=setenv core_mask 0x7; 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; \ |
| 93 | setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \ |
| 94 | setenv core_iccm_2 0x10; setenv core_dccm_2 0x10;\0" \ |
| 95 | "hsdk_hs38x4=setenv core_mask 0xF; setenv icache_ena 0x1; \ |
| 96 | setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \ |
| 97 | setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \ |
| 98 | setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \ |
| 99 | setenv core_iccm_2 0x10; setenv core_dccm_2 0x10; \ |
| 100 | setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0" |
| 101 | |
Eugeniy Paltsev | 24e026e | 2018-03-26 15:57:37 +0300 | [diff] [blame] | 102 | /* Cli configuration */ |
| 103 | #define CONFIG_SYS_CBSIZE SZ_2K |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 104 | |
| 105 | /* |
Eugeniy Paltsev | 24e026e | 2018-03-26 15:57:37 +0300 | [diff] [blame] | 106 | * Callback configuration |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 107 | */ |
Alexey Brodkin | 88961bc | 2016-11-25 16:23:43 +0300 | [diff] [blame] | 108 | |
| 109 | #endif /* _CONFIG_HSDK_H_ */ |