Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX7ULP EVK board. |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __MX7ULP_EVK_CONFIG_H |
| 9 | #define __MX7ULP_EVK_CONFIG_H |
| 10 | |
| 11 | #include <linux/sizes.h> |
| 12 | #include <asm/arch/imx-regs.h> |
| 13 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 14 | #define CONFIG_SYS_BOOTM_LEN 0x1000000 |
| 15 | |
Peng Fan | 8e86111 | 2017-02-22 16:21:57 +0800 | [diff] [blame] | 16 | #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ |
Peng Fan | 8e86111 | 2017-02-22 16:21:57 +0800 | [diff] [blame] | 17 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 18 | /* Using ULP WDOG for reset */ |
| 19 | #define WDOG_BASE_ADDR WDG1_RBASE |
| 20 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 21 | #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */ |
| 22 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 23 | /* UART */ |
| 24 | #define LPUART_BASE LPUART4_RBASE |
| 25 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 26 | /* Miscellaneous configurable options */ |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 27 | #define CONFIG_SYS_CBSIZE 512 |
| 28 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 29 | #define CONFIG_SYS_MAXARGS 256 |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 30 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 31 | /* Physical Memory Map */ |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 32 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 33 | #define PHYS_SDRAM 0x60000000 |
| 34 | #define PHYS_SDRAM_SIZE SZ_1G |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 35 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 36 | |
Peng Fan | 8e86111 | 2017-02-22 16:21:57 +0800 | [diff] [blame] | 37 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 38 | "script=boot.scr\0" \ |
| 39 | "image=zImage\0" \ |
| 40 | "console=ttyLP0\0" \ |
| 41 | "fdt_high=0xffffffff\0" \ |
| 42 | "initrd_high=0xffffffff\0" \ |
| 43 | "fdt_file=imx7ulp-evk.dtb\0" \ |
| 44 | "fdt_addr=0x63000000\0" \ |
| 45 | "boot_fdt=try\0" \ |
| 46 | "earlycon=lpuart32,0x402D0010\0" \ |
| 47 | "ip_dyn=yes\0" \ |
| 48 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 49 | "mmcpart=1\0" \ |
Peng Fan | 8e86111 | 2017-02-22 16:21:57 +0800 | [diff] [blame] | 50 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 51 | "mmcautodetect=yes\0" \ |
| 52 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 53 | "root=${mmcroot}\0" \ |
| 54 | "loadbootscript=" \ |
| 55 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 56 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 57 | "source\0" \ |
| 58 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 59 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 60 | "mmcboot=echo Booting from mmc ...; " \ |
| 61 | "run mmcargs; " \ |
| 62 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 63 | "if run loadfdt; then " \ |
| 64 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 65 | "else " \ |
| 66 | "if test ${boot_fdt} = try; then " \ |
| 67 | "bootz; " \ |
| 68 | "else " \ |
| 69 | "echo WARN: Cannot load the DT; " \ |
| 70 | "fi; " \ |
| 71 | "fi; " \ |
| 72 | "else " \ |
| 73 | "bootz; " \ |
| 74 | "fi;\0" \ |
| 75 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 76 | "root=/dev/nfs " \ |
| 77 | "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 78 | "netboot=echo Booting from net ...; " \ |
| 79 | "run netargs; " \ |
| 80 | "if test ${ip_dyn} = yes; then " \ |
| 81 | "setenv get_cmd dhcp; " \ |
| 82 | "else " \ |
| 83 | "setenv get_cmd tftp; " \ |
| 84 | "fi; " \ |
| 85 | "usb start; "\ |
| 86 | "${get_cmd} ${image}; " \ |
| 87 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 88 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 89 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 90 | "else " \ |
| 91 | "if test ${boot_fdt} = try; then " \ |
| 92 | "bootz; " \ |
| 93 | "else " \ |
| 94 | "echo WARN: Cannot load the DT; " \ |
| 95 | "fi; " \ |
| 96 | "fi; " \ |
| 97 | "else " \ |
| 98 | "bootz; " \ |
| 99 | "fi;\0" \ |
| 100 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 101 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 102 | #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K |
| 103 | |
| 104 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 105 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 106 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 107 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 108 | |
Peng Fan | f7765d7 | 2017-02-22 16:21:56 +0800 | [diff] [blame] | 109 | #endif /* __CONFIG_H */ |