1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2021-2022 Tony Dinh <mibodhi@gmail.com>
5 * Marvell Semiconductor <www.marvell.com>
6 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
12 #include <asm/global_data.h>
13 #include <asm/mach-types.h>
14 #include <asm/arch/cpu.h>
15 #include <asm/arch/soc.h>
16 #include <asm/arch/mpp.h>
17 #include <linux/bitops.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 #define SHEEVAPLUG_OE_LOW (~(0))
22 #define SHEEVAPLUG_OE_HIGH (~(0))
23 #define SHEEVAPLUG_OE_VAL_LOW BIT(29) /* USB_PWEN low */
24 #define SHEEVAPLUG_OE_VAL_HIGH BIT(17) /* LED pin high */
26 int board_early_init_f(void)
29 * default gpio configuration
30 * There are maximum 64 gpios controlled through 2 sets of registers
31 * the below configuration configures mainly initial LED status
33 mvebu_config_gpio(SHEEVAPLUG_OE_VAL_LOW,
34 SHEEVAPLUG_OE_VAL_HIGH,
35 SHEEVAPLUG_OE_LOW, SHEEVAPLUG_OE_HIGH);
37 /* Multi-Purpose Pins Functionality configuration */
38 static const u32 kwmpp_config[] = {
91 kirkwood_mpp_conf(kwmpp_config, NULL);
95 int board_eth_init(struct bd_info *bis)
97 return cpu_eth_init(bis);
103 * arch number of board
105 gd->bd->bi_arch_number = MACH_TYPE_SHEEVAPLUG;
107 /* address of boot parameters */
108 gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;