xref: /OK3568_Linux_fs/u-boot/include/configs/nsa310s.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (C) 2015
3  * Gerald Kerma <dreagle@doukki.net>
4  * Tony Dinh <mibodhi@gmail.com>
5  * Luka Perkov <luka.perkov@sartura.hr>
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef _CONFIG_NSA310S_H
11 #define _CONFIG_NSA310S_H
12 
13 /* high level configuration options */
14 #define CONFIG_FEROCEON_88FR131	1	/* CPU Core subversion */
15 #define CONFIG_KW88F6192		1	/* SOC Name */
16 #define CONFIG_KW88F6702		1	/* SOC Name */
17 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
18 
19 /* add target to build it automatically upon "make" */
20 #define CONFIG_BUILD_TARGET		"u-boot.kwb"
21 
22 /* compression configuration */
23 #define CONFIG_BZIP2
24 
25 /* commands configuration */
26 
27 /*
28  * mv-common.h should be defined after CMD configs since it used them
29  * to enable certain macros
30  */
31 #include "mv-common.h"
32 
33 /* environment variables configuration */
34 #ifdef CONFIG_CMD_NAND
35 #define CONFIG_ENV_SECT_SIZE	0x20000
36 #endif
37 #define CONFIG_ENV_SIZE		0x20000
38 #define CONFIG_ENV_OFFSET	0xe0000
39 
40 /* default environment variables */
41 #define CONFIG_BOOTCOMMAND \
42 	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
43 	"ubi part root; " \
44 	"ubifsmount ubi:rootfs; " \
45 	"ubifsload 0x800000 ${kernel}; " \
46 	"ubifsload 0x700000 ${fdt}; " \
47 	"ubifsumount; " \
48 	"fdt addr 0x700000; fdt resize; fdt chosen; " \
49 	"bootz 0x800000 - 0x700000"
50 
51 #define CONFIG_MTDPARTS \
52 	"mtdparts=orion_nand:" \
53 	"0xe0000@0x0(uboot)," \
54 	"0x20000@0xe0000(uboot_env)," \
55 	"0x100000@0x100000(second_stage_uboot)," \
56 	"-@0x200000(root)\0"
57 
58 #define CONFIG_EXTRA_ENV_SETTINGS \
59 	"console=console=ttyS0,115200\0" \
60 	"mtdids=nand0=orion_nand\0" \
61 	"mtdparts="CONFIG_MTDPARTS \
62 	"kernel=/boot/zImage\0" \
63 	"fdt=/boot/nsa310s.dtb\0" \
64 	"bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
65 
66 /* Ethernet driver configuration */
67 #ifdef CONFIG_CMD_NET
68 #define CONFIG_NETCONSOLE
69 #define CONFIG_NET_MULTI
70 #define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
71 #define CONFIG_PHY_BASE_ADR	1
72 #define CONFIG_RESET_PHY_R
73 #endif /* CONFIG_CMD_NET */
74 
75 /* SATA driver configuration */
76 #ifdef CONFIG_IDE
77 #define __io
78 #define CONFIG_IDE_PREINIT
79 #define CONFIG_MVSATA_IDE_USE_PORT0
80 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
81 #endif /* CONFIG_IDE */
82 
83 /* RTC driver configuration */
84 #ifdef CONFIG_CMD_DATE
85 #define CONFIG_RTC_MV
86 #endif /* CONFIG_CMD_DATE */
87 
88 #endif /* _CONFIG_NSA310S_H */
89