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 "mx6_common.h" 15e32028a7SNikita Kiryanov 16e32028a7SNikita Kiryanov /* Machine config */ 17e32028a7SNikita Kiryanov #define CONFIG_SYS_LITTLE_ENDIAN 18e32028a7SNikita Kiryanov #define CONFIG_MACH_TYPE 4273 19e32028a7SNikita Kiryanov 20e32028a7SNikita Kiryanov /* CMD */ 21e32028a7SNikita Kiryanov 22e32028a7SNikita Kiryanov /* MMC */ 23e32028a7SNikita Kiryanov #define CONFIG_SYS_FSL_USDHC_NUM 3 24e32028a7SNikita Kiryanov #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR 25e32028a7SNikita Kiryanov 26e32028a7SNikita Kiryanov /* RAM */ 27e32028a7SNikita Kiryanov #define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR 28e32028a7SNikita Kiryanov #define PHYS_SDRAM_2 MMDC1_ARB_BASE_ADDR 29e32028a7SNikita Kiryanov #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 30e32028a7SNikita Kiryanov #define CONFIG_NR_DRAM_BANKS 2 31e32028a7SNikita Kiryanov #define CONFIG_SYS_MEMTEST_START 0x10000000 32e32028a7SNikita Kiryanov #define CONFIG_SYS_MEMTEST_END 0x10010000 33e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 34e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 35e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_SP_OFFSET \ 36e32028a7SNikita Kiryanov (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 37e32028a7SNikita Kiryanov #define CONFIG_SYS_INIT_SP_ADDR \ 38e32028a7SNikita Kiryanov (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 39e32028a7SNikita Kiryanov 40e32028a7SNikita Kiryanov /* Serial console */ 41e32028a7SNikita Kiryanov #define CONFIG_MXC_UART 42e32028a7SNikita Kiryanov #define CONFIG_MXC_UART_BASE UART4_BASE 43e32028a7SNikita Kiryanov #define CONFIG_BAUDRATE 115200 44e32028a7SNikita Kiryanov #define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200} 45e32028a7SNikita Kiryanov 46e32028a7SNikita Kiryanov /* Shell */ 47e32028a7SNikita Kiryanov #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 48e32028a7SNikita Kiryanov sizeof(CONFIG_SYS_PROMPT) + 16) 49e32028a7SNikita Kiryanov 50e32028a7SNikita Kiryanov /* SPI flash */ 51e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_BUS 0 52e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_CS 0 53e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_SPEED 25000000 54e32028a7SNikita Kiryanov #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) 55e32028a7SNikita Kiryanov 56e32028a7SNikita Kiryanov /* Environment */ 57e32028a7SNikita Kiryanov #define CONFIG_ENV_IS_IN_SPI_FLASH 58e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED 59e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE 60e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS 61e32028a7SNikita Kiryanov #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS 62e32028a7SNikita Kiryanov #define CONFIG_ENV_SECT_SIZE (64 * 1024) 63e32028a7SNikita Kiryanov #define CONFIG_ENV_SIZE (8 * 1024) 64e32028a7SNikita Kiryanov #define CONFIG_ENV_OFFSET (768 * 1024) 65e32028a7SNikita Kiryanov 66e32028a7SNikita Kiryanov #define CONFIG_EXTRA_ENV_SETTINGS \ 671c2e5292SNikita Kiryanov "stdin=serial,usbkbd\0" \ 68deb94d61SNikita Kiryanov "stdout=serial,vga\0" \ 69deb94d61SNikita Kiryanov "stderr=serial,vga\0" \ 70deb94d61SNikita Kiryanov "panel=HDMI\0" \ 71e32028a7SNikita Kiryanov "autoload=no\0" \ 72*f0f6724fSChristopher Spinrath "uImage=uImage-cm-fx6\0" \ 73*f0f6724fSChristopher Spinrath "zImage=zImage-cm-fx6\0" \ 74508a6edeSNikita Kiryanov "kernel=uImage-cm-fx6\0" \ 75508a6edeSNikita Kiryanov "script=boot.scr\0" \ 76508a6edeSNikita Kiryanov "dtb=cm-fx6.dtb\0" \ 77508a6edeSNikita Kiryanov "bootm_low=18000000\0" \ 78e32028a7SNikita Kiryanov "loadaddr=0x10800000\0" \ 79e32028a7SNikita Kiryanov "fdtaddr=0x11000000\0" \ 80e32028a7SNikita Kiryanov "console=ttymxc3,115200\0" \ 81e32028a7SNikita Kiryanov "ethprime=FEC0\0" \ 82e32028a7SNikita Kiryanov "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \ 83e32028a7SNikita Kiryanov "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \ 84e32028a7SNikita Kiryanov "doboot=bootm ${loadaddr}\0" \ 85508a6edeSNikita Kiryanov "doloadfdt=false\0" \ 86*f0f6724fSChristopher Spinrath "setboottypez=setenv kernel ${zImage};" \ 87e32028a7SNikita Kiryanov "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \ 88508a6edeSNikita Kiryanov "setenv doloadfdt true;\0" \ 89*f0f6724fSChristopher Spinrath "setboottypem=setenv kernel ${uImage};" \ 90e32028a7SNikita Kiryanov "setenv doboot bootm ${loadaddr};" \ 91508a6edeSNikita Kiryanov "setenv doloadfdt false;\0"\ 92e32028a7SNikita Kiryanov "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \ 93206f38f7SNikita Kiryanov "sataroot=/dev/sda2 rw rootwait\0" \ 94a6b0652bSNikita Kiryanov "nandroot=/dev/mtdblock4 rw\0" \ 95a6b0652bSNikita Kiryanov "nandrootfstype=ubifs\0" \ 96508a6edeSNikita Kiryanov "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \ 97*f0f6724fSChristopher Spinrath "${video} ${extrabootargs}\0" \ 98508a6edeSNikita Kiryanov "sataargs=setenv bootargs console=${console} root=${sataroot} " \ 99*f0f6724fSChristopher Spinrath "${video} ${extrabootargs}\0" \ 100a6b0652bSNikita Kiryanov "nandargs=setenv bootargs console=${console} " \ 101a6b0652bSNikita Kiryanov "root=${nandroot} " \ 102a6b0652bSNikita Kiryanov "rootfstype=${nandrootfstype} " \ 103*f0f6724fSChristopher Spinrath "${video} ${extrabootargs}\0" \ 104508a6edeSNikita Kiryanov "nandboot=if run nandloadkernel; then " \ 105a6b0652bSNikita Kiryanov "run nandloadfdt;" \ 106508a6edeSNikita Kiryanov "run setboottypem;" \ 107508a6edeSNikita Kiryanov "run storagebootcmd;" \ 108508a6edeSNikita Kiryanov "run setboottypez;" \ 109508a6edeSNikita Kiryanov "run storagebootcmd;" \ 110508a6edeSNikita Kiryanov "fi;\0" \ 111508a6edeSNikita Kiryanov "run_eboot=echo Starting EBOOT ...; "\ 112508a6edeSNikita Kiryanov "mmc dev 2 && " \ 113508a6edeSNikita Kiryanov "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \ 114508a6edeSNikita Kiryanov "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0"\ 115508a6edeSNikita Kiryanov "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0"\ 116508a6edeSNikita Kiryanov "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};\0" \ 117508a6edeSNikita Kiryanov "bootscript=echo Running bootscript from ${storagetype} ...;" \ 118508a6edeSNikita Kiryanov "source ${loadaddr};\0" \ 119508a6edeSNikita Kiryanov "nandloadkernel=nand read ${loadaddr} 0 780000;\0" \ 120508a6edeSNikita Kiryanov "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \ 121508a6edeSNikita Kiryanov "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \ 122508a6edeSNikita Kiryanov "setupsataboot=setenv storagetype sata; setenv storagedev 0;\0" \ 123508a6edeSNikita Kiryanov "setupnandboot=setenv storagetype nand;\0" \ 124508a6edeSNikita Kiryanov "setupusbboot=setenv storagetype usb; setenv storagedev 0;\0" \ 125508a6edeSNikita Kiryanov "storagebootcmd=echo Booting from ${storagetype} ...;" \ 126508a6edeSNikita Kiryanov "run ${storagetype}args; run doboot;\0" \ 127508a6edeSNikita Kiryanov "trybootk=if run loadkernel; then " \ 128508a6edeSNikita Kiryanov "if ${doloadfdt}; then " \ 129508a6edeSNikita Kiryanov "run loadfdt;" \ 130a6b0652bSNikita Kiryanov "fi;" \ 131508a6edeSNikita Kiryanov "run storagebootcmd;" \ 132508a6edeSNikita Kiryanov "fi;\0" \ 133508a6edeSNikita Kiryanov "trybootsmz=if run loadscript; then " \ 134508a6edeSNikita Kiryanov "run bootscript;" \ 135e32028a7SNikita Kiryanov "fi;" \ 136508a6edeSNikita Kiryanov "run setboottypem;" \ 137508a6edeSNikita Kiryanov "run trybootk;" \ 138508a6edeSNikita Kiryanov "run setboottypez;" \ 139508a6edeSNikita Kiryanov "run trybootk;\0" 140e32028a7SNikita Kiryanov 141e32028a7SNikita Kiryanov #define CONFIG_BOOTCOMMAND \ 142508a6edeSNikita Kiryanov "run setupmmcboot;" \ 143508a6edeSNikita Kiryanov "mmc dev ${storagedev};" \ 144508a6edeSNikita Kiryanov "if mmc rescan; then " \ 145508a6edeSNikita Kiryanov "run trybootsmz;" \ 146508a6edeSNikita Kiryanov "fi;" \ 147508a6edeSNikita Kiryanov "run setupusbboot;" \ 148508a6edeSNikita Kiryanov "if usb start; then "\ 149508a6edeSNikita Kiryanov "if run loadscript; then " \ 150508a6edeSNikita Kiryanov "run bootscript;" \ 151508a6edeSNikita Kiryanov "fi;" \ 152508a6edeSNikita Kiryanov "fi;" \ 153508a6edeSNikita Kiryanov "run setupsataboot;" \ 154508a6edeSNikita Kiryanov "if sata init; then " \ 155508a6edeSNikita Kiryanov "run trybootsmz;" \ 156508a6edeSNikita Kiryanov "fi;" \ 157508a6edeSNikita Kiryanov "run setupnandboot;" \ 158508a6edeSNikita Kiryanov "run nandboot;" 159e32028a7SNikita Kiryanov 1601c2e5292SNikita Kiryanov #define CONFIG_PREBOOT "usb start" 1611c2e5292SNikita Kiryanov 162e32028a7SNikita Kiryanov /* SPI */ 163e32028a7SNikita Kiryanov #define CONFIG_SPI 164e32028a7SNikita Kiryanov #define CONFIG_MXC_SPI 165e32028a7SNikita Kiryanov 166a6b0652bSNikita Kiryanov /* NAND */ 167a6b0652bSNikita Kiryanov #ifndef CONFIG_SPL_BUILD 168a6b0652bSNikita Kiryanov #define CONFIG_CMD_NAND 169a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_BASE 0x40000000 170a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_MAX_CHIPS 1 171a6b0652bSNikita Kiryanov #define CONFIG_SYS_MAX_NAND_DEVICE 1 172a6b0652bSNikita Kiryanov #define CONFIG_NAND_MXS 173a6b0652bSNikita Kiryanov #define CONFIG_SYS_NAND_ONFI_DETECTION 174a6b0652bSNikita Kiryanov /* APBH DMA is required for NAND support */ 175a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA 176a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA_BURST 177a6b0652bSNikita Kiryanov #define CONFIG_APBH_DMA_BURST8 178a6b0652bSNikita Kiryanov #endif 179a6b0652bSNikita Kiryanov 18002b1343eSNikita Kiryanov /* Ethernet */ 18102b1343eSNikita Kiryanov #define CONFIG_FEC_MXC 18202b1343eSNikita Kiryanov #define CONFIG_FEC_MXC_PHYADDR 0 18302b1343eSNikita Kiryanov #define CONFIG_FEC_XCV_TYPE RGMII 18402b1343eSNikita Kiryanov #define IMX_FEC_BASE ENET_BASE_ADDR 18502b1343eSNikita Kiryanov #define CONFIG_PHYLIB 18602b1343eSNikita Kiryanov #define CONFIG_PHY_ATHEROS 18702b1343eSNikita Kiryanov #define CONFIG_MII 18802b1343eSNikita Kiryanov #define CONFIG_ETHPRIME "FEC0" 18902b1343eSNikita Kiryanov #define CONFIG_ARP_TIMEOUT 200UL 19002b1343eSNikita Kiryanov #define CONFIG_NET_RETRY_COUNT 5 19102b1343eSNikita Kiryanov 1920f3effb9SNikita Kiryanov /* USB */ 1930f3effb9SNikita Kiryanov #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 1940f3effb9SNikita Kiryanov #define CONFIG_MXC_USB_FLAGS 0 1950f3effb9SNikita Kiryanov #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 1960f3effb9SNikita Kiryanov #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ 1971c2e5292SNikita Kiryanov #define CONFIG_SYS_STDIO_DEREGISTER 1980f3effb9SNikita Kiryanov 199f42b2f60SNikita Kiryanov /* I2C */ 200f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C 201f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_MXC 20203544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 20303544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 204f8cb101eSYork Sun #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 205f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_SPEED 100000 206f42b2f60SNikita Kiryanov #define CONFIG_SYS_MXC_I2C3_SPEED 400000 207f42b2f60SNikita Kiryanov 208f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 209f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 210f42b2f60SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_BUS 2 211f42b2f60SNikita Kiryanov 212206f38f7SNikita Kiryanov /* SATA */ 213206f38f7SNikita Kiryanov #define CONFIG_CMD_SATA 214206f38f7SNikita Kiryanov #define CONFIG_SYS_SATA_MAX_DEVICE 1 215206f38f7SNikita Kiryanov #define CONFIG_LIBATA 216206f38f7SNikita Kiryanov #define CONFIG_LBA48 217206f38f7SNikita Kiryanov #define CONFIG_DWC_AHSATA 218206f38f7SNikita Kiryanov #define CONFIG_DWC_AHSATA_PORT_ID 0 219206f38f7SNikita Kiryanov #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR 220206f38f7SNikita Kiryanov 221e32028a7SNikita Kiryanov /* Boot */ 222e32028a7SNikita Kiryanov #define CONFIG_SYS_BOOTMAPSZ (8 << 20) 223f66113c0SNikita Kiryanov #define CONFIG_SERIAL_TAG 224e32028a7SNikita Kiryanov 225e32028a7SNikita Kiryanov /* misc */ 226e32028a7SNikita Kiryanov #define CONFIG_STACKSIZE (128 * 1024) 2279fbdcf01SNikita Kiryanov #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) 228e32028a7SNikita Kiryanov #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */ 2297d1abb7dSNikita Kiryanov #define CONFIG_MISC_INIT_R 230e32028a7SNikita Kiryanov 231e32028a7SNikita Kiryanov /* SPL */ 232e32028a7SNikita Kiryanov #include "imx6_spl.h" 233e32028a7SNikita Kiryanov #define CONFIG_SPL_MMC_SUPPORT 234e32028a7SNikita Kiryanov #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */ 235e32028a7SNikita Kiryanov #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024) 236e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_SUPPORT 237e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_FLASH_SUPPORT 238e32028a7SNikita Kiryanov #define CONFIG_SYS_SPI_U_BOOT_OFFS (64 * 1024) 239e32028a7SNikita Kiryanov #define CONFIG_SPL_SPI_LOAD 240e32028a7SNikita Kiryanov 241deb94d61SNikita Kiryanov /* Display */ 242deb94d61SNikita Kiryanov #define CONFIG_VIDEO 243deb94d61SNikita Kiryanov #define CONFIG_VIDEO_IPUV3 244deb94d61SNikita Kiryanov #define CONFIG_IPUV3_CLK 260000000 245deb94d61SNikita Kiryanov #define CONFIG_IMX_HDMI 246deb94d61SNikita Kiryanov #define CONFIG_CFB_CONSOLE 247deb94d61SNikita Kiryanov #define CONFIG_VGA_AS_SINGLE_DEVICE 248deb94d61SNikita Kiryanov #define CONFIG_SYS_CONSOLE_IS_IN_ENV 249deb94d61SNikita Kiryanov #define CONFIG_CONSOLE_MUX 250deb94d61SNikita Kiryanov #define CONFIG_VIDEO_SW_CURSOR 251deb94d61SNikita Kiryanov 2523a236a35SNikita Kiryanov #define CONFIG_SPLASH_SCREEN 253f82eb2faSNikita Kiryanov #define CONFIG_SPLASH_SOURCE 2543a236a35SNikita Kiryanov #define CONFIG_CMD_BMP 2553a236a35SNikita Kiryanov #define CONFIG_VIDEO_BMP_RLE8 2563a236a35SNikita Kiryanov 2578015dde8SNikita Kiryanov #define CONFIG_VIDEO_LOGO 2588015dde8SNikita Kiryanov #define CONFIG_VIDEO_BMP_LOGO 2598015dde8SNikita Kiryanov 26012616531SNikita Kiryanov /* EEPROM */ 26112616531SNikita Kiryanov #define CONFIG_CMD_EEPROM 26212616531SNikita Kiryanov #define CONFIG_ENV_EEPROM_IS_ON_I2C 26312616531SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 26412616531SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 26512616531SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 26612616531SNikita Kiryanov #define CONFIG_SYS_EEPROM_SIZE 256 26712616531SNikita Kiryanov 26812616531SNikita Kiryanov #define CONFIG_CMD_EEPROM_LAYOUT 26912616531SNikita Kiryanov #define CONFIG_EEPROM_LAYOUT_HELP_STRING "v2, v3" 27012616531SNikita Kiryanov 271e32028a7SNikita Kiryanov #endif /* __CONFIG_CM_FX6_H */ 272