blob: 00c0c8fc02674f8ec7643329deb5b29cb9d40c02 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michael Walledccfa462012-06-05 11:33:17 +00002/*
3 * Copyright (c) 2012 Michael Walle
4 * Michael Walle <michael@walle.cc>
Michael Walledccfa462012-06-05 11:33:17 +00005 */
6
7#ifndef _CONFIG_LSXL_H
8#define _CONFIG_LSXL_H
9
10/*
11 * Version number information
12 */
13#if defined(CONFIG_LSCHLV2)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090014#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-lschl.cfg
Michael Walledccfa462012-06-05 11:33:17 +000015#define CONFIG_MACH_TYPE 3006
Michael Walledccfa462012-06-05 11:33:17 +000016#elif defined(CONFIG_LSXHL)
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090017#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-lsxhl.cfg
Michael Walledccfa462012-06-05 11:33:17 +000018#define CONFIG_MACH_TYPE 2663
Michael Walledccfa462012-06-05 11:33:17 +000019#else
20#error "unknown board"
21#endif
22
23/*
24 * General configuration options
25 */
26#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
Michael Walledccfa462012-06-05 11:33:17 +000027#define CONFIG_KW88F6281 /* SOC Name */
28
Michael Walledccfa462012-06-05 11:33:17 +000029#define CONFIG_KIRKWOOD_GPIO
Michael Walledccfa462012-06-05 11:33:17 +000030
Michael Walledccfa462012-06-05 11:33:17 +000031#include "mv-common.h"
32
Michael Walle22316a52015-02-08 20:06:07 +010033/* loading initramfs images without uimage header */
Michael Walle22316a52015-02-08 20:06:07 +010034
Michael Walledccfa462012-06-05 11:33:17 +000035/*
36 * Environment variables configurations
37 */
38#ifdef CONFIG_SPI_FLASH
39#define CONFIG_SYS_MAX_FLASH_BANKS 1
40#define CONFIG_SYS_MAX_FLASH_SECT 8
Michael Walledccfa462012-06-05 11:33:17 +000041#endif
42
Michael Walledccfa462012-06-05 11:33:17 +000043/*
44 * Default environment variables
45 */
Michael Walle35e6e292014-04-01 20:09:14 +020046
47#if defined(CONFIG_LSXHL)
48#define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
49#elif defined(CONFIG_LSCHLV2)
50#define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
51#else
52#error "Unsupported board"
53#endif
54
Michael Walledccfa462012-06-05 11:33:17 +000055#define CONFIG_EXTRA_ENV_SETTINGS \
Michael Walle35e6e292014-04-01 20:09:14 +020056 "bootsource=legacy\0" \
Michael Walledccfa462012-06-05 11:33:17 +000057 "hdpart=0:1\0" \
Michael Walle35e6e292014-04-01 20:09:14 +020058 "kernel_addr=0x00800000\0" \
59 "ramdisk_addr=0x01000000\0" \
Michael Wallebe083382015-02-08 20:06:06 +010060 "fdt_addr=0x00ff0000\0" \
Michael Walle4f5cb5a2019-04-03 23:28:31 +020061 "bootcmd_legacy=sata init " \
62 "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
63 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
Michael Walledaffcc52015-02-08 20:06:05 +010064 "&& bootm ${kernel_addr} ${ramdisk_addr}\0" \
Michael Walle22316a52015-02-08 20:06:07 +010065 "bootcmd_net=bootp ${kernel_addr} vmlinuz " \
66 "&& tftpboot ${ramdisk_addr} initrd.img " \
67 "&& setenv ramdisk_len ${filesize} " \
Michael Walle35e6e292014-04-01 20:09:14 +020068 "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \
Michael Walle22316a52015-02-08 20:06:07 +010069 "&& bootz ${kernel_addr} " \
70 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Walle4f5cb5a2019-04-03 23:28:31 +020071 "bootcmd_hdd=sata init " \
72 "&& load sata ${hdpart} ${kernel_addr} /vmlinuz " \
73 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img " \
Michael Walle22316a52015-02-08 20:06:07 +010074 "&& setenv ramdisk_len ${filesize} " \
Michael Walle4f5cb5a2019-04-03 23:28:31 +020075 "&& load sata ${hdpart} ${fdt_addr} /dtb " \
Michael Walle22316a52015-02-08 20:06:07 +010076 "&& bootz ${kernel_addr} " \
77 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Walledccfa462012-06-05 11:33:17 +000078 "bootcmd_usb=usb start " \
Michael Walle22316a52015-02-08 20:06:07 +010079 "&& load usb 0:1 ${kernel_addr} /vmlinuz " \
80 "&& load usb 0:1 ${ramdisk_addr} /initrd.img " \
81 "&& setenv ramdisk_len ${filesize} " \
82 "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " " \
83 "&& bootz ${kernel_addr} " \
84 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Walledccfa462012-06-05 11:33:17 +000085 "bootcmd_rescue=run config_nc_dhcp; run nc\0" \
86 "eraseenv=sf probe 0 " \
Marek Vasut0b3176c2012-09-23 17:41:24 +020087 "&& sf erase " __stringify(CONFIG_ENV_OFFSET) \
88 " +" __stringify(CONFIG_ENV_SIZE) "\0" \
Michael Walledccfa462012-06-05 11:33:17 +000089 "config_nc_dhcp=setenv autoload_old ${autoload}; " \
90 "setenv autoload no " \
91 "&& bootp " \
Michael Walledc3ba8e2012-10-04 06:54:25 +000092 "&& setenv ncip " \
Michael Walledccfa462012-06-05 11:33:17 +000093 "&& setenv autoload ${autoload_old}; " \
94 "setenv autoload_old\0" \
95 "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \
96 "setenv ncip; setenv gatewayip; setenv ethact; " \
97 "setenv bootfile; setenv dnsip; " \
Michael Walle9f061452014-09-28 00:05:23 +020098 "setenv bootsource legacy; run ser\0" \
Michael Walledccfa462012-06-05 11:33:17 +000099 "restore_env=run standard_env; saveenv; reset\0" \
100 "ser=setenv stdin serial; setenv stdout serial; " \
101 "setenv stderr serial\0" \
102 "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \
103 "stdin=serial\0" \
104 "stdout=serial\0" \
105 "stderr=serial\0"
106
107/*
108 * Ethernet Driver configuration
109 */
110#ifdef CONFIG_CMD_NET
111#define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */
112#define CONFIG_PHY_BASE_ADR 7
113#undef CONFIG_RESET_PHY_R
114#endif /* CONFIG_CMD_NET */
115
Michael Walle4f5cb5a2019-04-03 23:28:31 +0200116#ifdef CONFIG_SATA
117#define CONFIG_SYS_SATA_MAX_DEVICE 1
Michael Wallef2f14da2014-04-01 20:09:13 +0200118#define CONFIG_SYS_64BIT_LBA
Michael Walle4f5cb5a2019-04-03 23:28:31 +0200119#define CONFIG_LBA48
Michael Walledccfa462012-06-05 11:33:17 +0000120#endif
121
122#endif /* _CONFIG_LSXL_H */