blob: 146d8ad63721cb67357a2e5478aa235689c2ec2b [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/*
Simon Guinot16311a22011-06-17 19:41:33 +053010 * High Level Configuration Options (easy to change)
11 */
12#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
Simon Guinot13c5ae62012-09-06 10:51:42 +000013/* SoC name */
14#if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
15#define CONFIG_KW88F6192
16#else
17#define CONFIG_KW88F6281
18#endif
Simon Guinot16311a22011-06-17 19:41:33 +053019
20/*
Simon Guinota35cb4c2011-11-21 19:25:47 +053021 * SDRAM configuration
22 */
Simon Guinota35cb4c2011-11-21 19:25:47 +053023
Simon Guinot13c5ae62012-09-06 10:51:42 +000024/*
25 * Different SDRAM configuration and size for some of the boards derived
26 * from the Network Space v2
27 */
28#if defined(CONFIG_INETSPACE_V2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090029#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg
Simon Guinot13c5ae62012-09-06 10:51:42 +000030#elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090031#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg
Simon Guinot65e05172011-11-01 16:44:12 +053032#endif
33
Simon Guinot16311a22011-06-17 19:41:33 +053034/*
35 * mv-common.h should be defined after CMD configs since it used them
36 * to enable certain macros
37 */
Simon Guinot16311a22011-06-17 19:41:33 +053038#include "mv-common.h"
39
40/* Remove or override few declarations from mv-common.h */
Simon Guinot16311a22011-06-17 19:41:33 +053041#undef CONFIG_SYS_IDE_MAXBUS
42#undef CONFIG_SYS_IDE_MAXDEVICE
Simon Guinot16311a22011-06-17 19:41:33 +053043
44/*
Simon Guinot1dd67e62013-06-18 15:14:48 +020045 * Enable platform initialisation via misc_init_r() function
46 */
Simon Guinot1dd67e62013-06-18 15:14:48 +020047
48/*
Simon Guinot16311a22011-06-17 19:41:33 +053049 * Ethernet Driver configuration
50 */
51#ifdef CONFIG_CMD_NET
52#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
Simon Guinot16311a22011-06-17 19:41:33 +053053#endif
54
55/*
56 * SATA Driver configuration
57 */
Simon Guinot80f69342020-06-28 19:00:29 +020058
59#ifdef CONFIG_SATA
60#define CONFIG_SYS_64BIT_LBA
61#define CONFIG_LBA48
Simon Guinotcaf09e22012-09-06 10:51:43 +000062#if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
63 defined(CONFIG_NET2BIG_V2)
Simon Guinot80f69342020-06-28 19:00:29 +020064#define CONFIG_SYS_SATA_MAX_DEVICE 2
Simon Guinot777baa92015-09-03 11:12:20 +020065#else
Simon Guinot80f69342020-06-28 19:00:29 +020066#define CONFIG_SYS_SATA_MAX_DEVICE 1
Simon Guinot16311a22011-06-17 19:41:33 +053067#endif
Simon Guinot80f69342020-06-28 19:00:29 +020068#endif /* CONFIG_SATA */
Simon Guinot16311a22011-06-17 19:41:33 +053069
70/*
71 * Enable GPI0 support
72 */
73#define CONFIG_KIRKWOOD_GPIO
74
75/*
Simon Guinot5aaebab2011-11-01 16:44:12 +053076 * Enable I2C support
77 */
78#ifdef CONFIG_CMD_I2C
79/* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
Simon Guinot1dd67e62013-06-18 15:14:48 +020080#if defined(CONFIG_NET2BIG_V2)
81#define CONFIG_SYS_I2C_G762_ADDR 0x3e
82#endif
Simon Guinot5aaebab2011-11-01 16:44:12 +053083#endif /* CONFIG_CMD_I2C */
84
85/*
Simon Guinot707f5d62012-09-06 10:51:41 +000086 * Partition support
87 */
Simon Guinot707f5d62012-09-06 10:51:41 +000088
89/*
Simon Guinot16311a22011-06-17 19:41:33 +053090 * File systems support
91 */
Simon Guinot16311a22011-06-17 19:41:33 +053092
93/*
Simon Guinot16311a22011-06-17 19:41:33 +053094 * Environment variables configurations
95 */
Simon Guinot16311a22011-06-17 19:41:33 +053096
97/*
98 * Default environment variables
99 */
Simon Guinot16311a22011-06-17 19:41:33 +0530100#define CONFIG_BOOTCOMMAND \
101 "dhcp && run netconsole; " \
102 "if run usbload || run diskload; then bootm; fi"
103
104#define CONFIG_EXTRA_ENV_SETTINGS \
105 "stdin=serial\0" \
106 "stdout=serial\0" \
107 "stderr=serial\0" \
108 "bootfile=uImage\0" \
109 "loadaddr=0x800000\0" \
110 "autoload=no\0" \
111 "netconsole=" \
112 "set stdin $stdin,nc; " \
113 "set stdout $stdout,nc; " \
114 "set stderr $stderr,nc;\0" \
Simon Guinot80f69342020-06-28 19:00:29 +0200115 "diskload=sata init && " \
116 "ext2load sata 0:1 $loadaddr /boot/$bootfile\0" \
Simon Guinot16311a22011-06-17 19:41:33 +0530117 "usbload=usb start && " \
118 "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
119
Simon Guinota35cb4c2011-11-21 19:25:47 +0530120#endif /* _CONFIG_LACIE_KW_H */