Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 2 | /* |
| 3 | * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com> |
| 4 | * |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 5 | * Microchip PIC32MZ[DA] Starter Kit. |
| 6 | */ |
| 7 | |
| 8 | #ifndef __PIC32MZDASK_CONFIG_H |
| 9 | #define __PIC32MZDASK_CONFIG_H |
| 10 | |
| 11 | /* System Configuration */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 12 | |
| 13 | /*-------------------------------------------- |
| 14 | * CPU configuration |
| 15 | */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 16 | |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 17 | /*---------------------------------------------------------------------- |
| 18 | * Memory Layout |
| 19 | */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 20 | /* Initial RAM for temporary stack, global data */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 21 | #define CFG_SYS_INIT_RAM_SIZE 0x10000 |
| 22 | #define CFG_SYS_INIT_RAM_ADDR \ |
| 23 | (CONFIG_SYS_SRAM_BASE + CONFIG_SYS_SRAM_SIZE - CFG_SYS_INIT_RAM_SIZE) |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 24 | |
| 25 | /* SDRAM Configuration (for final code, data, stack, heap) */ |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 26 | #define CFG_SYS_SDRAM_BASE 0x88000000 |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 27 | |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 28 | /* Memory Test */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 29 | |
| 30 | /*---------------------------------------------------------------------- |
| 31 | * Commands |
| 32 | */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 33 | |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 34 | /*------------------------------------------------------------ |
| 35 | * Console Configuration |
| 36 | */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 37 | |
Purna Chandra Mandal | ac7eef7 | 2016-03-21 13:05:43 +0530 | [diff] [blame] | 38 | /*-------------------------------------------------- |
| 39 | * USB Configuration |
| 40 | */ |
Purna Chandra Mandal | ac7eef7 | 2016-03-21 13:05:43 +0530 | [diff] [blame] | 41 | |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 42 | /* ------------------------------------------------- |
| 43 | * Environment |
| 44 | */ |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 45 | |
| 46 | /* --------------------------------------------------------------------- |
| 47 | * Board boot configuration |
| 48 | */ |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 49 | |
| 50 | #define MEM_LAYOUT_ENV_SETTINGS \ |
| 51 | "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ |
Tom Rini | 6880b33 | 2021-12-12 22:12:33 -0500 | [diff] [blame] | 52 | "fdt_addr_r=0x89d00000\0" \ |
| 53 | "scriptaddr=0x88300000\0" \ |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 54 | |
Tom Rini | 1cd60b3 | 2022-12-04 10:04:31 -0500 | [diff] [blame] | 55 | #define CFG_LEGACY_BOOTCMD_ENV \ |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 56 | "legacy_bootcmd= " \ |
| 57 | "if load mmc 0 ${scriptaddr} uEnv.txt; then " \ |
| 58 | "env import -tr ${scriptaddr} ${filesize}; " \ |
| 59 | "if test -n \"${bootcmd_uenv}\" ; then " \ |
| 60 | "echo Running bootcmd_uenv ...; " \ |
| 61 | "run bootcmd_uenv; " \ |
| 62 | "fi; " \ |
| 63 | "fi; \0" |
| 64 | |
| 65 | #define BOOT_TARGET_DEVICES(func) \ |
Purna Chandra Mandal | 7d514a7 | 2016-01-28 15:30:22 +0530 | [diff] [blame] | 66 | func(MMC, mmc, 0) \ |
Purna Chandra Mandal | ac7eef7 | 2016-03-21 13:05:43 +0530 | [diff] [blame] | 67 | func(USB, usb, 0) \ |
Purna Chandra Mandal | 7d514a7 | 2016-01-28 15:30:22 +0530 | [diff] [blame] | 68 | func(DHCP, dhcp, na) |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 69 | |
| 70 | #include <config_distro_bootcmd.h> |
| 71 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 72 | #define CFG_EXTRA_ENV_SETTINGS \ |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 73 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Rini | 1cd60b3 | 2022-12-04 10:04:31 -0500 | [diff] [blame] | 74 | CFG_LEGACY_BOOTCMD_ENV \ |
Purna Chandra Mandal | c76eb72 | 2016-01-28 15:30:19 +0530 | [diff] [blame] | 75 | BOOTENV |
| 76 | |
Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 77 | #endif /* __PIC32MZDASK_CONFIG_H */ |