Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / include / configs / el6x_common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) Stefano Babic <sbabic@denx.de>
4  *
5  * Configuration settings for the E+L i.MX6Q DO82 board.
6  */
7
8 #ifndef __EL6Q_COMMON_CONFIG_H
9 #define __EL6Q_COMMON_CONFIG_H
10
11 #include <linux/stringify.h>
12
13 #define CONFIG_BOARD_NAME               EL6Q
14
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
22 #define CONFIG_MXC_UART
23
24 #ifdef CONFIG_SPL
25 #include "imx6_spl.h"
26 #endif
27
28 /* MMC Configs */
29 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
30 #define CONFIG_SYS_FSL_USDHC_NUM        2
31
32 /* I2C config */
33 #define CONFIG_SYS_I2C
34 #define CONFIG_SYS_I2C_MXC
35 #define CONFIG_SYS_I2C_MXC_I2C1         /* enable I2C bus 1 */
36 #define CONFIG_SYS_I2C_MXC_I2C2         /* enable I2C bus 2 */
37 #define CONFIG_SYS_I2C_MXC_I2C3         /* enable I2C bus 3 */
38 #define CONFIG_SYS_I2C_SPEED                    100000
39
40 /* PMIC */
41 #define CONFIG_POWER
42 #define CONFIG_POWER_I2C
43 #define CONFIG_POWER_PFUZE100
44 #define CONFIG_POWER_PFUZE100_I2C_ADDR  0x08
45
46 /* Commands */
47
48 /* allow to overwrite serial and ethaddr */
49 #define CONFIG_ENV_OVERWRITE
50 #define CONFIG_MXC_UART_BASE    UART2_BASE
51
52 #define CONFIG_BOARD_NAME       EL6Q
53
54 #define CONFIG_EXTRA_ENV_SETTINGS                                               \
55         "board="__stringify(CONFIG_BOARD_NAME)"\0"                              \
56         "cma_size="__stringify(EL6Q_CMA_SIZE)"\0"                               \
57         "chp_size="__stringify(EL6Q_COHERENT_POOL_SIZE)"\0"                     \
58         "console=" CONSOLE_DEV "\0"                                     \
59         "fdtfile=undefined\0" \
60         "fdt_high=0xffffffff\0" \
61         "fdt_addr_r=0x18000000\0" \
62         "fdt_addr=0x18000000\0" \
63         "findfdt=setenv fdtfile " CONFIG_DEFAULT_FDT_FILE "\0"                  \
64         "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
65         "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
66         "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
67         BOOTENV
68
69 #define BOOT_TARGET_DEVICES(func) \
70         func(MMC, mmc, 0) \
71         func(MMC, mmc, 1) \
72         func(PXE, PXE, na) \
73         func(DHCP, dhcp, na)
74
75 #include <config_distro_bootcmd.h>
76
77 #define CONFIG_ARP_TIMEOUT     200UL
78
79 /* Physical Memory Map */
80 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
81
82 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
83 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
84 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
85
86 #define CONFIG_SYS_INIT_SP_OFFSET \
87         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
88 #define CONFIG_SYS_INIT_SP_ADDR \
89         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
90
91 /* environment organization */
92
93 #if defined(CONFIG_ENV_IS_IN_MMC)
94 #define CONFIG_SYS_MMC_ENV_DEV          1
95 #define CONFIG_SYS_MMC_ENV_PART         2
96 #endif
97
98 #endif                         /* __EL6Q_COMMON_CONFIG_H */