xref: /rk3399_rockchip-uboot/include/configs/nas220.h (revision 92a1babf75e90b45026ef0b0e83a6be0343fb70a)
19637c4b2SEvgeni Dobrev /*
29637c4b2SEvgeni Dobrev  * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com>
39637c4b2SEvgeni Dobrev  *
49637c4b2SEvgeni Dobrev  * based on work from:
59637c4b2SEvgeni Dobrev  * (C) Copyright 2009
69637c4b2SEvgeni Dobrev  * Marvell Semiconductor <www.marvell.com>
79637c4b2SEvgeni Dobrev  * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
89637c4b2SEvgeni Dobrev  *
99637c4b2SEvgeni Dobrev  * SPDX-License-Identifier:	GPL-2.0+
109637c4b2SEvgeni Dobrev  */
119637c4b2SEvgeni Dobrev 
129637c4b2SEvgeni Dobrev #ifndef _CONFIG_NAS220_H
139637c4b2SEvgeni Dobrev #define _CONFIG_NAS220_H
149637c4b2SEvgeni Dobrev 
159637c4b2SEvgeni Dobrev /*
16*92a1babfSTom Rini  * Machine type ID
179637c4b2SEvgeni Dobrev  */
18*92a1babfSTom Rini #define CONFIG_MACH_TYPE		MACH_TYPE_RD88F6192_NAS
199637c4b2SEvgeni Dobrev 
209637c4b2SEvgeni Dobrev /*
219637c4b2SEvgeni Dobrev  * High Level Configuration Options (easy to change)
229637c4b2SEvgeni Dobrev  */
239637c4b2SEvgeni Dobrev #define CONFIG_FEROCEON_88FR131		/* #define CPU Core subversion */
249637c4b2SEvgeni Dobrev #define CONFIG_KW88F6192		/* SOC Name */
259637c4b2SEvgeni Dobrev #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
269637c4b2SEvgeni Dobrev 
279637c4b2SEvgeni Dobrev /* power-on led, regulator, sata0, sata1 */
289637c4b2SEvgeni Dobrev #define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
299637c4b2SEvgeni Dobrev #define NAS220_GE_OE_VAL_HIGH (0)
309637c4b2SEvgeni Dobrev #define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
319637c4b2SEvgeni Dobrev #define NAS220_GE_OE_HIGH (~(0))
329637c4b2SEvgeni Dobrev 
339637c4b2SEvgeni Dobrev /* PHY related */
349637c4b2SEvgeni Dobrev #define MV88E1116_LED_FCTRL_REG		10
359637c4b2SEvgeni Dobrev #define MV88E1116_CPRSP_CR3_REG		21
369637c4b2SEvgeni Dobrev #define MV88E1116_MAC_CTRL_REG		21
379637c4b2SEvgeni Dobrev #define MV88E1116_PGADR_REG		22
389637c4b2SEvgeni Dobrev #define MV88E1116_RGMII_TXTM_CTRL	(1 << 4)
399637c4b2SEvgeni Dobrev #define MV88E1116_RGMII_RXTM_CTRL	(1 << 5)
409637c4b2SEvgeni Dobrev 
419637c4b2SEvgeni Dobrev /*
429637c4b2SEvgeni Dobrev  * Commands configuration
439637c4b2SEvgeni Dobrev  */
449637c4b2SEvgeni Dobrev #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
459637c4b2SEvgeni Dobrev #define CONFIG_CMD_NAND
469637c4b2SEvgeni Dobrev #define CONFIG_CMD_DATE
479637c4b2SEvgeni Dobrev #define CONFIG_CMD_IDE
489637c4b2SEvgeni Dobrev #define CONFIG_SYS_LONGHELP
499637c4b2SEvgeni Dobrev #define CONFIG_AUTO_COMPLETE
509637c4b2SEvgeni Dobrev #define CONFIG_CMDLINE_EDITING
519637c4b2SEvgeni Dobrev 
529637c4b2SEvgeni Dobrev /*
539637c4b2SEvgeni Dobrev  * mv-common.h should be defined after CMD configs since it used them
549637c4b2SEvgeni Dobrev  * to enable certain macros
559637c4b2SEvgeni Dobrev  */
569637c4b2SEvgeni Dobrev #include "mv-common.h"
579637c4b2SEvgeni Dobrev 
589637c4b2SEvgeni Dobrev /*
599637c4b2SEvgeni Dobrev  *  Environment variables configurations
609637c4b2SEvgeni Dobrev  */
619637c4b2SEvgeni Dobrev #ifdef CONFIG_CMD_NAND
629637c4b2SEvgeni Dobrev #define CONFIG_ENV_IS_IN_NAND
639637c4b2SEvgeni Dobrev #define CONFIG_ENV_SECT_SIZE 0x10000
649637c4b2SEvgeni Dobrev #else
659637c4b2SEvgeni Dobrev #define CONFIG_ENV_IS_NOWHERE
669637c4b2SEvgeni Dobrev #endif
679637c4b2SEvgeni Dobrev 
689637c4b2SEvgeni Dobrev #define CONFIG_ENV_SIZE	0x10000
699637c4b2SEvgeni Dobrev #define CONFIG_ENV_OFFSET 0xa0000
709637c4b2SEvgeni Dobrev 
719637c4b2SEvgeni Dobrev /*
729637c4b2SEvgeni Dobrev  * Default environment variables
739637c4b2SEvgeni Dobrev  */
749637c4b2SEvgeni Dobrev #define CONFIG_BOOTCOMMAND ""
759637c4b2SEvgeni Dobrev 
769637c4b2SEvgeni Dobrev #define CONFIG_EXTRA_ENV_SETTINGS \
779637c4b2SEvgeni Dobrev 	"bootargs=console=ttyS0,115200\0" \
789637c4b2SEvgeni Dobrev 	"mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
799637c4b2SEvgeni Dobrev 	"0x010000@0xa0000(env),"\
809637c4b2SEvgeni Dobrev 	"0x500000@0xc0000(uimage),"\
819637c4b2SEvgeni Dobrev 	"0x1a40000@0x5c0000(rootfs)\0" \
829637c4b2SEvgeni Dobrev 	"mtdids=nand0=orion_nand\0"\
839637c4b2SEvgeni Dobrev 	"bootdelay=-1\0"\
849637c4b2SEvgeni Dobrev 	"autostart=no\0"\
859637c4b2SEvgeni Dobrev 	"autoload=no\0"
869637c4b2SEvgeni Dobrev 
879637c4b2SEvgeni Dobrev /*
889637c4b2SEvgeni Dobrev  * Ethernet Driver configuration
899637c4b2SEvgeni Dobrev  */
909637c4b2SEvgeni Dobrev #ifdef CONFIG_CMD_NET
919637c4b2SEvgeni Dobrev #define CONFIG_MVGBE_PORTS {1, 0}	/* enable port 0 only */
929637c4b2SEvgeni Dobrev #define CONFIG_PHY_BASE_ADR 8
939637c4b2SEvgeni Dobrev #endif /* CONFIG_CMD_NET */
949637c4b2SEvgeni Dobrev 
959637c4b2SEvgeni Dobrev /*
969637c4b2SEvgeni Dobrev  * USB/EHCI
979637c4b2SEvgeni Dobrev  */
989637c4b2SEvgeni Dobrev #ifdef CONFIG_CMD_USB
999637c4b2SEvgeni Dobrev #define CONFIG_USB_EHCI			/* Enable EHCI USB support */
1009637c4b2SEvgeni Dobrev #define CONFIG_USB_EHCI_KIRKWOOD	/* on Kirkwood platform	*/
1019637c4b2SEvgeni Dobrev #define CONFIG_EHCI_IS_TDI
1029637c4b2SEvgeni Dobrev #define CONFIG_SUPPORT_VFAT
1039637c4b2SEvgeni Dobrev #endif /* CONFIG_CMD_USB */
1049637c4b2SEvgeni Dobrev 
1059637c4b2SEvgeni Dobrev /*
1069637c4b2SEvgeni Dobrev  * File system
1079637c4b2SEvgeni Dobrev  */
1089637c4b2SEvgeni Dobrev #define CONFIG_CMD_JFFS2
1099637c4b2SEvgeni Dobrev #define CONFIG_JFFS2_NAND
1109637c4b2SEvgeni Dobrev #define CONFIG_JFFS2_LZO
1119637c4b2SEvgeni Dobrev #define CONFIG_CMD_UBIFS
1129637c4b2SEvgeni Dobrev #define CONFIG_RBTREE
1139637c4b2SEvgeni Dobrev #define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
1149637c4b2SEvgeni Dobrev #define CONFIG_MTD_PARTITIONS
1159637c4b2SEvgeni Dobrev #define CONFIG_CMD_MTDPARTS
1169637c4b2SEvgeni Dobrev #define CONFIG_LZO
1179637c4b2SEvgeni Dobrev 
1189637c4b2SEvgeni Dobrev /*
1199637c4b2SEvgeni Dobrev  * SATA
1209637c4b2SEvgeni Dobrev  */
1219637c4b2SEvgeni Dobrev #ifdef CONFIG_MVSATA_IDE
1229637c4b2SEvgeni Dobrev #define CONFIG_SYS_ATA_IDE0_OFFSET      MV_SATA_PORT0_OFFSET
1239637c4b2SEvgeni Dobrev #define CONFIG_SYS_ATA_IDE1_OFFSET      MV_SATA_PORT1_OFFSET
1249637c4b2SEvgeni Dobrev #endif
1259637c4b2SEvgeni Dobrev 
1269637c4b2SEvgeni Dobrev /*
1279637c4b2SEvgeni Dobrev  * EFI partition
1289637c4b2SEvgeni Dobrev  */
1299637c4b2SEvgeni Dobrev 
1309637c4b2SEvgeni Dobrev /*
1319637c4b2SEvgeni Dobrev  *  Date Time
1329637c4b2SEvgeni Dobrev  */
1339637c4b2SEvgeni Dobrev #ifdef CONFIG_CMD_DATE
1349637c4b2SEvgeni Dobrev #define CONFIG_RTC_MV
1359637c4b2SEvgeni Dobrev #endif /* CONFIG_CMD_DATE */
1369637c4b2SEvgeni Dobrev 
1379637c4b2SEvgeni Dobrev #define CONFIG_KIRKWOOD_GPIO
1389637c4b2SEvgeni Dobrev 
1399637c4b2SEvgeni Dobrev #endif /* _CONFIG_NAS220_H */
1409637c4b2SEvgeni Dobrev 
141