blob: 64d68276234c28e4409a675677e2839fa4f7c6af [file] [log] [blame]
Chris Packhamb55b2c92019-01-10 21:01:00 +13001/* 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
Chris Packhamb55b2c92019-01-10 21:01:00 +130015/*
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
Chris Packhamb55b2c92019-01-10 21:01:00 +130031/* NAND */
32#define CONFIG_SYS_NAND_ONFI_DETECTION
Chris Packhamb55b2c92019-01-10 21:01:00 +130033#define CONFIG_SYS_MAX_NAND_DEVICE 1
34
35#define BBT_CUSTOM_SCAN
36#define BBT_CUSTOM_SCAN_PAGE 0
37#define BBT_CUSTOM_SCAN_POSITION 2048
38
39/* SPI NOR flash default params, used by sf commands */
Chris Packhamb55b2c92019-01-10 21:01:00 +130040
41#define MTDIDS_DEFAULT "nand0=nand"
42#define MTDPARTS_DEFAULT "mtdparts=nand:240M(user),8M(errlog),8M(nand-bbt)"
43#define MTDPARTS_MTDOOPS "errlog"
44
45/* Partition support */
46
47/* Additional FS support/configuration */
48
49/* USB/EHCI configuration */
50#define CONFIG_EHCI_IS_TDI
51
52/* Environment in SPI NOR flash */
Chris Packhamb55b2c92019-01-10 21:01:00 +130053
Chris Packhamb55b2c92019-01-10 21:01:00 +130054#define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
55
56/* PCIe support */
57#ifndef CONFIG_SPL_BUILD
Chris Packhamb55b2c92019-01-10 21:01:00 +130058#define CONFIG_PCI_SCAN_SHOW
59#endif
60
61/* NAND */
Chris Packhamb55b2c92019-01-10 21:01:00 +130062#define CONFIG_SYS_NAND_ONFI_DETECTION
Chris Packhamb55b2c92019-01-10 21:01:00 +130063
64#define CONFIG_SYS_MALLOC_LEN (4 << 20)
65
66#include <asm/arch/config.h>
67
68/*
69 * Other required minimal configurations
70 */
Chris Packhamb55b2c92019-01-10 21:01:00 +130071#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */
72
Chris Packhamb55b2c92019-01-10 21:01:00 +130073/* Keep device tree and initrd in low memory so the kernel can access them */
74#define CONFIG_EXTRA_ENV_SETTINGS \
75 "fdt_high=0x10000000\0" \
76 "initrd_high=0x10000000\0"
77
78#define CONFIG_SYS_LOAD_ADDR 0x1000000
79#define CONFIG_UBI_PART user
80#define CONFIG_UBIFS_VOLUME user
81
82/* SPL */
83
84/* Defines for SPL */
85#define CONFIG_SPL_SIZE (140 << 10)
Chris Packhamb55b2c92019-01-10 21:01:00 +130086#define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x0030)
87
88#define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
89#define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
90
91#ifdef CONFIG_SPL_BUILD
92#define CONFIG_SYS_MALLOC_SIMPLE
93#endif
94
95#define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
96#define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
97
Chris Packhamb55b2c92019-01-10 21:01:00 +130098#endif /* _CONFIG_X530_H */