23b1121460e33e97edbafa0441e614bc0045a7c3
[platform/kernel/u-boot.git] / include / configs / x530.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2018 Allied Telesis Labs
4  */
5
6 #ifndef _CONFIG_X530_H
7 #define _CONFIG_X530_H
8
9 /*
10  * High Level Configuration Options (easy to change)
11  */
12
13 #define CONFIG_DISPLAY_BOARDINFO_LATE
14
15 /*
16  * NS16550 Configuration
17  */
18 #define CONFIG_SYS_NS16550_SERIAL
19 #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
20 #if !defined(CONFIG_DM_SERIAL)
21 #define CONFIG_SYS_NS16550_REG_SIZE     (-4)
22 #define CONFIG_SYS_NS16550_COM1         MV_UART_CONSOLE_BASE
23 #endif
24
25 /*
26  * Serial Port configuration
27  * The following definitions let you select what serial you want to use
28  * for your console driver.
29  */
30
31 /* NAND */
32 #define CONFIG_SYS_MAX_NAND_DEVICE 1
33
34 #define BBT_CUSTOM_SCAN
35 #define BBT_CUSTOM_SCAN_PAGE 0
36 #define BBT_CUSTOM_SCAN_POSITION 2048
37
38 /* SPI NOR flash default params, used by sf commands */
39
40 #define MTDIDS_DEFAULT                  "nand0=nand"
41 #define MTDPARTS_DEFAULT                "mtdparts=nand:240M(user),8M(errlog),8M(nand-bbt)"
42 #define MTDPARTS_MTDOOPS                "errlog"
43
44 /* Partition support */
45
46 /* Additional FS support/configuration */
47
48 /* USB/EHCI configuration */
49 #define CONFIG_USB_EHCI_IS_TDI
50
51 /* Environment in SPI NOR flash */
52
53 #define PHY_ANEG_TIMEOUT        8000    /* PHY needs a longer aneg time */
54
55 /* PCIe support */
56 #ifndef CONFIG_SPL_BUILD
57 #define CONFIG_PCI_SCAN_SHOW
58 #endif
59
60 /* NAND */
61
62 #include <asm/arch/config.h>
63
64 /*
65  * Other required minimal configurations
66  */
67 #define CONFIG_SYS_RESET_ADDRESS 0xffff0000     /* Rst Vector Adr */
68
69 /* Keep device tree and initrd in low memory so the kernel can access them */
70 #define CONFIG_EXTRA_ENV_SETTINGS       \
71         "fdt_high=0x10000000\0"         \
72         "initrd_high=0x10000000\0"
73
74 #define CONFIG_UBI_PART                 user
75 #define CONFIG_UBIFS_VOLUME             user
76
77 /* SPL */
78
79 /* Defines for SPL */
80 #define CONFIG_SPL_SIZE                 (140 << 10)
81 #define CONFIG_SPL_MAX_SIZE             (CONFIG_SPL_SIZE - 0x0030)
82
83 #define CONFIG_SPL_BSS_START_ADDR       (0x40000000 + CONFIG_SPL_SIZE)
84 #define CONFIG_SPL_BSS_MAX_SIZE         (16 << 10)
85
86 #ifdef CONFIG_SPL_BUILD
87 #define CONFIG_SYS_MALLOC_SIMPLE
88 #endif
89
90 #define CONFIG_SPL_STACK                (0x40000000 + ((192 - 16) << 10))
91 #define CONFIG_SPL_BOOTROM_SAVE         (CONFIG_SPL_STACK + 4)
92
93 #endif /* _CONFIG_X530_H */