1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2011-2012
4 * Gerald Kerma <dreagle@doukki.net>
5 * Luka Perkov <luka@openwrt.org>
6 * Simon Baatz <gmbnomis@gmail.com>
12 #include <asm/global_data.h>
14 #include <asm/arch/cpu.h>
15 #include <asm/arch/soc.h>
16 #include <asm/arch/mpp.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 int board_early_init_f(void)
24 * default gpio configuration
25 * There are maximum 64 gpios controlled through 2 sets of registers
26 * the below configuration configures mainly initial LED status
28 mvebu_config_gpio(IB62x0_OE_VAL_LOW,
30 IB62x0_OE_LOW, IB62x0_OE_HIGH);
32 /* Set SATA activity LEDs to default off */
33 writel(MVSATAHC_LED_POLARITY_CTRL, MVSATAHC_LED_CONF_REG);
34 /* Multi-Purpose Pins Functionality configuration */
35 static const u32 kwmpp_config[] = {
51 MPP22_GPIO, /* Power LED red */
52 MPP24_GPIO, /* Power off device */
53 MPP25_GPIO, /* Power LED green */
54 MPP27_GPIO, /* USB transfer LED */
55 MPP28_GPIO, /* Reset button */
56 MPP29_GPIO, /* USB Copy button */
59 kirkwood_mpp_conf(kwmpp_config, NULL);
65 /* adress of boot parameters */
66 gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;