1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2010, 2018
4 * Allied Telesis <www.alliedtelesis.com>
12 #include <asm/arch/cpu.h>
13 #include <asm/arch/soc.h>
14 #include <asm/arch/mpp.h>
15 #include <asm/arch/gpio.h>
17 #define SBX81LIFXCAT_OE_LOW (~0)
18 #define SBX81LIFXCAT_OE_HIGH (~BIT(11))
19 #define SBX81LIFXCAT_OE_VAL_LOW (0)
20 #define SBX81LIFXCAT_OE_VAL_HIGH (BIT(11))
22 DECLARE_GLOBAL_DATA_PTR;
24 int board_early_init_f(void)
27 * default gpio configuration
28 * There are maximum 64 gpios controlled through 2 sets of registers
29 * the below configuration configures mainly initial LED status
31 mvebu_config_gpio(SBX81LIFXCAT_OE_VAL_LOW,
32 SBX81LIFXCAT_OE_VAL_HIGH,
33 SBX81LIFXCAT_OE_LOW, SBX81LIFXCAT_OE_HIGH);
35 /* Multi-Purpose Pins Functionality configuration */
36 static const u32 kwmpp_config[] = {
90 kirkwood_mpp_conf(kwmpp_config, NULL);
96 /* address of boot parameters */
97 gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
102 #ifdef CONFIG_RESET_PHY_R
103 /* automatically defined by kirkwood config.h */
109 #ifdef CONFIG_MV88E61XX_SWITCH
110 int mv88e61xx_hw_reset(struct phy_device *phydev)
112 phydev->advertising = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full;
118 #ifdef CONFIG_MISC_INIT_R
119 int misc_init_r(void)
124 ret = led_get_by_label("status:ledp", &dev);
126 led_set_state(dev, LEDST_ON);
128 ret = led_get_by_label("status:ledn", &dev);
130 led_set_state(dev, LEDST_OFF);