WNR2200 device fixes (upstream version)
authorRISCi_ATOM <bob@bobcall.me>
Thu, 24 Mar 2016 16:31:00 +0000 (16:31 +0000)
committerRISCi_ATOM <bob@bobcall.me>
Thu, 24 Mar 2016 16:31:00 +0000 (16:31 +0000)
trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
trunk/target/linux/ar71xx/image/Makefile

index e6c24456ff5e636217297447ba16613396da169e..d58f119ea7b0db73da130965dbfc709aef9b099c 100644 (file)
@@ -526,7 +526,9 @@ wndr3700)
        ucidef_set_led_default "wan" "WAN LED (green)" "netgear:green:wan" "0"
        ucidef_set_led_usbdev "usb" "USB" "netgear:green:usb" "1-1"
        ;;
-
+wnr2200)
+        ucidef_set_led_usbdev "usb" "USB" "netgear:green:usb" "1-1"
+        ;;
 r6100)
        ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0"
        ucidef_set_led_usbdev "usb" "USB" "netgear:blue:usb" "1-1"
index 8ef4fce6cb91de9f2f78e9f407562f8f1f48d318..0a32dd6d424ce952543a977653c0f619bbbfd60f 100755 (executable)
@@ -401,6 +401,7 @@ platform_check_image() {
        wndr3700 | \
        wnr2000-v3 | \
        wnr612-v2 | \
+       wnr2200 | \
        wnr1000-v2)
                local hw_magic
 
index bf7f9ee67fd05b6eb84b041b743a9e86a42b3f8e..451b80b3e5d1e529f8d52d3d5df6745b6e224f2a 100644 (file)
@@ -37,6 +37,7 @@
 #define WNR2200_GPIO_LED_PWR_AMBER     21
 #define WNR2200_GPIO_LED_PWR_GREEN     22
 
+#define WNR2200_GPIO_USB_5V             4
 #define WNR2200_GPIO_USB_POWER         24
 
 #define WNR2200_KEYS_POLL_INTERVAL     20 /* msecs */
@@ -127,10 +128,9 @@ static void __init wnr2200_setup(void)
                                        wnr2200_leds_gpio);
 
        /* enable power for the USB port */
-       gpio_request_one(WNR2200_GPIO_USB_POWER,
-                       GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
-                       "USB power");
-
+       ap9x_pci_setup_wmac_gpio(0,
+               BIT(WNR2200_GPIO_USB_5V),
+               BIT(WNR2200_GPIO_USB_5V));
        ath79_register_usb();
 }
 
index 6d275fbf093f1032d2bc1ace0060abeda935a396..57e6df82ae205d070489c758c8cecfbe06fb9929 100644 (file)
@@ -1001,7 +1001,8 @@ wpj344_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
 wpj531_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
 wpj558_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
 wndap360_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1728k(kernel),6016k(rootfs),64k(nvram)ro,64k(art)ro,7744k@0x50000(firmware)
-wnr2200_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
+wnr2200_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
+wnr2200_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14784k(firmware),64k(config),1024k(language_table),64k(pot),64k(traffic_meter),64k(ART)ro
 wnr2000v3_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro
 wnr2000v4_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,3776k(firmware),64k(art)ro
 r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata),256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k@0x1a0000(firmware),2048k(language),3072k(traffic_meter)
@@ -1942,7 +1943,8 @@ $(eval $(call SingleProfile,MyLoader,64k,WPE72_16M,wpe72,,ttyS0,115200,0x1000000
 
 $(eval $(call SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303033,WNR2000V3,"" NA,-H 29763551+04+32))
 $(eval $(call SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,ttyS0,115200,$$(wnr2000v4_mtdlayout),0x32303034,WNR2000V4,"" NA,))
-$(eval $(call SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,WNR2200,"" NA,))
+$(eval $(call SingleProfile,Netgear,64kraw,WNR2200_8M,wnr2200-8m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_8M),0x32323030,wnr2200,"" NA,-H 29763600+08+64))
+$(eval $(call SingleProfile,Netgear,64kraw,WNR2200_16M,wnr2200-16m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_16M),0x32323030,wnr2200,"" WW,))
 $(eval $(call SingleProfile,Netgear,64kraw,REALWNR612V2,wnr612v2,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,WNR612V2,"",))
 $(eval $(call SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,N150R,"",))
 $(eval $(call SingleProfile,Netgear,64kraw,REALWNR1000V2,wnr1000v2,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303031,WNR1000V2,"",))
@@ -2288,6 +2290,7 @@ $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTROCKETMXW UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
 $(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
+$(eval $(call MultiProfile,WNR2200,WNR2200_8M WNR2200_16M))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
 $(eval $(call MultiProfile,WPJ344,WPJ344_16M))