Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 6 | #ifndef _CONFIG_LACIE_KW_H |
| 7 | #define _CONFIG_LACIE_KW_H |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 8 | |
| 9 | /* |
| 10 | * Machine number definition |
| 11 | */ |
| 12 | #if defined(CONFIG_INETSPACE_V2) |
| 13 | #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 14 | #elif defined(CONFIG_NETSPACE_V2) |
| 15 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 16 | #elif defined(CONFIG_NETSPACE_LITE_V2) |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 17 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2 |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 18 | #elif defined(CONFIG_NETSPACE_MINI_V2) |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 19 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2 |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 20 | #elif defined(CONFIG_NETSPACE_MAX_V2) |
| 21 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 |
Simon Guinot | caf09e2 | 2012-09-06 10:51:43 +0000 | [diff] [blame] | 22 | #elif defined(CONFIG_D2NET_V2) |
| 23 | #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 24 | #elif defined(CONFIG_NET2BIG_V2) |
| 25 | #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 26 | #else |
| 27 | #error "Unknown board" |
| 28 | #endif |
| 29 | |
| 30 | /* |
| 31 | * High Level Configuration Options (easy to change) |
| 32 | */ |
| 33 | #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 34 | /* SoC name */ |
| 35 | #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) |
| 36 | #define CONFIG_KW88F6192 |
| 37 | #else |
| 38 | #define CONFIG_KW88F6281 |
| 39 | #endif |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 40 | #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ |
| 41 | |
| 42 | /* |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 43 | * Core clock definition |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 44 | */ |
| 45 | #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ |
| 46 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 47 | /* |
| 48 | * SDRAM configuration |
| 49 | */ |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 50 | |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 51 | /* |
| 52 | * Different SDRAM configuration and size for some of the boards derived |
| 53 | * from the Network Space v2 |
| 54 | */ |
| 55 | #if defined(CONFIG_INETSPACE_V2) |
Masahiro Yamada | d6acdf2 | 2014-03-11 11:05:17 +0900 | [diff] [blame] | 56 | #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 57 | #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) |
Masahiro Yamada | d6acdf2 | 2014-03-11 11:05:17 +0900 | [diff] [blame] | 58 | #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 59 | #endif |
| 60 | |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 61 | /* |
| 62 | * mv-common.h should be defined after CMD configs since it used them |
| 63 | * to enable certain macros |
| 64 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 65 | #include "mv-common.h" |
| 66 | |
| 67 | /* Remove or override few declarations from mv-common.h */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 68 | #undef CONFIG_SYS_IDE_MAXBUS |
| 69 | #undef CONFIG_SYS_IDE_MAXDEVICE |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 70 | |
| 71 | /* |
Simon Guinot | 1dd67e6 | 2013-06-18 15:14:48 +0200 | [diff] [blame] | 72 | * Enable platform initialisation via misc_init_r() function |
| 73 | */ |
Simon Guinot | 1dd67e6 | 2013-06-18 15:14:48 +0200 | [diff] [blame] | 74 | |
| 75 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 76 | * Ethernet Driver configuration |
| 77 | */ |
| 78 | #ifdef CONFIG_CMD_NET |
| 79 | #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 80 | #endif |
| 81 | |
| 82 | /* |
| 83 | * SATA Driver configuration |
| 84 | */ |
Simon Guinot | 80f6934 | 2020-06-28 19:00:29 +0200 | [diff] [blame] | 85 | |
| 86 | #ifdef CONFIG_SATA |
| 87 | #define CONFIG_SYS_64BIT_LBA |
| 88 | #define CONFIG_LBA48 |
Simon Guinot | caf09e2 | 2012-09-06 10:51:43 +0000 | [diff] [blame] | 89 | #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \ |
| 90 | defined(CONFIG_NET2BIG_V2) |
Simon Guinot | 80f6934 | 2020-06-28 19:00:29 +0200 | [diff] [blame] | 91 | #define CONFIG_SYS_SATA_MAX_DEVICE 2 |
Simon Guinot | 777baa9 | 2015-09-03 11:12:20 +0200 | [diff] [blame] | 92 | #else |
Simon Guinot | 80f6934 | 2020-06-28 19:00:29 +0200 | [diff] [blame] | 93 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 94 | #endif |
Simon Guinot | 80f6934 | 2020-06-28 19:00:29 +0200 | [diff] [blame] | 95 | #endif /* CONFIG_SATA */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 96 | |
| 97 | /* |
| 98 | * Enable GPI0 support |
| 99 | */ |
| 100 | #define CONFIG_KIRKWOOD_GPIO |
| 101 | |
| 102 | /* |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 103 | * Enable I2C support |
| 104 | */ |
| 105 | #ifdef CONFIG_CMD_I2C |
| 106 | /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */ |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 107 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 108 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */ |
| 109 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */ |
Simon Guinot | 1dd67e6 | 2013-06-18 15:14:48 +0200 | [diff] [blame] | 110 | #if defined(CONFIG_NET2BIG_V2) |
| 111 | #define CONFIG_SYS_I2C_G762_ADDR 0x3e |
| 112 | #endif |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 113 | #endif /* CONFIG_CMD_I2C */ |
| 114 | |
| 115 | /* |
Simon Guinot | 707f5d6 | 2012-09-06 10:51:41 +0000 | [diff] [blame] | 116 | * Partition support |
| 117 | */ |
Simon Guinot | 707f5d6 | 2012-09-06 10:51:41 +0000 | [diff] [blame] | 118 | |
| 119 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 120 | * File systems support |
| 121 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 122 | |
| 123 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 124 | * Environment variables configurations |
| 125 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 126 | |
| 127 | /* |
| 128 | * Default environment variables |
| 129 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 130 | #define CONFIG_BOOTCOMMAND \ |
| 131 | "dhcp && run netconsole; " \ |
| 132 | "if run usbload || run diskload; then bootm; fi" |
| 133 | |
| 134 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 135 | "stdin=serial\0" \ |
| 136 | "stdout=serial\0" \ |
| 137 | "stderr=serial\0" \ |
| 138 | "bootfile=uImage\0" \ |
| 139 | "loadaddr=0x800000\0" \ |
| 140 | "autoload=no\0" \ |
| 141 | "netconsole=" \ |
| 142 | "set stdin $stdin,nc; " \ |
| 143 | "set stdout $stdout,nc; " \ |
| 144 | "set stderr $stderr,nc;\0" \ |
Simon Guinot | 80f6934 | 2020-06-28 19:00:29 +0200 | [diff] [blame] | 145 | "diskload=sata init && " \ |
| 146 | "ext2load sata 0:1 $loadaddr /boot/$bootfile\0" \ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 147 | "usbload=usb start && " \ |
| 148 | "fatload usb 0:1 $loadaddr /boot/$bootfile\0" |
| 149 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 150 | #endif /* _CONFIG_LACIE_KW_H */ |