1 /* 2 * Configuration settings for the Novena U-boot. 3 * 4 * Copyright (C) 2014 Marek Vasut <marex@denx.de> 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __CONFIG_H 10 #define __CONFIG_H 11 12 /* System configurations */ 13 #define CONFIG_MX6 14 #define CONFIG_BOARD_EARLY_INIT_F 15 #define CONFIG_BOARD_LATE_INIT 16 #define CONFIG_MISC_INIT_R 17 #define CONFIG_DISPLAY_BOARDINFO 18 #define CONFIG_DISPLAY_CPUINFO 19 #define CONFIG_DOS_PARTITION 20 #define CONFIG_FAT_WRITE 21 #define CONFIG_FIT 22 #define CONFIG_KEYBOARD 23 #define CONFIG_MXC_GPIO 24 #define CONFIG_OF_LIBFDT 25 #define CONFIG_REGEX 26 #define CONFIG_SYS_GENERIC_BOARD 27 #define CONFIG_SYS_NO_FLASH 28 29 #include "configs/mx6_common.h" 30 #include <asm/arch/imx-regs.h> 31 #include <asm/imx-common/gpio.h> 32 #include <config_cmd_default.h> 33 34 /* U-Boot Commands */ 35 #define CONFIG_CMD_ASKENV 36 #define CONFIG_CMD_BMODE 37 #define CONFIG_CMD_BOOTZ 38 #define CONFIG_CMD_CACHE 39 #define CONFIG_CMD_DHCP 40 #define CONFIG_CMD_EEPROM 41 #define CONFIG_CMD_EXT4 42 #define CONFIG_CMD_EXT4_WRITE 43 #define CONFIG_CMD_FAT 44 #define CONFIG_CMD_FS_GENERIC 45 #define CONFIG_CMD_I2C 46 #define CONFIG_CMD_FUSE 47 #define CONFIG_CMD_MII 48 #define CONFIG_CMD_MMC 49 #define CONFIG_CMD_NET 50 #define CONFIG_CMD_PCI 51 #define CONFIG_CMD_PING 52 #define CONFIG_CMD_SATA 53 #define CONFIG_CMD_SETEXPR 54 #define CONFIG_CMD_TIME 55 #define CONFIG_CMD_USB 56 #define CONFIG_VIDEO 57 58 /* U-Boot general configurations */ 59 #define CONFIG_SYS_LONGHELP 60 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */ 61 #define CONFIG_SYS_MAXARGS 32 /* Max number of command args */ 62 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 63 /* Boot argument buffer size */ 64 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */ 65 #define CONFIG_AUTO_COMPLETE /* Command auto complete */ 66 #define CONFIG_CMDLINE_EDITING /* Command history etc */ 67 #define CONFIG_SYS_HUSH_PARSER 68 69 /* U-Boot environment */ 70 #define CONFIG_ENV_OVERWRITE 71 #define CONFIG_ENV_SIZE (16 * 1024) 72 /* 73 * Environment is on MMC, starting at offset 512KiB from start of the card. 74 * Please place first partition at offset 1MiB from the start of the card 75 * as recommended by GNU/fdisk. See below for details: 76 * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html 77 */ 78 #ifdef CONFIG_CMD_MMC 79 #define CONFIG_ENV_IS_IN_MMC 80 #define CONFIG_SYS_MMC_ENV_DEV 0 81 #define CONFIG_ENV_OFFSET (512 * 1024) 82 #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE 83 #define CONFIG_ENV_OFFSET_REDUND \ 84 (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) 85 #else 86 #define CONFIG_ENV_IS_NOWHERE 87 #endif 88 89 /* Booting Linux */ 90 #define CONFIG_BOOTDELAY 5 91 #define CONFIG_BOOTFILE "fitImage" 92 #define CONFIG_BOOTARGS "console=ttymxc1,115200 " 93 #define CONFIG_BOOTCOMMAND "run net_nfs" 94 #define CONFIG_LOADADDR 0x18000000 95 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 96 #define CONFIG_HOSTNAME novena 97 98 /* Physical Memory Map */ 99 #define CONFIG_NR_DRAM_BANKS 1 100 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 101 #define PHYS_SDRAM_SIZE 0xF0000000 102 103 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 104 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 105 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 106 107 #define CONFIG_SYS_INIT_SP_OFFSET \ 108 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 109 #define CONFIG_SYS_INIT_SP_ADDR \ 110 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 111 112 #define CONFIG_SYS_MEMTEST_START 0x10000000 113 #define CONFIG_SYS_MEMTEST_END 0x20000000 114 115 #define CONFIG_SYS_MALLOC_LEN (64 * 1024 * 1024) 116 117 /* SPL */ 118 #define CONFIG_SPL_FAT_SUPPORT 119 #define CONFIG_SPL_MMC_SUPPORT 120 #include "imx6_spl.h" /* common IMX6 SPL configuration */ 121 122 #define CONFIG_CMDLINE_TAG 123 #define CONFIG_SETUP_MEMORY_TAGS 124 #define CONFIG_INITRD_TAG 125 #define CONFIG_REVISION_TAG 126 127 /* Ethernet Configuration */ 128 #ifdef CONFIG_CMD_NET 129 #define CONFIG_FEC_MXC 130 #define CONFIG_MII 131 #define IMX_FEC_BASE ENET_BASE_ADDR 132 #define CONFIG_FEC_XCV_TYPE RGMII 133 #define CONFIG_ETHPRIME "FEC" 134 #define CONFIG_FEC_MXC_PHYADDR 0x7 135 #define CONFIG_PHYLIB 136 #define CONFIG_PHY_MICREL 137 #define CONFIG_PHY_MICREL_KSZ9021 138 #define CONFIG_ARP_TIMEOUT 200UL 139 #endif 140 141 /* I2C */ 142 #define CONFIG_SYS_I2C 143 #define CONFIG_SYS_I2C_MXC 144 #define CONFIG_I2C_MULTI_BUS 145 #define CONFIG_I2C_MXC 146 #define CONFIG_SYS_I2C_SPEED 100000 147 148 /* I2C EEPROM */ 149 #ifdef CONFIG_CMD_EEPROM 150 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 151 #define CONFIG_SYS_SPD_BUS_NUM 2 152 #endif 153 154 /* MMC Configs */ 155 #ifdef CONFIG_CMD_MMC 156 #define CONFIG_MMC 157 #define CONFIG_GENERIC_MMC 158 #define CONFIG_BOUNCE_BUFFER 159 #define CONFIG_FSL_ESDHC 160 #define CONFIG_FSL_USDHC 161 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 162 #define CONFIG_SYS_FSL_USDHC_NUM 2 163 #endif 164 165 /* OCOTP Configs */ 166 #ifdef CONFIG_CMD_FUSE 167 #define CONFIG_MXC_OCOTP 168 #endif 169 170 /* PCI express */ 171 #ifdef CONFIG_CMD_PCI 172 #define CONFIG_PCI 173 #define CONFIG_PCI_PNP 174 #define CONFIG_PCI_SCAN_SHOW 175 #define CONFIG_PCIE_IMX 176 #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(3, 29) 177 #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(7, 12) 178 #endif 179 180 /* PMIC */ 181 #define CONFIG_POWER 182 #define CONFIG_POWER_I2C 183 #define CONFIG_POWER_PFUZE100 184 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 185 186 /* SATA Configs */ 187 #ifdef CONFIG_CMD_SATA 188 #define CONFIG_DWC_AHSATA 189 #define CONFIG_SYS_SATA_MAX_DEVICE 1 190 #define CONFIG_DWC_AHSATA_PORT_ID 0 191 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR 192 #define CONFIG_LBA48 193 #define CONFIG_LIBATA 194 #endif 195 196 /* UART */ 197 #define CONFIG_MXC_UART 198 #define CONFIG_MXC_UART_BASE UART2_BASE 199 #define CONFIG_BAUDRATE 115200 200 #define CONFIG_CONS_INDEX 1 201 202 /* USB Configs */ 203 #ifdef CONFIG_CMD_USB 204 #define CONFIG_USB_EHCI 205 #define CONFIG_USB_EHCI_MX6 206 #define CONFIG_USB_STORAGE 207 #define CONFIG_USB_KEYBOARD 208 #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP 209 #define CONFIG_USB_HOST_ETHER 210 #define CONFIG_USB_ETHER_ASIX 211 #define CONFIG_USB_ETHER_SMSC95XX 212 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 213 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 214 #define CONFIG_MXC_USB_FLAGS 0 215 /* Gadget part */ 216 #define CONFIG_CI_UDC 217 #define CONFIG_USBD_HS 218 #define CONFIG_USB_GADGET_DUALSPEED 219 #define CONFIG_USB_ETHER 220 #define CONFIG_USB_ETH_CDC 221 #define CONFIG_NETCONSOLE 222 #endif 223 224 /* Video output */ 225 #ifdef CONFIG_VIDEO 226 #define CONFIG_VIDEO_IPUV3 227 #define CONFIG_CFB_CONSOLE 228 #define CONFIG_VGA_AS_SINGLE_DEVICE 229 #define CONFIG_SYS_CONSOLE_IS_IN_ENV 230 #define CONFIG_VIDEO_BMP_RLE8 231 #define CONFIG_SPLASH_SCREEN 232 #define CONFIG_BMP_16BPP 233 #define CONFIG_VIDEO_LOGO 234 #define CONFIG_IPUV3_CLK 260000000 235 #define CONFIG_CMD_HDMIDETECT 236 #define CONFIG_CONSOLE_MUX 237 #define CONFIG_IMX_HDMI 238 #define CONFIG_IMX_VIDEO_SKIP 239 #endif 240 241 /* Extra U-Boot environment. */ 242 #define CONFIG_EXTRA_ENV_SETTINGS \ 243 "fdt_high=0xffffffff\0" \ 244 "initrd_high=0xffffffff\0" \ 245 "consdev=ttymxc1\0" \ 246 "baudrate=115200\0" \ 247 "bootdev=/dev/mmcblk0p1\0" \ 248 "rootdev=/dev/mmcblk0p2\0" \ 249 "netdev=eth0\0" \ 250 "kernel_addr_r=0x18000000\0" \ 251 "addcons=" \ 252 "setenv bootargs ${bootargs} " \ 253 "console=${consdev},${baudrate}\0" \ 254 "addip=" \ 255 "setenv bootargs ${bootargs} " \ 256 "ip=${ipaddr}:${serverip}:${gatewayip}:" \ 257 "${netmask}:${hostname}:${netdev}:off\0" \ 258 "addmisc=" \ 259 "setenv bootargs ${bootargs} ${miscargs}\0" \ 260 "addargs=run addcons addmisc\0" \ 261 "mmcload=" \ 262 "mmc rescan ; " \ 263 "ext4load mmc 0:1 ${kernel_addr_r} ${bootfile}\0" \ 264 "netload=" \ 265 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ 266 "miscargs=nohlt panic=1\0" \ 267 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \ 268 "nfsargs=" \ 269 "setenv bootargs root=/dev/nfs rw " \ 270 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \ 271 "mmc_mmc=" \ 272 "run mmcload mmcargs addargs ; " \ 273 "bootm ${kernel_addr_r}\0" \ 274 "mmc_nfs=" \ 275 "run mmcload nfsargs addip addargs ; " \ 276 "bootm ${kernel_addr_r}\0" \ 277 "net_mmc=" \ 278 "run netload mmcargs addargs ; " \ 279 "bootm ${kernel_addr_r}\0" \ 280 "net_nfs=" \ 281 "run netload nfsargs addip addargs ; " \ 282 "bootm ${kernel_addr_r}\0" \ 283 "update_sd_spl_filename=SPL\0" \ 284 "update_sd_uboot_filename=u-boot.img\0" \ 285 "update_sd_firmware=" /* Update the SD firmware partition */ \ 286 "if mmc rescan ; then " \ 287 "if dhcp ${update_sd_spl_filename} ; then " \ 288 "mmc write ${loadaddr} 2 0x200 ; " \ 289 "fi ; " \ 290 "if dhcp ${update_sd_uboot_filename} ; then " \ 291 "fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; "\ 292 "fi ; " \ 293 "fi\0" \ 294 295 #endif /* __CONFIG_H */ 296