From: juhosg Date: Wed, 4 Jan 2012 21:10:12 +0000 (+0000) Subject: backfire: ar71xx: fixes some stuffs for TP-LINK TL-MR3420 X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=ea203ca9b129b4e44c3ff24b547a002ae0bad372 backfire: ar71xx: fixes some stuffs for TP-LINK TL-MR3420 The patch fixes the following: - Default network configuration - QSS and reset buttons (failsafe is now working) - PHY mask definition for the WAN interface - And the WiFi LED is now working Patch-by: Magyar Szabolcs (from #10724) git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@29661 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/ar71xx/base-files/etc/defconfig/tl-mr3420/network b/target/linux/ar71xx/base-files/etc/defconfig/tl-mr3420/network new file mode 100644 index 000000000..de201bf5e --- /dev/null +++ b/target/linux/ar71xx/base-files/etc/defconfig/tl-mr3420/network @@ -0,0 +1,24 @@ +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +config interface lan + option ifname eth0 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth1 + option proto dhcp + +config switch eth0 + option enable_vlan 1 + +config switch_vlan + option device eth0 + option vlan 1 + option ports "0 1 2 3 4" diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3420.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3420.c index 76a917e93..2d2b05f56 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3420.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3420.c @@ -90,14 +90,14 @@ static struct gpio_button tl_mr3420_gpio_buttons[] __initdata = { { .desc = "reset", .type = EV_KEY, - .code = KEY_RESTART, + .code = BTN_0, .threshold = 3, .gpio = TL_MR3420_GPIO_BTN_RESET, .active_low = 1, }, { .desc = "qss", .type = EV_KEY, - .code = KEY_WPS_BUTTON, + .code = BTN_1, .threshold = 3, .gpio = TL_MR3420_GPIO_BTN_QSS, .active_low = 1, @@ -123,13 +123,13 @@ static void __init tl_mr3420_setup(void) tl_mr3420_gpio_buttons); ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_set_mac_base(mac); /* WAN port */ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; + ar71xx_eth0_data.phy_mask = BIT(4); /* LAN ports */ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; @@ -142,7 +142,10 @@ static void __init tl_mr3420_setup(void) ar71xx_add_device_usb(); + ap91_pci_setup_wmac_led_pin(0); + ap91_pci_init(ee, mac); } + MIPS_MACHINE(AR71XX_MACH_TL_MR3420, "TL-MR3420", "TP-LINK TL-MR3420", tl_mr3420_setup);