Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX6UL 14x14 EVK board. |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __MX6ULLEVK_CONFIG_H |
| 8 | #define __MX6ULLEVK_CONFIG_H |
| 9 | |
| 10 | |
| 11 | #include <asm/arch/imx-regs.h> |
| 12 | #include <linux/sizes.h> |
| 13 | #include "mx6_common.h" |
Stefano Babic | 33731bc | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 14 | #include <asm/mach-imx/gpio.h> |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 15 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 16 | #define PHYS_SDRAM_SIZE SZ_512M |
| 17 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 18 | /* Size of malloc() pool */ |
| 19 | #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) |
| 20 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 21 | #define CONFIG_MXC_UART |
| 22 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 23 | |
| 24 | /* MMC Configs */ |
| 25 | #ifdef CONFIG_FSL_USDHC |
| 26 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR |
| 27 | |
| 28 | /* NAND pin conflicts with usdhc2 */ |
| 29 | #ifdef CONFIG_SYS_USE_NAND |
| 30 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 31 | #else |
| 32 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 33 | #endif |
| 34 | #endif |
| 35 | |
| 36 | /* I2C configs */ |
| 37 | #ifdef CONFIG_CMD_I2C |
| 38 | #define CONFIG_SYS_I2C_MXC |
| 39 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 40 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ |
| 41 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 42 | #endif |
| 43 | |
| 44 | #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 |
| 45 | |
| 46 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 47 | "script=boot.scr\0" \ |
| 48 | "image=zImage\0" \ |
| 49 | "console=ttymxc0\0" \ |
| 50 | "fdt_high=0xffffffff\0" \ |
| 51 | "initrd_high=0xffffffff\0" \ |
Peng Fan | 5098eae | 2019-08-08 09:55:57 +0000 | [diff] [blame] | 52 | "fdt_file=undefined\0" \ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 53 | "fdt_addr=0x83000000\0" \ |
| 54 | "boot_fdt=try\0" \ |
| 55 | "ip_dyn=yes\0" \ |
| 56 | "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \ |
| 57 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
| 58 | "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ |
| 59 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 60 | "mmcautodetect=yes\0" \ |
| 61 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 62 | "root=${mmcroot}\0" \ |
| 63 | "loadbootscript=" \ |
| 64 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 65 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 66 | "source\0" \ |
| 67 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 68 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 69 | "mmcboot=echo Booting from mmc ...; " \ |
| 70 | "run mmcargs; " \ |
| 71 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 72 | "if run loadfdt; 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" \ |
Peng Fan | 5098eae | 2019-08-08 09:55:57 +0000 | [diff] [blame] | 84 | "findfdt="\ |
| 85 | "if test $fdt_file = undefined; then " \ |
| 86 | "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \ |
| 87 | "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \ |
| 88 | "if test $board_name = EVK && test $board_rev = 14X14; then " \ |
| 89 | "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \ |
| 90 | "if test $fdt_file = undefined; then " \ |
| 91 | "echo WARNING: Could not determine dtb to use; " \ |
| 92 | "fi; " \ |
| 93 | "fi;\0" \ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 94 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 95 | "root=/dev/nfs " \ |
| 96 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 97 | "netboot=echo Booting from net ...; " \ |
| 98 | "run netargs; " \ |
| 99 | "if test ${ip_dyn} = yes; then " \ |
| 100 | "setenv get_cmd dhcp; " \ |
| 101 | "else " \ |
| 102 | "setenv get_cmd tftp; " \ |
| 103 | "fi; " \ |
| 104 | "${get_cmd} ${image}; " \ |
| 105 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 106 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 107 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 108 | "else " \ |
| 109 | "if test ${boot_fdt} = try; then " \ |
| 110 | "bootz; " \ |
| 111 | "else " \ |
| 112 | "echo WARN: Cannot load the DT; " \ |
| 113 | "fi; " \ |
| 114 | "fi; " \ |
| 115 | "else " \ |
| 116 | "bootz; " \ |
| 117 | "fi;\0" \ |
| 118 | |
| 119 | #define CONFIG_BOOTCOMMAND \ |
Peng Fan | 5098eae | 2019-08-08 09:55:57 +0000 | [diff] [blame] | 120 | "run findfdt;" \ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 121 | "mmc dev ${mmcdev};" \ |
| 122 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 123 | "if run loadbootscript; then " \ |
| 124 | "run bootscript; " \ |
| 125 | "else " \ |
| 126 | "if run loadimage; then " \ |
| 127 | "run mmcboot; " \ |
| 128 | "else run netboot; " \ |
| 129 | "fi; " \ |
| 130 | "fi; " \ |
| 131 | "else run netboot; fi" |
| 132 | |
| 133 | /* Miscellaneous configurable options */ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 134 | |
| 135 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 136 | #define CONFIG_SYS_HZ 1000 |
| 137 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 138 | /* Physical Memory Map */ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 139 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 140 | |
| 141 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 142 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 143 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 144 | |
| 145 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 146 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 147 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 148 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 149 | |
Masahiro Yamada | 8cea9b5 | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 150 | /* environment organization */ |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 151 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ |
| 152 | #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ |
| 153 | #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ |
| 154 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 155 | #define CONFIG_IMX_THERMAL |
| 156 | |
| 157 | #define CONFIG_IOMUX_LPSR |
| 158 | |
| 159 | #define CONFIG_SOFT_SPI |
| 160 | |
Fabio Estevam | 4ada4f0 | 2020-02-03 14:23:58 -0300 | [diff] [blame] | 161 | #ifdef CONFIG_CMD_NET |
| 162 | #define CONFIG_FEC_ENET_DEV 1 |
| 163 | #if (CONFIG_FEC_ENET_DEV == 0) |
| 164 | #define CONFIG_ETHPRIME "eth0" |
| 165 | #elif (CONFIG_FEC_ENET_DEV == 1) |
| 166 | #define CONFIG_ETHPRIME "eth1" |
| 167 | #endif |
| 168 | #endif |
| 169 | |
Peng Fan | 8159063 | 2016-08-11 14:02:57 +0800 | [diff] [blame] | 170 | #endif |