1860b32eeSFabio Estevam /* 2860b32eeSFabio Estevam * Copyright (C) 2011 Freescale Semiconductor, Inc. 3860b32eeSFabio Estevam * 4c4c596fbSFabio Estevam * Configuration settings for the MX53SMD Freescale board. 5860b32eeSFabio Estevam * 61a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 7860b32eeSFabio Estevam */ 8860b32eeSFabio Estevam 9860b32eeSFabio Estevam #ifndef __CONFIG_H 10860b32eeSFabio Estevam #define __CONFIG_H 11860b32eeSFabio Estevam 12860b32eeSFabio Estevam #define CONFIG_MX53 13860b32eeSFabio Estevam 14860b32eeSFabio Estevam #define CONFIG_DISPLAY_CPUINFO 15860b32eeSFabio Estevam #define CONFIG_DISPLAY_BOARDINFO 16860b32eeSFabio Estevam 17c4c596fbSFabio Estevam #define CONFIG_MACH_TYPE MACH_TYPE_MX53_SMD 18c4c596fbSFabio Estevam 19860b32eeSFabio Estevam #include <asm/arch/imx-regs.h> 20860b32eeSFabio Estevam 21860b32eeSFabio Estevam #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 22860b32eeSFabio Estevam #define CONFIG_SETUP_MEMORY_TAGS 23860b32eeSFabio Estevam #define CONFIG_INITRD_TAG 24fd622f23SFabio Estevam #define CONFIG_REVISION_TAG 25860b32eeSFabio Estevam 26*5a416df0SFabio Estevam #define CONFIG_SYS_GENERIC_BOARD 27*5a416df0SFabio Estevam 28860b32eeSFabio Estevam /* Size of malloc() pool */ 29860b32eeSFabio Estevam #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) 30860b32eeSFabio Estevam 31860b32eeSFabio Estevam #define CONFIG_BOARD_EARLY_INIT_F 32860b32eeSFabio Estevam #define CONFIG_MXC_GPIO 33860b32eeSFabio Estevam 34860b32eeSFabio Estevam #define CONFIG_MXC_UART 3540f6fffeSStefano Babic #define CONFIG_MXC_UART_BASE UART1_BASE 36860b32eeSFabio Estevam 37860b32eeSFabio Estevam /* I2C Configs */ 38860b32eeSFabio Estevam #define CONFIG_CMD_I2C 39b089d039Strem #define CONFIG_SYS_I2C 40b089d039Strem #define CONFIG_SYS_I2C_MXC 41860b32eeSFabio Estevam 42860b32eeSFabio Estevam /* MMC Configs */ 43860b32eeSFabio Estevam #define CONFIG_FSL_ESDHC 44860b32eeSFabio Estevam #define CONFIG_SYS_FSL_ESDHC_ADDR 0 45860b32eeSFabio Estevam #define CONFIG_SYS_FSL_ESDHC_NUM 1 46860b32eeSFabio Estevam 47860b32eeSFabio Estevam #define CONFIG_MMC 48860b32eeSFabio Estevam #define CONFIG_CMD_MMC 49860b32eeSFabio Estevam #define CONFIG_GENERIC_MMC 50860b32eeSFabio Estevam #define CONFIG_CMD_FAT 51860b32eeSFabio Estevam #define CONFIG_DOS_PARTITION 52860b32eeSFabio Estevam 53860b32eeSFabio Estevam /* Eth Configs */ 54860b32eeSFabio Estevam #define CONFIG_HAS_ETH1 55860b32eeSFabio Estevam #define CONFIG_MII 56860b32eeSFabio Estevam 57860b32eeSFabio Estevam #define CONFIG_FEC_MXC 58860b32eeSFabio Estevam #define IMX_FEC_BASE FEC_BASE_ADDR 59860b32eeSFabio Estevam #define CONFIG_FEC_MXC_PHYADDR 0x1F 60860b32eeSFabio Estevam 61860b32eeSFabio Estevam #define CONFIG_CMD_PING 62860b32eeSFabio Estevam #define CONFIG_CMD_DHCP 63860b32eeSFabio Estevam #define CONFIG_CMD_MII 64860b32eeSFabio Estevam #define CONFIG_CMD_NET 65860b32eeSFabio Estevam 66860b32eeSFabio Estevam /* allow to overwrite serial and ethaddr */ 67860b32eeSFabio Estevam #define CONFIG_ENV_OVERWRITE 68860b32eeSFabio Estevam #define CONFIG_CONS_INDEX 1 69860b32eeSFabio Estevam #define CONFIG_BAUDRATE 115200 70860b32eeSFabio Estevam 71860b32eeSFabio Estevam /* Command definition */ 72860b32eeSFabio Estevam #include <config_cmd_default.h> 73860b32eeSFabio Estevam 74860b32eeSFabio Estevam #undef CONFIG_CMD_IMLS 75860b32eeSFabio Estevam 76860b32eeSFabio Estevam #define CONFIG_BOOTDELAY 3 77860b32eeSFabio Estevam 7828b119e9SWolfgang Grandegger #define CONFIG_ETHPRIME "FEC0" 79860b32eeSFabio Estevam 80860b32eeSFabio Estevam #define CONFIG_LOADADDR 0x70800000 /* loadaddr env var */ 81860b32eeSFabio Estevam #define CONFIG_SYS_TEXT_BASE 0x77800000 82860b32eeSFabio Estevam 83860b32eeSFabio Estevam #define CONFIG_EXTRA_ENV_SETTINGS \ 84860b32eeSFabio Estevam "script=boot.scr\0" \ 85860b32eeSFabio Estevam "uimage=uImage\0" \ 86860b32eeSFabio Estevam "mmcdev=0\0" \ 87860b32eeSFabio Estevam "mmcpart=2\0" \ 88860b32eeSFabio Estevam "mmcroot=/dev/mmcblk0p3 rw\0" \ 89860b32eeSFabio Estevam "mmcrootfstype=ext3 rootwait\0" \ 90860b32eeSFabio Estevam "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \ 91860b32eeSFabio Estevam "root=${mmcroot} " \ 92860b32eeSFabio Estevam "rootfstype=${mmcrootfstype}\0" \ 93860b32eeSFabio Estevam "loadbootscript=" \ 94860b32eeSFabio Estevam "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 95860b32eeSFabio Estevam "bootscript=echo Running bootscript from mmc ...; " \ 96860b32eeSFabio Estevam "source\0" \ 97860b32eeSFabio Estevam "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ 98860b32eeSFabio Estevam "mmcboot=echo Booting from mmc ...; " \ 99860b32eeSFabio Estevam "run mmcargs; " \ 100860b32eeSFabio Estevam "bootm\0" \ 101860b32eeSFabio Estevam "netargs=setenv bootargs console=ttymxc0,${baudrate} " \ 102860b32eeSFabio Estevam "root=/dev/nfs " \ 103860b32eeSFabio Estevam "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 104860b32eeSFabio Estevam "netboot=echo Booting from net ...; " \ 105860b32eeSFabio Estevam "run netargs; " \ 106860b32eeSFabio Estevam "dhcp ${uimage}; bootm\0" \ 107860b32eeSFabio Estevam 108860b32eeSFabio Estevam #define CONFIG_BOOTCOMMAND \ 10966968110SAndrew Bradford "mmc dev ${mmcdev}; if mmc rescan; then " \ 110860b32eeSFabio Estevam "if run loadbootscript; then " \ 111860b32eeSFabio Estevam "run bootscript; " \ 112860b32eeSFabio Estevam "else " \ 113860b32eeSFabio Estevam "if run loaduimage; then " \ 114860b32eeSFabio Estevam "run mmcboot; " \ 115860b32eeSFabio Estevam "else run netboot; " \ 116860b32eeSFabio Estevam "fi; " \ 117860b32eeSFabio Estevam "fi; " \ 118860b32eeSFabio Estevam "else run netboot; fi" 119860b32eeSFabio Estevam #define CONFIG_ARP_TIMEOUT 200UL 120860b32eeSFabio Estevam 121860b32eeSFabio Estevam /* Miscellaneous configurable options */ 122860b32eeSFabio Estevam #define CONFIG_SYS_LONGHELP /* undef to save memory */ 123860b32eeSFabio Estevam #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ 124860b32eeSFabio Estevam #define CONFIG_AUTO_COMPLETE 125860b32eeSFabio Estevam #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ 126860b32eeSFabio Estevam 127860b32eeSFabio Estevam /* Print Buffer Size */ 128860b32eeSFabio Estevam #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) 129860b32eeSFabio Estevam #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ 130860b32eeSFabio Estevam #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ 131860b32eeSFabio Estevam 132860b32eeSFabio Estevam #define CONFIG_SYS_MEMTEST_START 0x70000000 133869aed7bSFabio Estevam #define CONFIG_SYS_MEMTEST_END 0x70010000 134860b32eeSFabio Estevam 135860b32eeSFabio Estevam #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 136860b32eeSFabio Estevam 137860b32eeSFabio Estevam #define CONFIG_CMDLINE_EDITING 138860b32eeSFabio Estevam 139860b32eeSFabio Estevam /* Physical Memory Map */ 140860b32eeSFabio Estevam #define CONFIG_NR_DRAM_BANKS 2 141860b32eeSFabio Estevam #define PHYS_SDRAM_1 CSD0_BASE_ADDR 142860b32eeSFabio Estevam #define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024) 143860b32eeSFabio Estevam #define PHYS_SDRAM_2 CSD1_BASE_ADDR 144860b32eeSFabio Estevam #define PHYS_SDRAM_2_SIZE (512 * 1024 * 1024) 145860b32eeSFabio Estevam #define PHYS_SDRAM_SIZE (PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE) 146860b32eeSFabio Estevam 147860b32eeSFabio Estevam #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1) 148860b32eeSFabio Estevam #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR) 149860b32eeSFabio Estevam #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE) 150860b32eeSFabio Estevam 151860b32eeSFabio Estevam #define CONFIG_SYS_INIT_SP_OFFSET \ 152860b32eeSFabio Estevam (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 153860b32eeSFabio Estevam #define CONFIG_SYS_INIT_SP_ADDR \ 154860b32eeSFabio Estevam (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 155860b32eeSFabio Estevam 156860b32eeSFabio Estevam /* FLASH and environment organization */ 157860b32eeSFabio Estevam #define CONFIG_SYS_NO_FLASH 158860b32eeSFabio Estevam 159860b32eeSFabio Estevam #define CONFIG_ENV_OFFSET (6 * 64 * 1024) 160860b32eeSFabio Estevam #define CONFIG_ENV_SIZE (8 * 1024) 161860b32eeSFabio Estevam #define CONFIG_ENV_IS_IN_MMC 162860b32eeSFabio Estevam #define CONFIG_SYS_MMC_ENV_DEV 0 163860b32eeSFabio Estevam 164860b32eeSFabio Estevam #define CONFIG_OF_LIBFDT 165860b32eeSFabio Estevam 166860b32eeSFabio Estevam #endif /* __CONFIG_H */ 167