From: RISCi_ATOM Date: Thu, 24 Mar 2016 16:31:00 +0000 (+0000) Subject: WNR2200 device fixes (upstream version) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5797de06f5d3c489dc3a80d90c27a7ea909ee455;p=librecmc%2Flibrecmc-fossil.git WNR2200 device fixes (upstream version) --- diff --git a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index e6c24456..d58f119e 100644 --- a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -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" diff --git a/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 8ef4fce6..0a32dd6d 100755 --- a/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -401,6 +401,7 @@ platform_check_image() { wndr3700 | \ wnr2000-v3 | \ wnr612-v2 | \ + wnr2200 | \ wnr1000-v2) local hw_magic diff --git a/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c b/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c index bf7f9ee6..451b80b3 100644 --- a/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c +++ b/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c @@ -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(); } diff --git a/trunk/target/linux/ar71xx/image/Makefile b/trunk/target/linux/ar71xx/image/Makefile index 6d275fbf..57e6df82 100644 --- a/trunk/target/linux/ar71xx/image/Makefile +++ b/trunk/target/linux/ar71xx/image/Makefile @@ -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))