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