Merge tag 'u-boot-imx-20210125' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / include / configs / dart_6ul.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Board configuration file for Variscite DART-6UL Evaluation Kit
4  * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
5  */
6 #ifndef __DART_6UL_H
7 #define __DART_6UL_H
8
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include "mx6_common.h"
12
13 /* SPL options */
14 #include "imx6_spl.h"
15
16 /* NAND pin conflicts with usdhc2 */
17 #ifdef CONFIG_CMD_NAND
18 #define CONFIG_SYS_FSL_USDHC_NUM        1
19 #else
20 #define CONFIG_SYS_FSL_USDHC_NUM        2
21 #endif
22
23 #ifdef CONFIG_CMD_NET
24 #define CONFIG_FEC_ENET_DEV             0
25 #if (CONFIG_FEC_ENET_DEV == 0)
26 #define CONFIG_ETHPRIME                 "eth0"
27 #elif (CONFIG_FEC_ENET_DEV == 1)
28 #define CONFIG_ETHPRIME                 "eth1"
29 #endif
30 #endif
31
32 /* Size of malloc() pool */
33 #define CONFIG_SYS_MALLOC_LEN           (16 * SZ_1M)
34
35 /* Environment settings */
36
37 /* Environment in SD */
38 #define MMC_ROOTFS_DEV                  0
39 #define MMC_ROOTFS_PART                 2
40
41 /* Console configs */
42 #define CONFIG_MXC_UART_BASE            UART1_BASE
43
44 /* MMC Configs */
45
46 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC2_BASE_ADDR
47 #define CONFIG_SUPPORT_EMMC_BOOT
48
49 /* I2C configs */
50 #ifdef CONFIG_CMD_I2C
51 #define CONFIG_SYS_I2C_MXC_I2C1         /* enable I2C bus 1 */
52 #define CONFIG_SYS_I2C_MXC_I2C2         /* enable I2C bus 2 */
53 #define CONFIG_SYS_I2C_SPEED            100000
54 #endif
55
56 /* Miscellaneous configurable options */
57
58 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
59 #define CONFIG_SYS_HZ                   1000
60
61 /* Physical Memory Map */
62 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
63 #define PHYS_SDRAM_SIZE                 SZ_512M
64
65 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
66 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
67 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
68
69 #define CONFIG_SYS_INIT_SP_OFFSET \
70         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
71 #define CONFIG_SYS_INIT_SP_ADDR \
72         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
73
74 /* USB Configs */
75 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
76 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
77 #define CONFIG_MXC_USB_FLAGS            0
78 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
79
80 #define ENV_MMC \
81         "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \
82         "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \
83         "fitpart=1\0" \
84         "bootdelay=3\0" \
85         "silent=1\0" \
86         "optargs=rw rootwait\0" \
87         "mmcautodetect=yes\0" \
88         "mmcrootfstype=ext4\0" \
89         "mmcfit_name=fitImage\0" \
90         "mmcloadfit=fatload mmc ${mmcdev}:${fitpart} ${fit_addr} " \
91                     "${mmcfit_name}\0" \
92         "mmcargs=setenv bootargs " \
93                 "root=/dev/mmcblk${mmcdev}p${mmcpart} ${optargs} " \
94                 "console=${console} rootfstype=${mmcrootfstype}\0" \
95         "mmc_mmc_fit=run mmcloadfit;run mmcargs addcon; bootm ${fit_addr}\0" \
96
97 /* Default environment */
98 #define CONFIG_EXTRA_ENV_SETTINGS \
99         "fdt_high=0xffffffff\0" \
100         "console=ttymxc0,115200n8\0" \
101         "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \
102         "fit_addr=0x82000000\0" \
103         ENV_MMC
104
105 #define CONFIG_BOOTCOMMAND              "run mmc_mmc_fit"
106
107 #define BOOT_TARGET_DEVICES(func) \
108         func(MMC, mmc, 0) \
109         func(MMC, mmc, 1) \
110         func(DHCP, dhcp, na)
111
112 #include <config_distro_bootcmd.h>
113 #endif /* __DART_6UL_H */