1 /* 2 * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com> 3 * 4 * based on work from: 5 * (C) Copyright 2009 6 * Marvell Semiconductor <www.marvell.com> 7 * Written-by: Prafulla Wadaskar <prafulla@marvell.com> 8 * 9 * SPDX-License-Identifier: GPL-2.0+ 10 */ 11 12 #ifndef _CONFIG_NAS220_H 13 #define _CONFIG_NAS220_H 14 15 /* 16 * Machine type ID 17 */ 18 #define CONFIG_MACH_TYPE MACH_TYPE_RD88F6192_NAS 19 20 /* 21 * High Level Configuration Options (easy to change) 22 */ 23 #define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */ 24 #define CONFIG_KW88F6192 /* SOC Name */ 25 #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ 26 27 /* power-on led, regulator, sata0, sata1 */ 28 #define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)) 29 #define NAS220_GE_OE_VAL_HIGH (0) 30 #define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))) 31 #define NAS220_GE_OE_HIGH (~(0)) 32 33 /* PHY related */ 34 #define MV88E1116_LED_FCTRL_REG 10 35 #define MV88E1116_CPRSP_CR3_REG 21 36 #define MV88E1116_MAC_CTRL_REG 21 37 #define MV88E1116_PGADR_REG 22 38 #define MV88E1116_RGMII_TXTM_CTRL (1 << 4) 39 #define MV88E1116_RGMII_RXTM_CTRL (1 << 5) 40 41 /* 42 * Commands configuration 43 */ 44 #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ 45 #define CONFIG_CMD_NAND 46 #define CONFIG_CMD_DATE 47 #define CONFIG_CMD_IDE 48 #define CONFIG_SYS_LONGHELP 49 #define CONFIG_AUTO_COMPLETE 50 #define CONFIG_CMDLINE_EDITING 51 52 /* 53 * mv-common.h should be defined after CMD configs since it used them 54 * to enable certain macros 55 */ 56 #include "mv-common.h" 57 58 /* 59 * Environment variables configurations 60 */ 61 #ifdef CONFIG_CMD_NAND 62 #define CONFIG_ENV_IS_IN_NAND 63 #define CONFIG_ENV_SECT_SIZE 0x10000 64 #else 65 #define CONFIG_ENV_IS_NOWHERE 66 #endif 67 68 #define CONFIG_ENV_SIZE 0x10000 69 #define CONFIG_ENV_OFFSET 0xa0000 70 71 /* 72 * Default environment variables 73 */ 74 #define CONFIG_BOOTCOMMAND "" 75 76 #define CONFIG_EXTRA_ENV_SETTINGS \ 77 "bootargs=console=ttyS0,115200\0" \ 78 "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\ 79 "0x010000@0xa0000(env),"\ 80 "0x500000@0xc0000(uimage),"\ 81 "0x1a40000@0x5c0000(rootfs)\0" \ 82 "mtdids=nand0=orion_nand\0"\ 83 "bootdelay=-1\0"\ 84 "autostart=no\0"\ 85 "autoload=no\0" 86 87 /* 88 * Ethernet Driver configuration 89 */ 90 #ifdef CONFIG_CMD_NET 91 #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ 92 #define CONFIG_PHY_BASE_ADR 8 93 #endif /* CONFIG_CMD_NET */ 94 95 /* 96 * USB/EHCI 97 */ 98 #ifdef CONFIG_CMD_USB 99 #define CONFIG_USB_EHCI /* Enable EHCI USB support */ 100 #define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */ 101 #define CONFIG_EHCI_IS_TDI 102 #define CONFIG_SUPPORT_VFAT 103 #endif /* CONFIG_CMD_USB */ 104 105 /* 106 * File system 107 */ 108 #define CONFIG_CMD_JFFS2 109 #define CONFIG_JFFS2_NAND 110 #define CONFIG_JFFS2_LZO 111 #define CONFIG_CMD_UBIFS 112 #define CONFIG_RBTREE 113 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ 114 #define CONFIG_MTD_PARTITIONS 115 #define CONFIG_CMD_MTDPARTS 116 #define CONFIG_LZO 117 118 /* 119 * SATA 120 */ 121 #ifdef CONFIG_MVSATA_IDE 122 #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET 123 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET 124 #endif 125 126 /* 127 * EFI partition 128 */ 129 130 /* 131 * Date Time 132 */ 133 #ifdef CONFIG_CMD_DATE 134 #define CONFIG_RTC_MV 135 #endif /* CONFIG_CMD_DATE */ 136 137 #define CONFIG_KIRKWOOD_GPIO 138 139 #endif /* _CONFIG_NAS220_H */ 140 141