Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2015 |
| 3 | * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de |
| 4 | * |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
| 12 | /* |
| 13 | * DDR Setup |
| 14 | */ |
| 15 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */ |
| 16 | /* TODO: Check: Can this be unified with CONFIG_SYS_SDRAM_BASE? */ |
| 17 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_SDRAM_BASE |
| 18 | |
| 19 | /* |
| 20 | * Memory test |
| 21 | * TODO: Migrate! |
| 22 | */ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 23 | |
| 24 | /* |
| 25 | * The reserved memory |
| 26 | */ |
| 27 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ |
| 28 | |
| 29 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 30 | |
| 31 | /* |
| 32 | * Initial RAM Base Address Setup |
| 33 | */ |
| 34 | #define CONFIG_SYS_INIT_RAM_LOCK |
| 35 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ |
| 36 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */ |
| 37 | #define CONFIG_SYS_GBL_DATA_OFFSET \ |
| 38 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 39 | |
| 40 | /* |
| 41 | * FLASH on the Local Bus |
| 42 | */ |
| 43 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */ |
| 44 | #define CONFIG_SYS_FLASH_SIZE 8 /* FLASH size is up to 8M */ |
| 45 | |
| 46 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
| 47 | #define CONFIG_SYS_MAX_FLASH_SECT 135 |
| 48 | |
| 49 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 50 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
| 51 | |
| 52 | /* |
| 53 | * Environment |
| 54 | */ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 55 | |
| 56 | #define CONFIG_LOADS_ECHO /* echo on for serial download */ |
| 57 | #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ |
| 58 | |
| 59 | /* |
| 60 | * Miscellaneous configurable options |
| 61 | */ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 62 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
| 63 | |
| 64 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 65 | |
| 66 | /* Print Buffer Size */ |
| 67 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 68 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 69 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 70 | |
| 71 | /* |
| 72 | * For booting Linux, the board info and command line data |
| 73 | * have to be in the first 256 MB of memory, since this is |
| 74 | * the maximum mapped by the Linux kernel during initialization. |
| 75 | */ |
| 76 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */ |
| 77 | |
| 78 | /* |
| 79 | * Environment Configuration |
| 80 | */ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 81 | |
| 82 | #define CONFIG_HAS_ETH0 |
| 83 | #define CONFIG_HAS_ETH1 |
| 84 | |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 85 | /* TODO: Turn into string option and migrate to Kconfig */ |
| 86 | #define CONFIG_HOSTNAME "gazerbeam" |
| 87 | #define CONFIG_ROOTPATH "/opt/nfsroot" |
| 88 | #define CONFIG_BOOTFILE "uImage" |
| 89 | |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 90 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 91 | "netdev=eth0\0" \ |
| 92 | "consoledev=ttyS1\0" \ |
| 93 | "u-boot=u-boot.bin\0" \ |
| 94 | "kernel_addr=1000000\0" \ |
| 95 | "fdt_addr=C00000\0" \ |
| 96 | "fdtfile=hrcon.dtb\0" \ |
| 97 | "load=tftp ${loadaddr} ${u-boot}\0" \ |
| 98 | "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE) \ |
| 99 | " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\ |
| 100 | " +${filesize};cp.b ${fileaddr} " \ |
| 101 | __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \ |
| 102 | "upd=run load update\0" \ |
| 103 | |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 104 | #define NFSBOOTCOMMAND \ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 105 | "setenv bootargs root=/dev/nfs rw " \ |
| 106 | "nfsroot=$serverip:$rootpath " \ |
| 107 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
| 108 | "console=$consoledev,$baudrate $othbootargs;" \ |
| 109 | "tftp ${kernel_addr} $bootfile;" \ |
| 110 | "tftp ${fdt_addr} $fdtfile;" \ |
| 111 | "bootm ${kernel_addr} - ${fdt_addr}" |
| 112 | |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 113 | #define MMCBOOTCOMMAND \ |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 114 | "setenv bootargs root=/dev/mmcblk0p3 rw rootwait " \ |
| 115 | "console=$consoledev,$baudrate $othbootargs;" \ |
| 116 | "ext2load mmc 0:2 ${kernel_addr} $bootfile;" \ |
| 117 | "ext2load mmc 0:2 ${fdt_addr} $fdtfile;" \ |
| 118 | "bootm ${kernel_addr} - ${fdt_addr}" |
| 119 | |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 120 | #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND |
Dirk Eibach | d494cdb | 2019-03-29 10:18:19 +0100 | [diff] [blame] | 121 | |
| 122 | #endif /* __CONFIG_H */ |