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