1e32028a7SNikita Kiryanov /* 2e32028a7SNikita Kiryanov * Config file for Compulab CM-FX6 board 3e32028a7SNikita Kiryanov * 4e32028a7SNikita Kiryanov * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ 5e32028a7SNikita Kiryanov * 6e32028a7SNikita Kiryanov * Author: Nikita Kiryanov <nikita@compulab.co.il> 7e32028a7SNikita Kiryanov * 8e32028a7SNikita Kiryanov * SPDX-License-Identifier: GPL-2.0+ 9e32028a7SNikita Kiryanov */ 10e32028a7SNikita Kiryanov 11e32028a7SNikita Kiryanov #ifndef __CONFIG_CM_FX6_H 12e32028a7SNikita Kiryanov #define __CONFIG_CM_FX6_H 13e32028a7SNikita Kiryanov 14e32028a7SNikita Kiryanov #include <asm/arch/imx-regs.h> 15e32028a7SNikita Kiryanov #include <config_distro_defaults.h> 16e32028a7SNikita Kiryanov #include "mx6_common.h" 17e32028a7SNikita Kiryanov 18e32028a7SNikita Kiryanov /* Machine config */ 19e32028a7SNikita Kiryanov #define CONFIG_MX6 20e32028a7SNikita Kiryanov #define CONFIG_SYS_LITTLE_ENDIAN 21e32028a7SNikita Kiryanov #define CONFIG_MACH_TYPE 4273 22e32028a7SNikita Kiryanov #define CONFIG_SYS_HZ 1000 23e32028a7SNikita Kiryanov 24e32028a7SNikita Kiryanov /* Display information on boot */ 25e32028a7SNikita Kiryanov #define CONFIG_DISPLAY_CPUINFO 26e32028a7SNikita Kiryanov #define CONFIG_DISPLAY_BOARDINFO 27e32028a7SNikita Kiryanov #define CONFIG_TIMESTAMP 28e32028a7SNikita Kiryanov 29e32028a7SNikita Kiryanov /* CMD */ 30e32028a7SNikita Kiryanov #include <config_cmd_default.h> 31e32028a7SNikita Kiryanov #define CONFIG_CMD_GREPENV 32e32028a7SNikita Kiryanov #undef CONFIG_CMD_FLASH 33e32028a7SNikita Kiryanov #undef CONFIG_CMD_LOADB 34e32028a7SNikita Kiryanov #undef CONFIG_CMD_LOADS 35e32028a7SNikita Kiryanov #undef CONFIG_CMD_XIMG 36e32028a7SNikita Kiryanov #undef CONFIG_CMD_FPGA 37e32028a7SNikita Kiryanov #undef CONFIG_CMD_IMLS 38e32028a7SNikita Kiryanov 39e32028a7SNikita Kiryanov /* MMC */ 40e32028a7SNikita Kiryanov #define CONFIG_MMC 41e32028a7SNikita Kiryanov #define CONFIG_CMD_MMC 42e32028a7SNikita Kiryanov #define CONFIG_GENERIC_MMC 43e32028a7SNikita Kiryanov #define CONFIG_FSL_ESDHC 44e32028a7SNikita Kiryanov #define CONFIG_FSL_USDHC 45e32028a7SNikita Kiryanov #define CONFIG_SYS_FSL_USDHC_NUM 3 46e32028a7SNikita Kiryanov #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR 47e32028a7SNikita Kiryanov 48e32028a7SNikita Kiryanov /* RAM */ 49e32028a7SNikita Kiryanov #define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR 50e32028a7SNikita Kiryanov #define PHYS_SDRAM_2 MMDC1_ARB_BASE_ADDR 51e32028a7SNikita Kiryanov #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 52e32028a7SNikita Kiryanov #define CONFIG_NR_DRAM_BANKS 2 53e32028a7SNikita Kiryanov #define CONFIG_SYS_MEMTEST_START 0x10000000 54e32028a7SNikita Kiryanov #define CONFIG_SYS_MEMTEST_END 0x10010000 55e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 56e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 57e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_SP_OFFSET \ 58e32028a7SNikita Kiryanov (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 59e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_SP_ADDR \ 60e32028a7SNikita Kiryanov (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 61e32028a7SNikita Kiryanov 62e32028a7SNikita Kiryanov /* Serial console */ 63e32028a7SNikita Kiryanov #define CONFIG_MXC_UART 64e32028a7SNikita Kiryanov #define CONFIG_MXC_UART_BASE UART4_BASE 65e32028a7SNikita Kiryanov #define CONFIG_BAUDRATE 115200 66e32028a7SNikita Kiryanov #define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200} 67e32028a7SNikita Kiryanov 68e32028a7SNikita Kiryanov /* Shell */ 69e32028a7SNikita Kiryanov #define CONFIG_SYS_PROMPT "CM-FX6 # " 70e32028a7SNikita Kiryanov #define CONFIG_SYS_CBSIZE 1024 71e32028a7SNikita Kiryanov #define CONFIG_SYS_MAXARGS 16 72e32028a7SNikita Kiryanov #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 73e32028a7SNikita Kiryanov #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 74e32028a7SNikita Kiryanov sizeof(CONFIG_SYS_PROMPT) + 16) 75e32028a7SNikita Kiryanov 76e32028a7SNikita Kiryanov /* SPI flash */ 77e32028a7SNikita Kiryanov #define CONFIG_SYS_NO_FLASH 78e32028a7SNikita Kiryanov #define CONFIG_CMD_SF 79e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_BUS 0 80e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_CS 0 81e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_SPEED 25000000 82e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) 83e32028a7SNikita Kiryanov 84e32028a7SNikita Kiryanov /* Environment */ 85e32028a7SNikita Kiryanov #define CONFIG_ENV_OVERWRITE 86e32028a7SNikita Kiryanov #define CONFIG_ENV_IS_IN_SPI_FLASH 87e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED 88e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE 89e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS 90e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS 91e32028a7SNikita Kiryanov #define CONFIG_ENV_SECT_SIZE (64 * 1024) 92e32028a7SNikita Kiryanov #define CONFIG_ENV_SIZE (8 * 1024) 93e32028a7SNikita Kiryanov #define CONFIG_ENV_OFFSET (768 * 1024) 94e32028a7SNikita Kiryanov 95e32028a7SNikita Kiryanov #define CONFIG_EXTRA_ENV_SETTINGS \ 96e32028a7SNikita Kiryanov "kernel=uImage-cm-fx6\0" \ 97e32028a7SNikita Kiryanov "autoload=no\0" \ 98e32028a7SNikita Kiryanov "loadaddr=0x10800000\0" \ 99e32028a7SNikita Kiryanov "fdtaddr=0x11000000\0" \ 100e32028a7SNikita Kiryanov "console=ttymxc3,115200\0" \ 101e32028a7SNikita Kiryanov "ethprime=FEC0\0" \ 102e32028a7SNikita Kiryanov "bootscr=boot.scr\0" \ 103e32028a7SNikita Kiryanov "bootm_low=18000000\0" \ 104e32028a7SNikita Kiryanov "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \ 105e32028a7SNikita Kiryanov "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \ 106e32028a7SNikita Kiryanov "fdtfile=cm-fx6.dtb\0" \ 107e32028a7SNikita Kiryanov "doboot=bootm ${loadaddr}\0" \ 108e32028a7SNikita Kiryanov "loadfdt=false\0" \ 109e32028a7SNikita Kiryanov "setboottypez=setenv kernel zImage-cm-fx6;" \ 110e32028a7SNikita Kiryanov "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \ 111e32028a7SNikita Kiryanov "setenv loadfdt true;\0" \ 112e32028a7SNikita Kiryanov "setboottypem=setenv kernel uImage-cm-fx6;" \ 113e32028a7SNikita Kiryanov "setenv doboot bootm ${loadaddr};" \ 114e32028a7SNikita Kiryanov "setenv loadfdt false;\0"\ 115e32028a7SNikita Kiryanov "run_eboot=echo Starting EBOOT ...; "\ 116e32028a7SNikita Kiryanov "mmc dev ${mmcdev} && " \ 117e32028a7SNikita Kiryanov "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \ 118e32028a7SNikita Kiryanov "mmcdev=2\0" \ 119e32028a7SNikita Kiryanov "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \ 120e32028a7SNikita Kiryanov "loadmmcbootscript=load mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \ 121e32028a7SNikita Kiryanov "mmcbootscript=echo Running bootscript from mmc ...; "\ 122e32028a7SNikita Kiryanov "source ${loadaddr}\0" \ 123e32028a7SNikita Kiryanov "mmcargs=setenv bootargs console=${console} " \ 124e32028a7SNikita Kiryanov "root=${mmcroot} " \ 125e32028a7SNikita Kiryanov "${video}\0" \ 126e32028a7SNikita Kiryanov "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ 127e32028a7SNikita Kiryanov "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ 128e32028a7SNikita Kiryanov "mmcboot=echo Booting from mmc ...; " \ 129e32028a7SNikita Kiryanov "run mmcargs; " \ 130e32028a7SNikita Kiryanov "run doboot\0" \ 131a6b0652bSNikita Kiryanov "nandroot=/dev/mtdblock4 rw\0" \ 132a6b0652bSNikita Kiryanov "nandrootfstype=ubifs\0" \ 133a6b0652bSNikita Kiryanov "nandargs=setenv bootargs console=${console} " \ 134a6b0652bSNikita Kiryanov "root=${nandroot} " \ 135a6b0652bSNikita Kiryanov "rootfstype=${nandrootfstype} " \ 136a6b0652bSNikita Kiryanov "${video}\0" \ 137a6b0652bSNikita Kiryanov "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \ 138a6b0652bSNikita Kiryanov "nandboot=echo Booting from nand ...; " \ 139a6b0652bSNikita Kiryanov "run nandargs; " \ 140a6b0652bSNikita Kiryanov "nand read ${loadaddr} 0 780000; " \ 141a6b0652bSNikita Kiryanov "if ${loadfdt}; then " \ 142a6b0652bSNikita Kiryanov "run nandloadfdt;" \ 143a6b0652bSNikita Kiryanov "fi; " \ 144a6b0652bSNikita Kiryanov "run doboot\0" \ 145e32028a7SNikita Kiryanov "boot=mmc dev ${mmcdev}; " \ 146e32028a7SNikita Kiryanov "if mmc rescan; then " \ 147e32028a7SNikita Kiryanov "if run loadmmcbootscript; then " \ 148e32028a7SNikita Kiryanov "run mmcbootscript;" \ 149e32028a7SNikita Kiryanov "else " \ 150e32028a7SNikita Kiryanov "if run mmcloadkernel; then " \ 151e32028a7SNikita Kiryanov "if ${loadfdt}; then " \ 152e32028a7SNikita Kiryanov "run mmcloadfdt;" \ 153e32028a7SNikita Kiryanov "fi;" \ 154e32028a7SNikita Kiryanov "run mmcboot;" \ 155e32028a7SNikita Kiryanov "fi;" \ 156e32028a7SNikita Kiryanov "fi;" \ 157a6b0652bSNikita Kiryanov "fi;" \ 158a6b0652bSNikita Kiryanov "run nandboot\0" 159e32028a7SNikita Kiryanov 160e32028a7SNikita Kiryanov #define CONFIG_BOOTCOMMAND \ 161e32028a7SNikita Kiryanov "run setboottypem; run boot" 162e32028a7SNikita Kiryanov 163e32028a7SNikita Kiryanov /* SPI */ 164e32028a7SNikita Kiryanov #define CONFIG_SPI 165e32028a7SNikita Kiryanov #define CONFIG_MXC_SPI 166e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH 167e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_ATMEL 168e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_EON 169e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_GIGADEVICE 170e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_MACRONIX 171e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_SPANSION 172e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_STMICRO 173e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_SST 174e32028a7SNikita Kiryanov #define CONFIG_SPI_FLASH_WINBOND 175e32028a7SNikita Kiryanov 176a6b0652bSNikita Kiryanov /* NAND */ 177a6b0652bSNikita Kiryanov #ifndef CONFIG_SPL_BUILD 178a6b0652bSNikita Kiryanov #define CONFIG_CMD_NAND 179a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_BASE 0x40000000 180a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_MAX_CHIPS 1 181a6b0652bSNikita Kiryanov #define CONFIG_SYS_MAX_NAND_DEVICE 1 182a6b0652bSNikita Kiryanov #define CONFIG_NAND_MXS 183a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_ONFI_DETECTION 184a6b0652bSNikita Kiryanov /* APBH DMA is required for NAND support */ 185a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA 186a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA_BURST 187a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA_BURST8 188a6b0652bSNikita Kiryanov #endif 189a6b0652bSNikita Kiryanov 19002b1343eSNikita Kiryanov /* Ethernet */ 19102b1343eSNikita Kiryanov #define CONFIG_FEC_MXC 19202b1343eSNikita Kiryanov #define CONFIG_FEC_MXC_PHYADDR 0 19302b1343eSNikita Kiryanov #define CONFIG_FEC_XCV_TYPE RGMII 19402b1343eSNikita Kiryanov #define IMX_FEC_BASE ENET_BASE_ADDR 19502b1343eSNikita Kiryanov #define CONFIG_PHYLIB 19602b1343eSNikita Kiryanov #define CONFIG_PHY_ATHEROS 19702b1343eSNikita Kiryanov #define CONFIG_MII 19802b1343eSNikita Kiryanov #define CONFIG_ETHPRIME "FEC0" 19902b1343eSNikita Kiryanov #define CONFIG_ARP_TIMEOUT 200UL 20002b1343eSNikita Kiryanov #define CONFIG_NETMASK 255.255.255.0 20102b1343eSNikita Kiryanov #define CONFIG_NET_RETRY_COUNT 5 20202b1343eSNikita Kiryanov 2030f3effb9SNikita Kiryanov /* USB */ 2040f3effb9SNikita Kiryanov #define CONFIG_CMD_USB 2050f3effb9SNikita Kiryanov #define CONFIG_USB_EHCI 2060f3effb9SNikita Kiryanov #define CONFIG_USB_EHCI_MX6 2070f3effb9SNikita Kiryanov #define CONFIG_USB_STORAGE 2080f3effb9SNikita Kiryanov #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 2090f3effb9SNikita Kiryanov #define CONFIG_MXC_USB_FLAGS 0 2100f3effb9SNikita Kiryanov #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 2110f3effb9SNikita Kiryanov #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ 2120f3effb9SNikita Kiryanov 213f42b2f60SNikita Kiryanov /* I2C */ 214f42b2f60SNikita Kiryanov #define CONFIG_CMD_I2C 215f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C 216f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_MXC 217f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_SPEED 100000 218f42b2f60SNikita Kiryanov #define CONFIG_SYS_MXC_I2C3_SPEED 400000 219f42b2f60SNikita Kiryanov 220f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 221f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 222f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_BUS 2 223f42b2f60SNikita Kiryanov 224e32028a7SNikita Kiryanov /* GPIO */ 225e32028a7SNikita Kiryanov #define CONFIG_MXC_GPIO 226e32028a7SNikita Kiryanov 227e32028a7SNikita Kiryanov /* Boot */ 228e32028a7SNikita Kiryanov #define CONFIG_ZERO_BOOTDELAY_CHECK 229e32028a7SNikita Kiryanov #define CONFIG_LOADADDR 0x10800000 230e32028a7SNikita Kiryanov #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 231e32028a7SNikita Kiryanov #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 232e32028a7SNikita Kiryanov #define CONFIG_SYS_BOOTMAPSZ (8 << 20) 233e32028a7SNikita Kiryanov #define CONFIG_SETUP_MEMORY_TAGS 234e32028a7SNikita Kiryanov #define CONFIG_INITRD_TAG 235*f66113c0SNikita Kiryanov #define CONFIG_REVISION_TAG 236*f66113c0SNikita Kiryanov #define CONFIG_SERIAL_TAG 237e32028a7SNikita Kiryanov 238e32028a7SNikita Kiryanov /* misc */ 239e32028a7SNikita Kiryanov #define CONFIG_SYS_GENERIC_BOARD 240e32028a7SNikita Kiryanov #define CONFIG_STACKSIZE (128 * 1024) 241e32028a7SNikita Kiryanov #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024) 242e32028a7SNikita Kiryanov #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */ 24302b1343eSNikita Kiryanov #define CONFIG_OF_BOARD_SETUP 244e32028a7SNikita Kiryanov 245e32028a7SNikita Kiryanov /* SPL */ 246e32028a7SNikita Kiryanov #include "imx6_spl.h" 247e32028a7SNikita Kiryanov #define CONFIG_SPL_BOARD_INIT 248e32028a7SNikita Kiryanov #define CONFIG_SPL_MMC_SUPPORT 249e32028a7SNikita Kiryanov #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */ 250e32028a7SNikita Kiryanov #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024) 251e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_SUPPORT 252e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_FLASH_SUPPORT 253e32028a7SNikita Kiryanov #define CONFIG_SYS_SPI_U_BOOT_OFFS (64 * 1024) 254e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_LOAD 255e32028a7SNikita Kiryanov 256e32028a7SNikita Kiryanov #endif /* __CONFIG_CM_FX6_H */ 257