X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Ffiles%2Farch%2Fmips%2Fath79%2Fmach-mynet-rext.c;h=3d48ca8fa5de21582d3d0c72ccaecc84d4c00e73;hb=f2c6ff772b8073a6f421e0082a927cbb8a14fa37;hp=a3deed5baf598f24d4117e004796585287569b30;hpb=a3515ef4043e0a76af84023d4e01b4223d6eb12e;p=openwrt.git diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-rext.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-rext.c index a3deed5baf..3d48ca8fa5 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-rext.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-rext.c @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -55,6 +56,16 @@ #define MYNET_REXT_ART_ADDR 0x1f7f0000 +static const char *mynet_rext_part_probes[] = { + "cybertan", + NULL, +}; + +static struct flash_platform_data mynet_rext_flash_data = { + .type = "s25fl064k", + .part_probes = mynet_rext_part_probes, +}; + static struct gpio_led mynet_rext_leds_gpio[] __initdata = { { .name = "wd:blue:power", @@ -114,6 +125,21 @@ static struct gpio_keys_button mynet_rext_gpio_keys[] __initdata = { }, }; +static struct at803x_platform_data mynet_rext_at803x_data = { + .disable_smarteee = 0, + .enable_rgmii_rx_delay = 1, + .enable_rgmii_tx_delay = 0, + .fixup_rgmii_tx_delay = 1, +}; + +static struct mdio_board_info mynet_rext_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 4, + .platform_data = &mynet_rext_at803x_data, + }, +}; + static void mynet_rext_get_mac(const char *name, char *mac) { u8 *nvram = (u8 *) KSEG1ADDR(MYNET_REXT_NVRAM_ADDR); @@ -130,7 +156,7 @@ static void __init mynet_rext_setup(void) u8 *art = (u8 *) KSEG1ADDR(MYNET_REXT_ART_ADDR); u8 tmpmac[ETH_ALEN]; - ath79_register_m25p80(NULL); + ath79_register_m25p80(&mynet_rext_flash_data); /* GPIO configuration from drivers/char/GPIO8.c */ @@ -159,12 +185,16 @@ static void __init mynet_rext_setup(void) ath79_register_mdio(0, 0x0); + mdiobus_register_board_info(mynet_rext_mdio0_info, + ARRAY_SIZE(mynet_rext_mdio0_info)); + /* LAN */ mynet_rext_get_mac("et0macaddr=", ath79_eth0_data.mac_addr); /* GMAC0 is connected to an external PHY on Port 4 */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(4); + ath79_eth0_pll_data.pll_10 = 0x00001313; /* athrs_mac.c */ ath79_eth0_pll_data.pll_1000 = 0x0e000000; /* athrs_mac.c */ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_register_eth(0);