blob: 88f784f1f0fd587a309d5bc01bdf6f5d01841b9c [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 * SDRAM configuration
44 */
Simon Guinota35cb4c2011-11-21 19:25:47 +053045
Simon Guinot13c5ae62012-09-06 10:51:42 +000046/*
47 * Different SDRAM configuration and size for some of the boards derived
48 * from the Network Space v2
49 */
50#if defined(CONFIG_INETSPACE_V2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090051#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg
Simon Guinot13c5ae62012-09-06 10:51:42 +000052#elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090053#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg
Simon Guinot65e05172011-11-01 16:44:12 +053054#endif
55
Simon Guinot16311a22011-06-17 19:41:33 +053056/*
57 * mv-common.h should be defined after CMD configs since it used them
58 * to enable certain macros
59 */
Simon Guinot16311a22011-06-17 19:41:33 +053060#include "mv-common.h"
61
62/* Remove or override few declarations from mv-common.h */
Simon Guinot16311a22011-06-17 19:41:33 +053063#undef CONFIG_SYS_IDE_MAXBUS
64#undef CONFIG_SYS_IDE_MAXDEVICE
Simon Guinot16311a22011-06-17 19:41:33 +053065
66/*
Simon Guinot1dd67e62013-06-18 15:14:48 +020067 * Enable platform initialisation via misc_init_r() function
68 */
Simon Guinot1dd67e62013-06-18 15:14:48 +020069
70/*
Simon Guinot16311a22011-06-17 19:41:33 +053071 * Ethernet Driver configuration
72 */
73#ifdef CONFIG_CMD_NET
74#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
Simon Guinot16311a22011-06-17 19:41:33 +053075#endif
76
77/*
78 * SATA Driver configuration
79 */
Simon Guinot80f69342020-06-28 19:00:29 +020080
81#ifdef CONFIG_SATA
82#define CONFIG_SYS_64BIT_LBA
83#define CONFIG_LBA48
Simon Guinotcaf09e22012-09-06 10:51:43 +000084#if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
85 defined(CONFIG_NET2BIG_V2)
Simon Guinot80f69342020-06-28 19:00:29 +020086#define CONFIG_SYS_SATA_MAX_DEVICE 2
Simon Guinot777baa92015-09-03 11:12:20 +020087#else
Simon Guinot80f69342020-06-28 19:00:29 +020088#define CONFIG_SYS_SATA_MAX_DEVICE 1
Simon Guinot16311a22011-06-17 19:41:33 +053089#endif
Simon Guinot80f69342020-06-28 19:00:29 +020090#endif /* CONFIG_SATA */
Simon Guinot16311a22011-06-17 19:41:33 +053091
92/*
93 * Enable GPI0 support
94 */
95#define CONFIG_KIRKWOOD_GPIO
96
97/*
Simon Guinot5aaebab2011-11-01 16:44:12 +053098 * Enable I2C support
99 */
100#ifdef CONFIG_CMD_I2C
101/* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
Simon Guinot5aaebab2011-11-01 16:44:12 +0530102#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
103#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */
104#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */
Simon Guinot1dd67e62013-06-18 15:14:48 +0200105#if defined(CONFIG_NET2BIG_V2)
106#define CONFIG_SYS_I2C_G762_ADDR 0x3e
107#endif
Simon Guinot5aaebab2011-11-01 16:44:12 +0530108#endif /* CONFIG_CMD_I2C */
109
110/*
Simon Guinot707f5d62012-09-06 10:51:41 +0000111 * Partition support
112 */
Simon Guinot707f5d62012-09-06 10:51:41 +0000113
114/*
Simon Guinot16311a22011-06-17 19:41:33 +0530115 * File systems support
116 */
Simon Guinot16311a22011-06-17 19:41:33 +0530117
118/*
Simon Guinot16311a22011-06-17 19:41:33 +0530119 * Environment variables configurations
120 */
Simon Guinot16311a22011-06-17 19:41:33 +0530121
122/*
123 * Default environment variables
124 */
Simon Guinot16311a22011-06-17 19:41:33 +0530125#define CONFIG_BOOTCOMMAND \
126 "dhcp && run netconsole; " \
127 "if run usbload || run diskload; then bootm; fi"
128
129#define CONFIG_EXTRA_ENV_SETTINGS \
130 "stdin=serial\0" \
131 "stdout=serial\0" \
132 "stderr=serial\0" \
133 "bootfile=uImage\0" \
134 "loadaddr=0x800000\0" \
135 "autoload=no\0" \
136 "netconsole=" \
137 "set stdin $stdin,nc; " \
138 "set stdout $stdout,nc; " \
139 "set stderr $stderr,nc;\0" \
Simon Guinot80f69342020-06-28 19:00:29 +0200140 "diskload=sata init && " \
141 "ext2load sata 0:1 $loadaddr /boot/$bootfile\0" \
Simon Guinot16311a22011-06-17 19:41:33 +0530142 "usbload=usb start && " \
143 "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
144
Simon Guinota35cb4c2011-11-21 19:25:47 +0530145#endif /* _CONFIG_LACIE_KW_H */