1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2022 Tony Dinh <mibodhi@gmail.com>
5 * David Purdy <david.c.purdy@gmail.com>
7 * Based on Kirkwood support:
9 * Marvell Semiconductor <www.marvell.com>
10 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
17 #include <asm/arch/cpu.h>
18 #include <asm/arch/soc.h>
19 #include <asm/arch/mpp.h>
20 #include <asm/global_data.h>
21 #include <linux/bitops.h>
23 DECLARE_GLOBAL_DATA_PTR;
25 /* GPIO configuration */
26 #define POGO_E02_OE_LOW (~(0))
27 #define POGO_E02_OE_HIGH (~(0))
28 #define POGO_E02_OE_VAL_LOW BIT(29)
29 #define POGO_E02_OE_VAL_HIGH 0
31 int board_early_init_f(void)
34 * default gpio configuration
35 * There are maximum 64 gpios controlled through 2 sets of registers
36 * the below configuration configures mainly initial LED status
38 mvebu_config_gpio(POGO_E02_OE_VAL_LOW,
40 POGO_E02_OE_LOW, POGO_E02_OE_HIGH);
42 /* Multi-Purpose Pins Functionality configuration */
43 static const u32 kwmpp_config[] = {
64 MPP29_TSMP9, /* USB Power Enable */
65 MPP48_GPIO, /* LED green */
66 MPP49_GPIO, /* LED orange */
69 kirkwood_mpp_conf(kwmpp_config, NULL);
73 int board_eth_init(struct bd_info *bis)
75 return cpu_eth_init(bis);
80 /* Boot parameters address */
81 gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;