xref: /rk3399_rockchip-uboot/include/configs/ib62x0.h (revision bd4c1d3e965fc82d6f3ecb059a2833fc0d224266)
1 /*
2  * Copyright (C) 2011-2012
3  * Gerald Kerma <dreagle@doukki.net>
4  * Luka Perkov <luka@openwrt.org>
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #ifndef _CONFIG_IB62x0_H
10 #define _CONFIG_IB62x0_H
11 
12 
13 /*
14  * Version number information
15  */
16 #define CONFIG_IDENT_STRING	" RaidSonic ICY BOX IB-NAS62x0"
17 
18 /*
19  * High level configuration options
20  */
21 #define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */
22 #define CONFIG_KW88F6281		/* SOC Name */
23 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
24 
25 /* Add target to build it automatically upon "make" */
26 #define CONFIG_BUILD_TARGET     "u-boot.kwb"
27 
28 /*
29  * Enable device tree support
30  */
31 #define CONFIG_OF_LIBFDT
32 
33 /*
34  * Compression configuration
35  */
36 #define CONFIG_BZIP2
37 #define CONFIG_LZMA
38 #define CONFIG_LZO
39 
40 /*
41  * Commands configuration
42  */
43 #define CONFIG_SYS_NO_FLASH		/* declare no flash (NOR/SPI) */
44 #define CONFIG_SYS_MVFS
45 #define CONFIG_CMD_ENV
46 #define CONFIG_CMD_BOOTZ
47 #define CONFIG_CMD_IDE
48 #define CONFIG_CMD_MII
49 #define CONFIG_CMD_NAND
50 #define CONFIG_CMD_PING
51 #define CONFIG_CMD_USB
52 
53 /*
54  * mv-common.h should be defined after CMD configs since it used them
55  * to enable certain macros
56  */
57 #include "mv-common.h"
58 
59 /*
60  * Environment variables configuration
61  */
62 #ifdef CONFIG_CMD_NAND
63 #define CONFIG_ENV_IS_IN_NAND
64 #define CONFIG_ENV_SECT_SIZE	0x20000
65 #else
66 #define CONFIG_ENV_IS_NOWHERE
67 #endif
68 #define CONFIG_ENV_SIZE		0x20000
69 #define CONFIG_ENV_OFFSET	0xe0000
70 
71 /*
72  * Default environment variables
73  */
74 #define CONFIG_BOOTCOMMAND \
75 	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "	\
76 	"ubi part root; "						\
77 	"ubifsmount ubi:rootfs; "					\
78 	"ubifsload 0x800000 ${kernel}; "				\
79 	"ubifsload 0x700000 ${fdt}; "					\
80 	"ubifsumount; "							\
81 	"fdt addr 0x700000; fdt resize; fdt chosen; "			\
82 	"bootz 0x800000 - 0x700000"
83 
84 #define CONFIG_MTDPARTS \
85 	"mtdparts=orion_nand:"						\
86 	"0xe0000@0x0(uboot),"						\
87 	"0x20000@0xe0000(uboot_env),"					\
88 	"-@0x100000(root)\0"
89 
90 #define CONFIG_EXTRA_ENV_SETTINGS \
91 	"console=console=ttyS0,115200\0"				\
92 	"mtdids=nand0=orion_nand\0"					\
93 	"mtdparts="CONFIG_MTDPARTS					\
94 	"kernel=/boot/zImage\0"						\
95 	"fdt=/boot/ib62x0.dtb\0"					\
96 	"bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
97 
98 /*
99  * Ethernet driver configuration
100  */
101 #ifdef CONFIG_CMD_NET
102 #define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
103 #define CONFIG_PHY_BASE_ADR	0
104 #undef CONFIG_RESET_PHY_R
105 #endif /* CONFIG_CMD_NET */
106 
107 /*
108  * SATA driver configuration
109  */
110 #ifdef CONFIG_CMD_IDE
111 #define __io
112 #define CONFIG_IDE_PREINIT
113 #define CONFIG_DOS_PARTITION
114 #define CONFIG_MVSATA_IDE_USE_PORT0
115 #define CONFIG_MVSATA_IDE_USE_PORT1
116 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
117 #define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET
118 #endif /* CONFIG_CMD_IDE */
119 
120 /*
121  * RTC driver configuration
122  */
123 #ifdef CONFIG_CMD_DATE
124 #define CONFIG_RTC_MV
125 #endif /* CONFIG_CMD_DATE */
126 
127 /*
128  * File system
129  */
130 #define CONFIG_CMD_EXT2
131 #define CONFIG_CMD_FAT
132 #define CONFIG_CMD_JFFS2
133 #define CONFIG_CMD_UBI
134 #define CONFIG_CMD_UBIFS
135 #define CONFIG_RBTREE
136 #define CONFIG_MTD_DEVICE
137 #define CONFIG_MTD_PARTITIONS
138 #define CONFIG_CMD_MTDPARTS
139 
140 #endif /* _CONFIG_IB62x0_H */
141