1*8be4f40eSStefano Babic /* 2*8be4f40eSStefano Babic * Copyright (C) Stefano Babic <sbabic@denx.de> 3*8be4f40eSStefano Babic * 4*8be4f40eSStefano Babic * Configuration settings for the E+L i.MX6Q DO82 board. 5*8be4f40eSStefano Babic * 6*8be4f40eSStefano Babic * SPDX-License-Identifier: GPL-2.0+ 7*8be4f40eSStefano Babic */ 8*8be4f40eSStefano Babic 9*8be4f40eSStefano Babic #ifndef __EL6Q_COMMON_CONFIG_H 10*8be4f40eSStefano Babic #define __EL6Q_COMMON_CONFIG_H 11*8be4f40eSStefano Babic 12*8be4f40eSStefano Babic #define CONFIG_BOARD_NAME EL6Q 13*8be4f40eSStefano Babic 14*8be4f40eSStefano Babic #include <config_distro_defaults.h> 15*8be4f40eSStefano Babic #include "mx6_common.h" 16*8be4f40eSStefano Babic 17*8be4f40eSStefano Babic #define CONFIG_IMX_THERMAL 18*8be4f40eSStefano Babic 19*8be4f40eSStefano Babic /* Size of malloc() pool */ 20*8be4f40eSStefano Babic #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) 21*8be4f40eSStefano Babic 22*8be4f40eSStefano Babic #define CONFIG_BOARD_EARLY_INIT_F 23*8be4f40eSStefano Babic #define CONFIG_BOARD_LATE_INIT 24*8be4f40eSStefano Babic 25*8be4f40eSStefano Babic #define CONFIG_MXC_UART 26*8be4f40eSStefano Babic 27*8be4f40eSStefano Babic #ifdef CONFIG_SPL 28*8be4f40eSStefano Babic #define CONFIG_SPL_LIBCOMMON_SUPPORT 29*8be4f40eSStefano Babic #define CONFIG_SPL_MMC_SUPPORT 30*8be4f40eSStefano Babic #define CONFIG_SPL_SPI_SUPPORT 31*8be4f40eSStefano Babic #define CONFIG_SPL_SPI_FLASH_SUPPORT 32*8be4f40eSStefano Babic #define CONFIG_SYS_SPI_U_BOOT_OFFS (64 * 1024) 33*8be4f40eSStefano Babic #define CONFIG_SPL_SPI_LOAD 34*8be4f40eSStefano Babic #include "imx6_spl.h" 35*8be4f40eSStefano Babic #endif 36*8be4f40eSStefano Babic 37*8be4f40eSStefano Babic /* MMC Configs */ 38*8be4f40eSStefano Babic #define CONFIG_SYS_FSL_ESDHC_ADDR 0 39*8be4f40eSStefano Babic #define CONFIG_SYS_FSL_USDHC_NUM 2 40*8be4f40eSStefano Babic 41*8be4f40eSStefano Babic /* I2C config */ 42*8be4f40eSStefano Babic #define CONFIG_SYS_I2C 43*8be4f40eSStefano Babic #define CONFIG_SYS_I2C_MXC 44*8be4f40eSStefano Babic #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 45*8be4f40eSStefano Babic #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 46*8be4f40eSStefano Babic #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 47*8be4f40eSStefano Babic #define CONFIG_SYS_I2C_SPEED 100000 48*8be4f40eSStefano Babic 49*8be4f40eSStefano Babic /* PMIC */ 50*8be4f40eSStefano Babic #define CONFIG_POWER 51*8be4f40eSStefano Babic #define CONFIG_POWER_I2C 52*8be4f40eSStefano Babic #define CONFIG_POWER_PFUZE100 53*8be4f40eSStefano Babic #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 54*8be4f40eSStefano Babic 55*8be4f40eSStefano Babic /* Commands */ 56*8be4f40eSStefano Babic #define CONFIG_MXC_SPI 57*8be4f40eSStefano Babic #define CONFIG_SF_DEFAULT_BUS 3 58*8be4f40eSStefano Babic #define CONFIG_SF_DEFAULT_CS 0 59*8be4f40eSStefano Babic #define CONFIG_SF_DEFAULT_SPEED 20000000 60*8be4f40eSStefano Babic #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 61*8be4f40eSStefano Babic 62*8be4f40eSStefano Babic /* allow to overwrite serial and ethaddr */ 63*8be4f40eSStefano Babic #define CONFIG_ENV_OVERWRITE 64*8be4f40eSStefano Babic #define CONFIG_MXC_UART_BASE UART2_BASE 65*8be4f40eSStefano Babic #define CONFIG_BAUDRATE 115200 66*8be4f40eSStefano Babic 67*8be4f40eSStefano Babic /* Command definition */ 68*8be4f40eSStefano Babic 69*8be4f40eSStefano Babic #define CONFIG_CMD_BMODE 70*8be4f40eSStefano Babic #define CONFIG_CMD_BOOTZ 71*8be4f40eSStefano Babic #undef CONFIG_CMD_IMLS 72*8be4f40eSStefano Babic 73*8be4f40eSStefano Babic #define CONFIG_BOARD_NAME EL6Q 74*8be4f40eSStefano Babic 75*8be4f40eSStefano Babic #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG 76*8be4f40eSStefano Babic #define CONFIG_EXTRA_ENV_SETTINGS \ 77*8be4f40eSStefano Babic "board="__stringify(CONFIG_BOARD_NAME)"\0" \ 78*8be4f40eSStefano Babic "cma_size="__stringify(EL6Q_CMA_SIZE)"\0" \ 79*8be4f40eSStefano Babic "chp_size="__stringify(EL6Q_COHERENT_POOL_SIZE)"\0" \ 80*8be4f40eSStefano Babic "console=" CONFIG_CONSOLE_DEV "\0" \ 81*8be4f40eSStefano Babic "fdtfile=undefined\0" \ 82*8be4f40eSStefano Babic "fdt_high=0xffffffff\0" \ 83*8be4f40eSStefano Babic "fdt_addr_r=0x18000000\0" \ 84*8be4f40eSStefano Babic "fdt_addr=0x18000000\0" \ 85*8be4f40eSStefano Babic "findfdt=setenv fdtfile " CONFIG_DEFAULT_FDT_FILE "\0" \ 86*8be4f40eSStefano Babic "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ 87*8be4f40eSStefano Babic "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ 88*8be4f40eSStefano Babic "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ 89*8be4f40eSStefano Babic BOOTENV 90*8be4f40eSStefano Babic 91*8be4f40eSStefano Babic #define BOOT_TARGET_DEVICES(func) \ 92*8be4f40eSStefano Babic func(MMC, mmc, 0) \ 93*8be4f40eSStefano Babic func(MMC, mmc, 1) \ 94*8be4f40eSStefano Babic func(PXE, PXE, na) \ 95*8be4f40eSStefano Babic func(DHCP, dhcp, na) 96*8be4f40eSStefano Babic 97*8be4f40eSStefano Babic #define CONFIG_BOOTCOMMAND \ 98*8be4f40eSStefano Babic "run findfdt; " \ 99*8be4f40eSStefano Babic "run distro_bootcmd" 100*8be4f40eSStefano Babic 101*8be4f40eSStefano Babic #include <config_distro_bootcmd.h> 102*8be4f40eSStefano Babic 103*8be4f40eSStefano Babic #define CONFIG_ARP_TIMEOUT 200UL 104*8be4f40eSStefano Babic 105*8be4f40eSStefano Babic #define CONFIG_CMD_MEMTEST 106*8be4f40eSStefano Babic 107*8be4f40eSStefano Babic #define CONFIG_SYS_MEMTEST_START 0x10000000 108*8be4f40eSStefano Babic #define CONFIG_SYS_MEMTEST_END 0x10800000 109*8be4f40eSStefano Babic #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000 110*8be4f40eSStefano Babic 111*8be4f40eSStefano Babic #define CONFIG_STACKSIZE (128 * 1024) 112*8be4f40eSStefano Babic 113*8be4f40eSStefano Babic /* Physical Memory Map */ 114*8be4f40eSStefano Babic #define CONFIG_NR_DRAM_BANKS 1 115*8be4f40eSStefano Babic #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 116*8be4f40eSStefano Babic 117*8be4f40eSStefano Babic #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 118*8be4f40eSStefano Babic #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 119*8be4f40eSStefano Babic #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 120*8be4f40eSStefano Babic 121*8be4f40eSStefano Babic #define CONFIG_SYS_INIT_SP_OFFSET \ 122*8be4f40eSStefano Babic (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 123*8be4f40eSStefano Babic #define CONFIG_SYS_INIT_SP_ADDR \ 124*8be4f40eSStefano Babic (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 125*8be4f40eSStefano Babic 126*8be4f40eSStefano Babic /* FLASH and environment organization */ 127*8be4f40eSStefano Babic #define CONFIG_SYS_NO_FLASH 128*8be4f40eSStefano Babic 129*8be4f40eSStefano Babic #define CONFIG_ENV_SIZE (8 * 1024) 130*8be4f40eSStefano Babic 131*8be4f40eSStefano Babic #define CONFIG_ENV_IS_IN_MMC 132*8be4f40eSStefano Babic 133*8be4f40eSStefano Babic #if defined(CONFIG_ENV_IS_IN_MMC) 134*8be4f40eSStefano Babic #define CONFIG_SYS_MMC_ENV_DEV 1 135*8be4f40eSStefano Babic #define CONFIG_SYS_MMC_ENV_PART 2 136*8be4f40eSStefano Babic #define CONFIG_ENV_OFFSET 0x0 137*8be4f40eSStefano Babic #endif 138*8be4f40eSStefano Babic 139*8be4f40eSStefano Babic #endif /* __EL6Q_COMMON_CONFIG_H */ 140