blob: 1f619a0d27dc027a37c45faafb4729aba2f28049 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Guinot16311a22011-06-17 19:41:33 +05302/*
3 * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
Simon Guinot16311a22011-06-17 19:41:33 +05304 */
5
Simon Guinota35cb4c2011-11-21 19:25:47 +05306#ifndef _CONFIG_LACIE_KW_H
7#define _CONFIG_LACIE_KW_H
Simon Guinot16311a22011-06-17 19:41:33 +05308
9/*
10 * Machine number definition
11 */
12#if defined(CONFIG_INETSPACE_V2)
13#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2
Simon Guinot16311a22011-06-17 19:41:33 +053014#elif defined(CONFIG_NETSPACE_V2)
15#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2
Simon Guinot13c5ae62012-09-06 10:51:42 +000016#elif defined(CONFIG_NETSPACE_LITE_V2)
Simon Guinot13c5ae62012-09-06 10:51:42 +000017#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2
Simon Guinot13c5ae62012-09-06 10:51:42 +000018#elif defined(CONFIG_NETSPACE_MINI_V2)
Simon Guinot13c5ae62012-09-06 10:51:42 +000019#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2
Simon Guinot16311a22011-06-17 19:41:33 +053020#elif defined(CONFIG_NETSPACE_MAX_V2)
21#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2
Simon Guinotcaf09e22012-09-06 10:51:43 +000022#elif defined(CONFIG_D2NET_V2)
23#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2
Simon Guinota35cb4c2011-11-21 19:25:47 +053024#elif defined(CONFIG_NET2BIG_V2)
25#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2
Simon Guinot16311a22011-06-17 19:41:33 +053026#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 Guinot13c5ae62012-09-06 10:51:42 +000034/* 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 Guinot16311a22011-06-17 19:41:33 +053040#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
41
42/*
Simon Guinota35cb4c2011-11-21 19:25:47 +053043 * Core clock definition
Simon Guinot16311a22011-06-17 19:41:33 +053044 */
45#define CONFIG_SYS_TCLK 166000000 /* 166MHz */
46
Simon Guinota35cb4c2011-11-21 19:25:47 +053047/*
48 * SDRAM configuration
49 */
Simon Guinota35cb4c2011-11-21 19:25:47 +053050
Simon Guinot13c5ae62012-09-06 10:51:42 +000051/*
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 Yamadad6acdf22014-03-11 11:05:17 +090056#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg
Simon Guinot13c5ae62012-09-06 10:51:42 +000057#elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090058#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg
Simon Guinot65e05172011-11-01 16:44:12 +053059#endif
60
Simon Guinot16311a22011-06-17 19:41:33 +053061/*
62 * mv-common.h should be defined after CMD configs since it used them
63 * to enable certain macros
64 */
Simon Guinot16311a22011-06-17 19:41:33 +053065#include "mv-common.h"
66
67/* Remove or override few declarations from mv-common.h */
Simon Guinot16311a22011-06-17 19:41:33 +053068#undef CONFIG_ENV_SPI_MAX_HZ
69#undef CONFIG_SYS_IDE_MAXBUS
70#undef CONFIG_SYS_IDE_MAXDEVICE
Simon Guinot16311a22011-06-17 19:41:33 +053071#define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */
Simon Guinot16311a22011-06-17 19:41:33 +053072
73/*
Simon Guinot1dd67e62013-06-18 15:14:48 +020074 * Enable platform initialisation via misc_init_r() function
75 */
Simon Guinot1dd67e62013-06-18 15:14:48 +020076
77/*
Simon Guinot16311a22011-06-17 19:41:33 +053078 * Ethernet Driver configuration
79 */
80#ifdef CONFIG_CMD_NET
81#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
82#define CONFIG_NETCONSOLE
83#endif
84
85/*
86 * SATA Driver configuration
87 */
88#ifdef CONFIG_MVSATA_IDE
89#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
Simon Guinotcaf09e22012-09-06 10:51:43 +000090#if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
91 defined(CONFIG_NET2BIG_V2)
Simon Guinot16311a22011-06-17 19:41:33 +053092#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
Simon Guinot777baa92015-09-03 11:12:20 +020093#define CONFIG_SYS_IDE_MAXBUS 2
94#define CONFIG_SYS_IDE_MAXDEVICE 2
95#else
96#define CONFIG_SYS_IDE_MAXBUS 1
97#define CONFIG_SYS_IDE_MAXDEVICE 1
Simon Guinot16311a22011-06-17 19:41:33 +053098#endif
Simon Guinota35cb4c2011-11-21 19:25:47 +053099#endif /* CONFIG_MVSATA_IDE */
Simon Guinot16311a22011-06-17 19:41:33 +0530100
101/*
102 * Enable GPI0 support
103 */
104#define CONFIG_KIRKWOOD_GPIO
105
106/*
Simon Guinot5aaebab2011-11-01 16:44:12 +0530107 * Enable I2C support
108 */
109#ifdef CONFIG_CMD_I2C
110/* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
Simon Guinot5aaebab2011-11-01 16:44:12 +0530111#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
112#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */
113#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */
Simon Guinot1dd67e62013-06-18 15:14:48 +0200114#if defined(CONFIG_NET2BIG_V2)
115#define CONFIG_SYS_I2C_G762_ADDR 0x3e
116#endif
Simon Guinot5aaebab2011-11-01 16:44:12 +0530117#endif /* CONFIG_CMD_I2C */
118
119/*
Simon Guinot707f5d62012-09-06 10:51:41 +0000120 * Partition support
121 */
Simon Guinot707f5d62012-09-06 10:51:41 +0000122
123/*
Simon Guinot16311a22011-06-17 19:41:33 +0530124 * File systems support
125 */
Simon Guinot16311a22011-06-17 19:41:33 +0530126
127/*
Simon Guinot16311a22011-06-17 19:41:33 +0530128 * Environment variables configurations
129 */
Simon Guinot16311a22011-06-17 19:41:33 +0530130#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */
131#define CONFIG_ENV_SIZE 0x1000 /* 4KB */
132#define CONFIG_ENV_ADDR 0x70000
133#define CONFIG_ENV_OFFSET 0x70000 /* env starts here */
134
135/*
136 * Default environment variables
137 */
Simon Guinot16311a22011-06-17 19:41:33 +0530138#define CONFIG_BOOTCOMMAND \
139 "dhcp && run netconsole; " \
140 "if run usbload || run diskload; then bootm; fi"
141
142#define CONFIG_EXTRA_ENV_SETTINGS \
143 "stdin=serial\0" \
144 "stdout=serial\0" \
145 "stderr=serial\0" \
146 "bootfile=uImage\0" \
147 "loadaddr=0x800000\0" \
148 "autoload=no\0" \
149 "netconsole=" \
150 "set stdin $stdin,nc; " \
151 "set stdout $stdout,nc; " \
152 "set stderr $stderr,nc;\0" \
153 "diskload=ide reset && " \
154 "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
155 "usbload=usb start && " \
156 "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
157
Simon Guinota35cb4c2011-11-21 19:25:47 +0530158#endif /* _CONFIG_LACIE_KW_H */