blob: 81c93375e2efa5b79a2d4ccd99bc6718b55c92c3 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michael Wallef214a202012-06-05 11:33:17 +00002/*
3 * Copyright (c) 2012 Michael Walle
4 * Michael Walle <michael@walle.cc>
Michael Wallef214a202012-06-05 11:33:17 +00005 */
6
7#ifndef _CONFIG_LSXL_H
8#define _CONFIG_LSXL_H
9
10/*
Michael Wallef214a202012-06-05 11:33:17 +000011 * General configuration options
12 */
Michael Wallef214a202012-06-05 11:33:17 +000013
Michael Wallef214a202012-06-05 11:33:17 +000014#include "mv-common.h"
15
Michael Walle4fe49d72015-02-08 20:06:07 +010016/* loading initramfs images without uimage header */
Michael Walle4fe49d72015-02-08 20:06:07 +010017
Michael Wallef214a202012-06-05 11:33:17 +000018/*
19 * Environment variables configurations
20 */
21#ifdef CONFIG_SPI_FLASH
Michael Wallef214a202012-06-05 11:33:17 +000022#define CONFIG_SYS_MAX_FLASH_SECT 8
Michael Wallef214a202012-06-05 11:33:17 +000023#endif
24
Michael Wallef214a202012-06-05 11:33:17 +000025/*
26 * Default environment variables
27 */
Michael Walle848fe232014-04-01 20:09:14 +020028
29#if defined(CONFIG_LSXHL)
30#define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
31#elif defined(CONFIG_LSCHLV2)
32#define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
33#else
34#error "Unsupported board"
35#endif
36
Michael Wallef214a202012-06-05 11:33:17 +000037#define CONFIG_EXTRA_ENV_SETTINGS \
Michael Walle848fe232014-04-01 20:09:14 +020038 "bootsource=legacy\0" \
Michael Wallef214a202012-06-05 11:33:17 +000039 "hdpart=0:1\0" \
Michael Walle848fe232014-04-01 20:09:14 +020040 "kernel_addr=0x00800000\0" \
41 "ramdisk_addr=0x01000000\0" \
Michael Walle145df6f2015-02-08 20:06:06 +010042 "fdt_addr=0x00ff0000\0" \
Michael Wallef94b5222019-04-03 23:28:31 +020043 "bootcmd_legacy=sata init " \
44 "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
45 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
Michael Wallebc2ad9f02015-02-08 20:06:05 +010046 "&& bootm ${kernel_addr} ${ramdisk_addr}\0" \
Michael Walle4fe49d72015-02-08 20:06:07 +010047 "bootcmd_net=bootp ${kernel_addr} vmlinuz " \
48 "&& tftpboot ${ramdisk_addr} initrd.img " \
49 "&& setenv ramdisk_len ${filesize} " \
Michael Walle848fe232014-04-01 20:09:14 +020050 "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \
Michael Walle4fe49d72015-02-08 20:06:07 +010051 "&& bootz ${kernel_addr} " \
52 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef94b5222019-04-03 23:28:31 +020053 "bootcmd_hdd=sata init " \
54 "&& load sata ${hdpart} ${kernel_addr} /vmlinuz " \
55 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img " \
Michael Walle4fe49d72015-02-08 20:06:07 +010056 "&& setenv ramdisk_len ${filesize} " \
Michael Wallef94b5222019-04-03 23:28:31 +020057 "&& load sata ${hdpart} ${fdt_addr} /dtb " \
Michael Walle4fe49d72015-02-08 20:06:07 +010058 "&& bootz ${kernel_addr} " \
59 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef214a202012-06-05 11:33:17 +000060 "bootcmd_usb=usb start " \
Michael Walle4fe49d72015-02-08 20:06:07 +010061 "&& load usb 0:1 ${kernel_addr} /vmlinuz " \
62 "&& load usb 0:1 ${ramdisk_addr} /initrd.img " \
63 "&& setenv ramdisk_len ${filesize} " \
64 "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " " \
65 "&& bootz ${kernel_addr} " \
66 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef214a202012-06-05 11:33:17 +000067 "bootcmd_rescue=run config_nc_dhcp; run nc\0" \
68 "eraseenv=sf probe 0 " \
Marek Vasut5368c552012-09-23 17:41:24 +020069 "&& sf erase " __stringify(CONFIG_ENV_OFFSET) \
70 " +" __stringify(CONFIG_ENV_SIZE) "\0" \
Michael Wallef214a202012-06-05 11:33:17 +000071 "config_nc_dhcp=setenv autoload_old ${autoload}; " \
72 "setenv autoload no " \
73 "&& bootp " \
Michael Walle23c99462012-10-04 06:54:25 +000074 "&& setenv ncip " \
Michael Wallef214a202012-06-05 11:33:17 +000075 "&& setenv autoload ${autoload_old}; " \
76 "setenv autoload_old\0" \
77 "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \
78 "setenv ncip; setenv gatewayip; setenv ethact; " \
79 "setenv bootfile; setenv dnsip; " \
Michael Walle45e60c22014-09-28 00:05:23 +020080 "setenv bootsource legacy; run ser\0" \
Michael Wallef214a202012-06-05 11:33:17 +000081 "restore_env=run standard_env; saveenv; reset\0" \
82 "ser=setenv stdin serial; setenv stdout serial; " \
83 "setenv stderr serial\0" \
84 "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \
85 "stdin=serial\0" \
86 "stdout=serial\0" \
87 "stderr=serial\0"
88
89/*
90 * Ethernet Driver configuration
91 */
92#ifdef CONFIG_CMD_NET
93#define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */
94#define CONFIG_PHY_BASE_ADR 7
Michael Wallef214a202012-06-05 11:33:17 +000095#endif /* CONFIG_CMD_NET */
96
Michael Wallef214a202012-06-05 11:33:17 +000097#endif /* _CONFIG_LSXL_H */