1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) 2015 Freescale Semiconductor, Inc. 4 * Copyright (C) 2016 Grinn 5 * 6 * Configuration settings for the Grinn liteBoard (i.MX6UL). 7 */ 8 #ifndef __LITEBOARD_CONFIG_H 9 #define __LITEBOARD_CONFIG_H 10 11 #include <asm/arch/imx-regs.h> 12 #include <linux/sizes.h> 13 #include <linux/stringify.h> 14 #include "mx6_common.h" 15 16 #define CFG_MXC_UART_BASE UART1_BASE 17 18 /* MMC Configs */ 19 #ifdef CONFIG_FSL_USDHC 20 #define CFG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR 21 #endif 22 23 #define CFG_EXTRA_ENV_SETTINGS \ 24 "script=boot.scr\0" \ 25 "image=zImage\0" \ 26 "console=ttymxc0\0" \ 27 "fdt_high=0xffffffff\0" \ 28 "initrd_high=0xffffffff\0" \ 29 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 30 "fdt_addr=0x83000000\0" \ 31 "boot_fdt=try\0" \ 32 "ip_dyn=yes\0" \ 33 "mmcdev="__stringify(CONFIG_ENV_MMC_DEVICE_INDEX)"\0" \ 34 "mmcpart=1\0" \ 35 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ 36 "mmcautodetect=yes\0" \ 37 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 38 "root=${mmcroot}\0" \ 39 "loadbootscript=" \ 40 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 41 "bootscript=echo Running bootscript from mmc ...; " \ 42 "source\0" \ 43 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 44 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 45 "mmcboot=echo Booting from mmc ...; " \ 46 "run mmcargs; " \ 47 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 48 "if run loadfdt; then " \ 49 "bootz ${loadaddr} - ${fdt_addr}; " \ 50 "else " \ 51 "if test ${boot_fdt} = try; then " \ 52 "bootz; " \ 53 "else " \ 54 "echo WARN: Cannot load the DT; " \ 55 "fi; " \ 56 "fi; " \ 57 "else " \ 58 "bootz; " \ 59 "fi;\0" \ 60 "netargs=setenv bootargs console=${console},${baudrate} " \ 61 "root=/dev/nfs " \ 62 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 63 "netboot=echo Booting from net ...; " \ 64 "run netargs; " \ 65 "if test ${ip_dyn} = yes; then " \ 66 "setenv get_cmd dhcp; " \ 67 "else " \ 68 "setenv get_cmd tftp; " \ 69 "fi; " \ 70 "${get_cmd} ${image}; " \ 71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 72 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ 73 "bootz ${loadaddr} - ${fdt_addr}; " \ 74 "else " \ 75 "if test ${boot_fdt} = try; then " \ 76 "bootz; " \ 77 "else " \ 78 "echo WARN: Cannot load the DT; " \ 79 "fi; " \ 80 "fi; " \ 81 "else " \ 82 "bootz; " \ 83 "fi;\0" 84 85 /* Miscellaneous configurable options */ 86 87 /* Physical Memory Map */ 88 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 89 90 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM 91 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 92 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE 93 94 /* FLASH and environment organization */ 95 96 #ifdef CONFIG_CMD_NET 97 #define CFG_FEC_ENET_DEV 0 98 99 #define CFG_FEC_MXC_PHYADDR 0x0 100 #endif 101 102 #endif 103