global: Convert CONFIG_LOADADDR to CONFIG_SYS_LOADADDR
[platform/kernel/u-boot.git] / include / configs / kp_imx53.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2018
4  * Lukasz Majewski, DENX Software Engineering, lukma@denx.de
5  */
6
7 #ifndef __CONFIG_H_
8 #define __CONFIG_H_
9
10 #include <asm/arch/imx-regs.h>
11 #include <linux/sizes.h>
12
13 #define CONFIG_SYS_FSL_CLK
14
15 /* Size of malloc() pool */
16 #define CONFIG_SYS_MALLOC_LEN           (32 * SZ_1M)
17
18 /* USB Configs */
19 #define CONFIG_MXC_USB_PORTSC   (PORT_PTS_UTMI | PORT_PTS_PTW)
20 #define CONFIG_MXC_USB_FLAGS    0
21
22 /* Command definition */
23 #define CONFIG_SYS_LOAD_ADDR            0x72000000      /* loadaddr env var */
24
25 #define CONFIG_EXTRA_ENV_SETTINGS \
26         "console=ttymxc1,115200\0"      \
27         "fdt_addr=0x75000000\0"         \
28         "fdt_high=0xffffffff\0"         \
29         "scriptaddr=0x74000000\0"       \
30         "kernel_file=fitImage\0"\
31         "silent=1\0"\
32         "rdinit=/sbin/init\0" \
33         "addinitrd=setenv bootargs ${bootargs} rdinit=${rdinit} ${debug} \0" \
34         "upd_image=st.4k\0" \
35         "uboot_file=u-boot.imx\0" \
36         "updargs=setenv bootargs console=${console} ${smp} ${displayargs}\0" \
37         "initrd_ram_dev=/dev/ram\0" \
38         "addswupdate=setenv bootargs ${bootargs} root=${initrd_ram_dev} rw\0" \
39         "addkeys=setenv bootargs ${bootargs} di=${dig_in} key1=${key1}\0" \
40         "loadusb=usb start; " \
41                "fatload usb 0 ${loadaddr} ${upd_image}\0" \
42         "up=if tftp ${loadaddr} ${uboot_file}; then " \
43                "setexpr blkc ${filesize} / 0x200; " \
44                "setexpr blkc ${blkc} + 1; " \
45                "mmc write ${loadaddr} 0x2 ${blkc}" \
46         "; fi\0"          \
47         "upwic=setenv wic_file kp-image-kp${boardsoc}.wic; "\
48                "if tftp ${loadaddr} ${wic_file}; then " \
49                "setexpr blkc ${filesize} / 0x200; " \
50                "setexpr blkc ${blkc} + 1; " \
51                "mmc write ${loadaddr} 0x0 ${blkc}" \
52         "; fi\0"          \
53         "usbupd=echo Booting update from usb ...; " \
54                "setenv bootargs; " \
55                "run updargs; " \
56                "run addinitrd; " \
57                "run addswupdate; " \
58                "run addkeys; " \
59                "run loadusb; " \
60                "bootm ${loadaddr}#${fit_config}\0" \
61         BOOTENV
62
63 #define CONFIG_BOOTCOMMAND              "run usbupd; run distro_bootcmd"
64
65 #define BOOT_TARGET_DEVICES(func) \
66         func(MMC, mmc, 0) \
67         func(DHCP, dhcp, na)
68
69 #include <config_distro_bootcmd.h>
70
71 #define CONFIG_ARP_TIMEOUT      200UL
72
73 /* Miscellaneous configurable options */
74 #define CONFIG_SYS_CBSIZE               512     /* Console I/O Buffer Size */
75
76 /* Physical Memory Map */
77 #define PHYS_SDRAM_1                    CSD0_BASE_ADDR
78 #define PHYS_SDRAM_1_SIZE               (512 * SZ_1M)
79 #define PHYS_SDRAM_SIZE         (PHYS_SDRAM_1_SIZE)
80
81 #define CONFIG_SYS_SDRAM_BASE           (PHYS_SDRAM_1)
82 #define CONFIG_SYS_INIT_RAM_ADDR        (IRAM_BASE_ADDR)
83 #define CONFIG_SYS_INIT_RAM_SIZE        (IRAM_SIZE)
84
85 #define CONFIG_SYS_INIT_SP_OFFSET \
86         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
87 #define CONFIG_SYS_INIT_SP_ADDR \
88         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
89
90 /* environment organization */
91
92 #endif                          /* __CONFIG_H_ */