Merge https://gitlab.denx.de/u-boot/custodians/u-boot-pmic
[platform/kernel/u-boot.git] / include / configs / mx7ulp_evk.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2016 Freescale Semiconductor, Inc.
4  *
5  * Configuration settings for the Freescale i.MX7ULP EVK board.
6  */
7
8 #ifndef __MX7ULP_EVK_CONFIG_H
9 #define __MX7ULP_EVK_CONFIG_H
10
11 #include <linux/sizes.h>
12 #include <asm/arch/imx-regs.h>
13
14 #define CONFIG_SYS_BOOTM_LEN            0x1000000
15
16
17 /* Using ULP WDOG for reset */
18 #define WDOG_BASE_ADDR                  WDG1_RBASE
19
20 #define CONFIG_SYS_HZ_CLOCK             1000000 /* Fixed at 1Mhz from TSTMR */
21
22 /* UART */
23 #define LPUART_BASE                     LPUART4_RBASE
24
25 /* Miscellaneous configurable options */
26 #define CONFIG_SYS_CBSIZE               512
27
28 #define CONFIG_SYS_MAXARGS              256
29
30 /* Physical Memory Map */
31
32 #define PHYS_SDRAM                      0x60000000
33 #define PHYS_SDRAM_SIZE                 SZ_1G
34 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
35
36 #define CONFIG_EXTRA_ENV_SETTINGS \
37         "script=boot.scr\0" \
38         "image=zImage\0" \
39         "console=ttyLP0\0" \
40         "fdt_high=0xffffffff\0" \
41         "initrd_high=0xffffffff\0" \
42         "fdt_file=imx7ulp-evk.dtb\0" \
43         "fdt_addr=0x63000000\0" \
44         "boot_fdt=try\0" \
45         "earlycon=lpuart32,0x402D0010\0" \
46         "ip_dyn=yes\0" \
47         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
48         "mmcpart=1\0" \
49         "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
50         "mmcautodetect=yes\0" \
51         "mmcargs=setenv bootargs console=${console},${baudrate} " \
52                 "root=${mmcroot}\0" \
53         "loadbootscript=" \
54                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
55         "bootscript=echo Running bootscript from mmc ...; " \
56                 "source\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 test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
62                         "if run loadfdt; then " \
63                                 "bootz ${loadaddr} - ${fdt_addr}; " \
64                         "else " \
65                                 "if test ${boot_fdt} = try; then " \
66                                         "bootz; " \
67                                 "else " \
68                                         "echo WARN: Cannot load the DT; " \
69                                 "fi; " \
70                         "fi; " \
71                 "else " \
72                         "bootz; " \
73                 "fi;\0" \
74         "netargs=setenv bootargs console=${console},${baudrate} " \
75                 "root=/dev/nfs " \
76                 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
77         "netboot=echo Booting from net ...; " \
78                 "run netargs; " \
79                 "if test ${ip_dyn} = yes; then " \
80                         "setenv get_cmd dhcp; " \
81                 "else " \
82                         "setenv get_cmd tftp; " \
83                 "fi; " \
84                 "usb start; "\
85                 "${get_cmd} ${image}; " \
86                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
87                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
88                                 "bootz ${loadaddr} - ${fdt_addr}; " \
89                         "else " \
90                                 "if test ${boot_fdt} = try; then " \
91                                         "bootz; " \
92                                 "else " \
93                                         "echo WARN: Cannot load the DT; " \
94                                 "fi; " \
95                         "fi; " \
96                 "else " \
97                         "bootz; " \
98                 "fi;\0" \
99
100 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
101 #define CONFIG_SYS_INIT_RAM_SIZE        SZ_256K
102
103 #define CONFIG_SYS_INIT_SP_OFFSET \
104         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
105 #define CONFIG_SYS_INIT_SP_ADDR \
106         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
107
108 #endif  /* __CONFIG_H */