Commit 0b35f0c5 authored by Florian Fainelli's avatar Florian Fainelli Committed by Ralf Baechle

MIPS: BCM63XX: let board specify an external GPIO to reset PHY

Some boards may need to reset their external PHY or switch they are
attached to, add a hook for doing this along with providing custom
linux/gpio.h flags for doing this.
Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: jogo@openwrt.org
Cc: Florian Fainelli <florian@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5501/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 0680dc86
...@@ -883,5 +883,9 @@ int __init board_register_devices(void) ...@@ -883,5 +883,9 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds); platform_device_register(&bcm63xx_gpio_leds);
if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
gpio_request_one(board.ephy_reset_gpio,
board.ephy_reset_gpio_flags, "ephy-reset");
return 0; return 0;
} }
...@@ -45,6 +45,12 @@ struct board_info { ...@@ -45,6 +45,12 @@ struct board_info {
/* GPIO LEDs */ /* GPIO LEDs */
struct gpio_led leds[5]; struct gpio_led leds[5];
/* External PHY reset GPIO */
unsigned int ephy_reset_gpio;
/* External PHY reset GPIO flags from gpio.h */
unsigned long ephy_reset_gpio_flags;
}; };
#endif /* ! BOARD_BCM963XX_H_ */ #endif /* ! BOARD_BCM963XX_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment