diff options
author | Stefan Roese <sr@denx.de> | 2015-11-18 11:06:09 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-12-07 00:15:59 +0100 |
commit | ae9996c806e15b68b97fe7a7242c44e713345269 (patch) | |
tree | e7243daf44bd67b383ef81cbb61e1c14b1bc53bd /board/sr1500/socfpga.c | |
parent | 75507d5d5496a691aecb731f87d4d8d5cdf62b77 (diff) |
arm: socfpga: Add SoCFPGA SR1500 board
The SR1500 board is a CycloneV based board, similar to the EBV
SoCrates, equipped with the following devices:
- SPI NOR
- eMMC
- Ethernet
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Diffstat (limited to 'board/sr1500/socfpga.c')
-rw-r--r-- | board/sr1500/socfpga.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/board/sr1500/socfpga.c b/board/sr1500/socfpga.c new file mode 100644 index 0000000000..9f895842f7 --- /dev/null +++ b/board/sr1500/socfpga.c @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2015 Stefan Roese <sr@denx.de> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <i2c.h> +#include <miiphy.h> +#include <asm/arch/reset_manager.h> +#include <asm/gpio.h> +#include <asm/io.h> + +DECLARE_GLOBAL_DATA_PTR; + +void s_init(void) {} + +/* + * Miscellaneous platform dependent initialisations + */ +int board_init(void) +{ + /* Address of boot parameters for ATAG (if ATAG is used) */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +int board_early_init_f(void) +{ + int ret; + + /* Reset the Marvell PHY 88E1510 */ + ret = gpio_request(63, "PHY reset"); + if (ret) + return ret; + + gpio_direction_output(63, 0); + mdelay(1); + gpio_set_value(63, 1); + mdelay(10); + + return 0; +} |