> > This patch fixes ticket #15267 by enabling power on the
> > WNR2200's USB port. At present, the USB port on the WNR2200
> > is non-functional due to it not receiving power.
> > 
> > This patch defines an additional GPIO pin, but none of the
> > current GPIO definitions have been modified.
> > 
> > Signed-off-by: Riley Baird <BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4XiX at 
> > bitmessage.ch>
> > ----
> > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c 
> > b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
> > index bf7f9ee..b98f7c7 100644
> > --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
> > +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
> > @@ -36,7 +36,7 @@
> >  #define WNR2200_GPIO_LED_LAN4_GREEN        16
> >  #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,9 +127,10 @@ 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_LED_PWR_AMBER) | 
> > BIT(WNR2200_GPIO_LED_PWR_GREEN),
> > +           BIT(WNR2200_GPIO_USB_5V) | BIT(WNR2200_GPIO_LED_PWR_AMBER));
> So the USB port GPIO is behind the WMAC? Why also add these other LEDs
> to the WMAC GPIO mask?

As curious as it sounds, the USB port GPIO is indeed behind the WMAC. The
WNR2200's GPL code contains the following extract:
 /* AR7241 GPIOs */
#define WPS_LED_GPIO 7
#define AP_USB_LED_GPIO 8

/* AR9287 GPIOs */
#define WLAN_LED_GPIO 0
#define POWER_LED_GPIO 2 /* green */
#define STATUS_LED_GPIO 1 /* amber */
#define WLAN_BUTTON_GPIO 3
#define WPS_BUTTON_GPIO 5
#define RESET_BUTTON_GPIO 6
#define USB_5V_GPIO 4

Looking at the above description, I believe you are right that the other
LEDs should not be added to the WMAC GPIO mask. What should I do now,
resubmit?

Attachment: pgplopFEP9K9z.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to