aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-11-30 11:56:48 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-04 11:41:50 +0100
commit2135e54c0001d7c8a18c05bcff0b8944a526dcef (patch)
tree154fe8d055c98a23c49665cd3a956dafc16a3f1b /target
parent106a4605c87c91dd71b09b2814e232ebac6873ed (diff)
downloadupstream-2135e54c0001d7c8a18c05bcff0b8944a526dcef.tar.gz
upstream-2135e54c0001d7c8a18c05bcff0b8944a526dcef.tar.bz2
upstream-2135e54c0001d7c8a18c05bcff0b8944a526dcef.zip
ar71xx: set GPIO reset line for Ubiquiti NanoStation Loco XW
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c
index 7f7d1f95df..55cf52d19e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c
@@ -16,6 +16,7 @@
#include <linux/ath9k_platform.h>
#include <linux/etherdevice.h>
#include <linux/ar8216_platform.h>
+#include <linux/platform_data/phy-at803x.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/irq.h>
@@ -477,10 +478,26 @@ static void __init ubnt_nano_m_xw_setup(void)
ath79_register_eth(0);
}
+static struct at803x_platform_data ubnt_loco_m_xw_at803x_data = {
+ .has_reset_gpio = 1,
+ .reset_gpio = 0,
+};
+
+static struct mdio_board_info ubnt_loco_m_xw_mdio_info[] = {
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 1,
+ .platform_data = &ubnt_loco_m_xw_at803x_data,
+ },
+};
+
static void __init ubnt_loco_m_xw_setup(void)
{
ubnt_xw_init();
+ mdiobus_register_board_info(ubnt_loco_m_xw_mdio_info,
+ ARRAY_SIZE(ubnt_loco_m_xw_mdio_info));
+
ath79_register_mdio(0, ~BIT(1));
ath79_eth0_data.phy_mask = BIT(1);
ath79_register_eth(0);