ca138382c5a21c5fb15f2caf9a23c4c2774add96
[platform/kernel/u-boot.git] / include / configs / lsxl.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2012 Michael Walle
4  * Michael Walle <michael@walle.cc>
5  */
6
7 #ifndef _CONFIG_LSXL_H
8 #define _CONFIG_LSXL_H
9
10 /*
11  * Version number information
12  */
13 #if defined(CONFIG_LSCHLV2)
14 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-lschl.cfg
15 #define CONFIG_MACH_TYPE 3006
16 #elif defined(CONFIG_LSXHL)
17 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-lsxhl.cfg
18 #define CONFIG_MACH_TYPE 2663
19 #else
20 #error "unknown board"
21 #endif
22
23 /*
24  * General configuration options
25  */
26 #define CONFIG_FEROCEON_88FR131         /* CPU Core subversion */
27 #define CONFIG_KW88F6281                /* SOC Name */
28
29 #define CONFIG_SKIP_LOWLEVEL_INIT       /* disable board lowlevel_init */
30
31 #define CONFIG_KIRKWOOD_GPIO
32
33 #include "mv-common.h"
34
35 /* loading initramfs images without uimage header */
36
37 /*
38  *  Environment variables configurations
39  */
40 #ifdef CONFIG_SPI_FLASH
41 #define CONFIG_SYS_MAX_FLASH_BANKS      1
42 #define CONFIG_SYS_MAX_FLASH_SECT       8
43 #endif
44
45 /*
46  * Default environment variables
47  */
48
49 #if defined(CONFIG_LSXHL)
50 #define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
51 #elif defined(CONFIG_LSCHLV2)
52 #define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
53 #else
54 #error "Unsupported board"
55 #endif
56
57 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
58         "bootsource=legacy\0"                                           \
59         "hdpart=0:1\0"                                                  \
60         "kernel_addr=0x00800000\0"                                      \
61         "ramdisk_addr=0x01000000\0"                                     \
62         "fdt_addr=0x00ff0000\0"                                         \
63         "bootcmd_legacy=sata init "                                     \
64                 "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
65                 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
66                 "&& bootm ${kernel_addr} ${ramdisk_addr}\0"             \
67         "bootcmd_net=bootp ${kernel_addr} vmlinuz "                     \
68                 "&& tftpboot ${ramdisk_addr} initrd.img "               \
69                 "&& setenv ramdisk_len ${filesize} "                    \
70                 "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " "           \
71                 "&& bootz ${kernel_addr} "                              \
72                         "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"  \
73         "bootcmd_hdd=sata init "                                        \
74                 "&& load sata ${hdpart} ${kernel_addr} /vmlinuz "       \
75                 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img "   \
76                 "&& setenv ramdisk_len ${filesize} "                    \
77                 "&& load sata ${hdpart} ${fdt_addr} /dtb "              \
78                 "&& bootz ${kernel_addr} "                              \
79                         "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"  \
80         "bootcmd_usb=usb start "                                        \
81                 "&& load usb 0:1 ${kernel_addr} /vmlinuz "              \
82                 "&& load usb 0:1 ${ramdisk_addr} /initrd.img "          \
83                 "&& setenv ramdisk_len ${filesize} "                    \
84                 "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " "       \
85                 "&& bootz ${kernel_addr} "                              \
86                         "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"  \
87         "bootcmd_rescue=run config_nc_dhcp; run nc\0"                   \
88         "eraseenv=sf probe 0 "                                          \
89                 "&& sf erase " __stringify(CONFIG_ENV_OFFSET)           \
90                         " +" __stringify(CONFIG_ENV_SIZE) "\0"          \
91         "config_nc_dhcp=setenv autoload_old ${autoload}; "              \
92                 "setenv autoload no "                                   \
93                 "&& bootp "                                             \
94                 "&& setenv ncip "                                       \
95                 "&& setenv autoload ${autoload_old}; "                  \
96                 "setenv autoload_old\0"                                 \
97         "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \
98                 "setenv ncip; setenv gatewayip; setenv ethact; "        \
99                 "setenv bootfile; setenv dnsip; "                       \
100                 "setenv bootsource legacy; run ser\0"                   \
101         "restore_env=run standard_env; saveenv; reset\0"                \
102         "ser=setenv stdin serial; setenv stdout serial; "               \
103                 "setenv stderr serial\0"                                \
104         "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0"      \
105         "stdin=serial\0"                                                \
106         "stdout=serial\0"                                               \
107         "stderr=serial\0"
108
109 /*
110  * Ethernet Driver configuration
111  */
112 #ifdef CONFIG_CMD_NET
113 #define CONFIG_MVGBE_PORTS              {0, 1} /* enable port 1 only */
114 #define CONFIG_PHY_BASE_ADR             7
115 #undef CONFIG_RESET_PHY_R
116 #endif /* CONFIG_CMD_NET */
117
118 #ifdef CONFIG_SATA
119 #define CONFIG_SYS_SATA_MAX_DEVICE 1
120 #define CONFIG_SYS_64BIT_LBA
121 #define CONFIG_LBA48
122 #endif
123
124 #endif /* _CONFIG_LSXL_H */