Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig
[platform/kernel/u-boot.git] / include / configs / colibri_vf.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2015-2019 Toradex, Inc.
4  *
5  * Configuration settings for the Toradex VF50/VF61 modules.
6  *
7  * Based on vf610twr.h:
8  * Copyright 2013 Freescale Semiconductor, Inc.
9  */
10
11 #ifndef __CONFIG_H
12 #define __CONFIG_H
13
14 #include <asm/arch/imx-regs.h>
15 #include <linux/sizes.h>
16
17 #define CONFIG_SYS_FSL_CLK
18
19 #ifdef CONFIG_VIDEO_FSL_DCU_FB
20 #define CONFIG_VIDEO_LOGO
21 #define CONFIG_VIDEO_BMP_LOGO
22 #define CONFIG_SYS_FSL_DCU_LE
23
24 #define CONFIG_SYS_DCU_ADDR             DCU0_BASE_ADDR
25 #define DCU_LAYER_MAX_NUM               64
26 #endif
27
28 /* Size of malloc() pool */
29 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 2 * SZ_1M)
30
31 /* NAND support */
32 #define CONFIG_SYS_NAND_ONFI_DETECTION
33 #define CONFIG_SYS_MAX_NAND_DEVICE      1
34
35 #define CONFIG_IPADDR           192.168.10.2
36 #define CONFIG_NETMASK          255.255.255.0
37 #define CONFIG_SERVERIP         192.168.10.1
38
39 #define CONFIG_FDTADDR                  0x84000000
40
41 /* We boot from the gfxRAM area of the OCRAM. */
42 #define CONFIG_BOARD_SIZE_LIMIT         520192
43
44 #define MEM_LAYOUT_ENV_SETTINGS \
45         "bootm_size=0x10000000\0" \
46         "fdt_addr_r=0x82000000\0" \
47         "kernel_addr_r=0x81000000\0" \
48         "pxefile_addr_r=0x87100000\0" \
49         "ramdisk_addr_r=0x82100000\0" \
50         "scriptaddr=0x87000000\0"
51
52 #define UBOOT_UPDATE \
53         "update_uboot=nand erase.part u-boot && " \
54                 "nand write ${loadaddr} u-boot ${filesize}\0" \
55
56 #define NFS_BOOTCMD \
57         "nfsargs=ip=:::::eth0: root=/dev/nfs\0" \
58         "nfsboot=run setup; " \
59         "setenv bootargs ${defargs} ${nfsargs} ${mtdparts} " \
60         "${setupargs} ${vidargs}; echo Booting from NFS...;" \
61         "dhcp ${kernel_addr_r} && "     \
62         "tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
63         "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
64
65 #define UBI_BOOTCMD \
66         "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
67         "ubi.fm_autoconvert=1\0" \
68         "ubiboot=run setup; " \
69         "setenv bootargs ${defargs} ${ubiargs} ${mtdparts} "   \
70         "${setupargs} ${vidargs}; echo Booting from NAND...; " \
71         "ubi part ubi && " \
72         "ubi read ${kernel_addr_r} kernel && " \
73         "ubi read ${fdt_addr_r} dtb && " \
74         "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
75
76 #define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;"
77
78 #define BOOT_TARGET_DEVICES(func) \
79         func(MMC, mmc, 0) \
80         func(USB, usb, 0) \
81         func(DHCP, dhcp, na)
82 #include <config_distro_bootcmd.h>
83 #undef BOOTENV_RUN_NET_USB_START
84 #define BOOTENV_RUN_NET_USB_START ""
85
86 #define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4"
87
88 #define CONFIG_EXTRA_ENV_SETTINGS \
89         BOOTENV \
90         MEM_LAYOUT_ENV_SETTINGS \
91         NFS_BOOTCMD \
92         UBI_BOOTCMD \
93         UBOOT_UPDATE \
94         "console=ttyLP0\0" \
95         "defargs=user_debug=30\0" \
96         "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \
97         "fdt_board=eval-v3\0" \
98         "fdt_fixup=;\0" \
99         "kernel_image=zImage\0" \
100         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
101         "setsdupdate=mmc rescan && set interface mmc && " \
102                 "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \
103                 "source ${loadaddr}\0" \
104         "setup=setenv setupargs console=tty1 console=${console}" \
105                 ",${baudrate}n8 ${memargs}\0" \
106         "setupdate=run setsdupdate || run setusbupdate\0" \
107         "setusbupdate=usb start && set interface usb && " \
108                 "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \
109                 "source ${loadaddr}\0" \
110         "splashpos=m,m\0" \
111         "video-mode=dcufb:640x480-16@60,monitor=lcd\0"
112
113 /* Miscellaneous configurable options */
114 #define CONFIG_SYS_CBSIZE               1024    /* Console I/O Buffer Size */
115 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
116
117 #define CONFIG_SYS_HZ                   1000
118
119 /* Physical memory map */
120 #define PHYS_SDRAM                      (0x80000000)
121 #define PHYS_SDRAM_SIZE                 (256 * SZ_1M)
122
123 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
124 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
125 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
126
127 #define CONFIG_SYS_INIT_SP_OFFSET \
128         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
129 #define CONFIG_SYS_INIT_SP_ADDR \
130         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
131
132 /* Environment organization */
133 #ifdef CONFIG_ENV_IS_IN_NAND
134 #define CONFIG_ENV_RANGE                (4 * 64 * 2048)
135 #endif
136
137 /* USB Host Support */
138 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
139 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
140
141 /* USB DFU */
142
143 #endif /* __CONFIG_H */