Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2011 |
| 4 | * Marvell Semiconductor <www.marvell.com> |
| 5 | * Written-by: Lei Wen <leiwen@marvell.com> |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * This file should be included in board config header file. |
| 10 | * |
Stefan Roese | 7cd3484 | 2015-04-25 06:29:49 +0200 | [diff] [blame] | 11 | * It supports common definitions for MVEBU platforms |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 12 | */ |
| 13 | |
Stefan Roese | ebda3ec | 2015-04-25 06:29:47 +0200 | [diff] [blame] | 14 | #ifndef _MVEBU_CONFIG_H |
| 15 | #define _MVEBU_CONFIG_H |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 16 | |
| 17 | #include <asm/arch/soc.h> |
| 18 | |
Stefan Roese | 479f9af | 2016-02-10 07:23:00 +0100 | [diff] [blame] | 19 | #if defined(CONFIG_ARMADA_XP) || defined(CONFIG_ARMADA_375) \ |
| 20 | || defined(CONFIG_ARMADA_38X) |
Stefan Roese | eb083e5 | 2015-12-21 13:56:33 +0100 | [diff] [blame] | 21 | /* |
| 22 | * Set this for the common xor register definitions needed in dram.c |
| 23 | * for A38x as well here. |
| 24 | */ |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 25 | #define MV88F78X60 /* for the DDR training bin_hdr code */ |
Stefan Roese | 7cd3484 | 2015-04-25 06:29:49 +0200 | [diff] [blame] | 26 | #endif |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 27 | |
Stefan Roese | c14c93f | 2015-11-18 12:44:29 +0100 | [diff] [blame] | 28 | #define CONFIG_SYS_L2_PL310 |
| 29 | |
| 30 | #ifdef CONFIG_SPL_BUILD |
| 31 | #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ |
| 32 | #endif |
| 33 | |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 34 | /* |
Baruch Siach | ea3d9de | 2018-06-18 21:56:25 +0300 | [diff] [blame] | 35 | * By default the generated mvebu kwbimage.cfg is used |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 36 | * If for some board, different configuration file need to be used, |
| 37 | * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file |
| 38 | */ |
| 39 | #ifndef CONFIG_SYS_KWD_CONFIG |
Baruch Siach | ea3d9de | 2018-06-18 21:56:25 +0300 | [diff] [blame] | 40 | #define CONFIG_SYS_KWD_CONFIG arch/arm/mach-mvebu/kwbimage.cfg |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 41 | #endif /* CONFIG_SYS_KWD_CONFIG */ |
| 42 | |
| 43 | /* Add target to build it automatically upon "make" */ |
Stefan Roese | a4fc5d4 | 2015-01-19 11:33:49 +0100 | [diff] [blame] | 44 | #ifdef CONFIG_SPL |
| 45 | #define CONFIG_BUILD_TARGET "u-boot-spl.kwb" |
Stefan Roese | a4fc5d4 | 2015-01-19 11:33:49 +0100 | [diff] [blame] | 46 | #endif |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 47 | |
| 48 | /* end of 16M scrubbed by training in bootrom */ |
| 49 | #define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000 |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 50 | |
| 51 | #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE |
| 52 | |
| 53 | /* |
| 54 | * SPI Flash configuration |
| 55 | */ |
| 56 | #ifdef CONFIG_CMD_SF |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 57 | #ifndef CONFIG_ENV_SPI_BUS |
| 58 | # define CONFIG_ENV_SPI_BUS 0 |
| 59 | #endif |
| 60 | #ifndef CONFIG_ENV_SPI_CS |
| 61 | # define CONFIG_ENV_SPI_CS 0 |
| 62 | #endif |
| 63 | #ifndef CONFIG_ENV_SPI_MAX_HZ |
| 64 | # define CONFIG_ENV_SPI_MAX_HZ 50000000 |
| 65 | #endif |
| 66 | #endif |
| 67 | |
Stefan Roese | 49e7d77 | 2015-11-20 13:51:57 +0100 | [diff] [blame] | 68 | /* Needed for SPI NOR booting in SPL */ |
| 69 | #define CONFIG_DM_SEQ_ALIAS 1 |
| 70 | |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 71 | /* |
| 72 | * Ethernet Driver configuration |
| 73 | */ |
| 74 | #ifdef CONFIG_CMD_NET |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 75 | #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ |
Stefan Roese | b3efc57 | 2015-11-24 09:15:22 +0100 | [diff] [blame] | 76 | #define CONFIG_ARP_TIMEOUT 200 |
| 77 | #define CONFIG_NET_RETRY_COUNT 50 |
Stefan Roese | 93e6bf4 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 78 | #endif /* CONFIG_CMD_NET */ |
| 79 | |
| 80 | /* |
| 81 | * I2C related stuff |
| 82 | */ |
| 83 | #ifdef CONFIG_CMD_I2C |
| 84 | #ifndef CONFIG_SYS_I2C_SOFT |
| 85 | #define CONFIG_I2C_MVTWSI |
| 86 | #endif |
| 87 | #define CONFIG_SYS_I2C_SLAVE 0x0 |
| 88 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 89 | #endif |
| 90 | |
Stefan Roese | 6417489 | 2015-10-22 12:36:31 +0200 | [diff] [blame] | 91 | /* Use common timer */ |
| 92 | #define CONFIG_SYS_TIMER_COUNTS_DOWN |
| 93 | #define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14) |
| 94 | #define CONFIG_SYS_TIMER_RATE 25000000 |
| 95 | |
Stefan Roese | ebda3ec | 2015-04-25 06:29:47 +0200 | [diff] [blame] | 96 | #endif /* __MVEBU_CONFIG_H */ |