Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * Configuration header file for Verdin AM62 SoM |
| 4 | * |
| 5 | * Copyright 2023 Toradex - https://www.toradex.com/ |
| 6 | */ |
| 7 | |
| 8 | #ifndef __VERDIN_AM62_H |
| 9 | #define __VERDIN_AM62_H |
| 10 | |
| 11 | #define RAMDISK_ADDR_R 0x90300000 |
| 12 | #define SCRIPTADDR 0x90280000 |
| 13 | |
| 14 | /* DDR Configuration */ |
| 15 | #define CFG_SYS_SDRAM_BASE 0x80000000 |
| 16 | #define CFG_SYS_SDRAM_BASE1 0x880000000 |
| 17 | #define CFG_SYS_SDRAM_SIZE SZ_2G /* Maximum supported size */ |
| 18 | |
| 19 | #define MEM_LAYOUT_ENV_SETTINGS \ |
| 20 | "fdt_addr_r=0x90200000\0" \ |
| 21 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 22 | "kernel_comp_addr_r=0x80200000\0" \ |
| 23 | "kernel_comp_size=0x08000000\0" \ |
| 24 | "ramdisk_addr_r=" __stringify(RAMDISK_ADDR_R) "\0" \ |
| 25 | "scriptaddr=" __stringify(SCRIPTADDR) "\0" |
| 26 | |
| 27 | #if CONFIG_TARGET_VERDIN_AM62_A53 |
| 28 | /* Enable Distro Boot */ |
| 29 | #define BOOT_TARGET_DEVICES(func) \ |
| 30 | func(MMC, mmc, 1) \ |
| 31 | func(MMC, mmc, 0) \ |
| 32 | func(DHCP, dhcp, na) |
| 33 | #include <config_distro_bootcmd.h> |
| 34 | #else /* CONFIG_TARGET_VERDIN_AM62_A53 */ |
| 35 | #define BOOTENV \ |
| 36 | "" |
| 37 | #endif /* CONFIG_TARGET_VERDIN_AM62_A53 */ |
| 38 | |
| 39 | /* Incorporate settings into the U-Boot environment */ |
| 40 | #define CFG_EXTRA_ENV_SETTINGS \ |
| 41 | BOOTENV \ |
| 42 | MEM_LAYOUT_ENV_SETTINGS \ |
| 43 | "boot_scripts=boot.scr\0" \ |
| 44 | "boot_script_dhcp=boot.scr\0" \ |
| 45 | "console=ttyS2\0" \ |
| 46 | "fdt_board=dev\0" \ |
| 47 | "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ |
| 48 | "consoleblank=0 earlycon=ns16550a,mmio32,0x02800000\0" \ |
| 49 | "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \ |
| 50 | "if test \"$confirm\" = \"y\"; then " \ |
| 51 | "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ |
| 52 | "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ |
| 53 | "${blkcnt}; fi\0" |
| 54 | |
| 55 | #endif /* __VERDIN_AM62_H */ |