Merge tag 'next-20220328' of https://source.denx.de/u-boot/custodians/u-boot-video...
[platform/kernel/u-boot.git] / include / configs / mx7ulp_com.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2016 Freescale Semiconductor, Inc.
4  *
5  * Configuration settings for the Embedded Artists i.MX7ULP COM board.
6  */
7
8 #ifndef __MX7ULP_COM_CONFIG_H
9 #define __MX7ULP_COM_CONFIG_H
10
11 #include <linux/sizes.h>
12 #include <asm/arch/imx-regs.h>
13
14 #ifdef CONFIG_SPL
15 #include "imx7ulp_spl.h"
16 #endif
17
18 #define CONFIG_SYS_BOOTM_LEN            0x1000000
19
20 /*
21  * Detect overlap between U-Boot image and environment area in build-time
22  *
23  * CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot-dtb.imx offset
24  * CONFIG_BOARD_SIZE_LIMIT = 768k - 1k = 767k = 785408
25  *
26  * Currently CONFIG_BOARD_SIZE_LIMIT does not handle expressions, so
27  * write the direct value here
28  */
29 #define CONFIG_BOARD_SIZE_LIMIT         785408
30 #define CONFIG_MMCROOT                  "/dev/mmcblk0p2"
31
32 /* Using ULP WDOG for reset */
33 #define WDOG_BASE_ADDR                  WDG1_RBASE
34
35 #define CONFIG_SYS_HZ_CLOCK             1000000 /* Fixed at 1MHz from TSTMR */
36
37 /* UART */
38 #define LPUART_BASE                     LPUART4_RBASE
39
40 /* Physical Memory Map */
41
42 #define PHYS_SDRAM                      0x60000000
43 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
44
45 #define CONFIG_EXTRA_ENV_SETTINGS \
46         "image=zImage\0" \
47         "console=ttyLP0\0" \
48         "fdt_high=0xffffffff\0" \
49         "initrd_high=0xffffffff\0" \
50         "fdt_file=imx7ulp-com.dtb\0" \
51         "fdt_addr=0x63000000\0" \
52         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
53         "mmcpart=1\0" \
54         "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
55         "mmcargs=setenv bootargs console=${console},${baudrate} " \
56                 "root=${mmcroot}\0" \
57         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
58         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
59         "mmcboot=echo Booting from mmc ...; " \
60                 "run mmcargs; " \
61                 "if run loadfdt; then " \
62                         "bootz ${loadaddr} - ${fdt_addr}; " \
63                 "fi;\0" \
64
65 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
66 #define CONFIG_SYS_INIT_RAM_SIZE        SZ_256K
67
68 #define CONFIG_SYS_INIT_SP_OFFSET \
69         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
70 #define CONFIG_SYS_INIT_SP_ADDR \
71         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
72
73 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
74 #endif  /* __CONFIG_H */