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