#17062: LEDs mapped to wrong GPIOs on WRT54GL
------------------------+------------------------------------------
  Reporter:  anonymous  |      Owner:  developers
      Type:  defect     |     Status:  reopened
  Priority:  normal     |  Milestone:  Chaos Calmer 15.05
 Component:  kernel     |    Version:  Trunk
Resolution:             |   Keywords:  wrt54g wrt54gl gpio led leds
------------------------+------------------------------------------

Comment (by pesco):

 PS: Also of interest might be the mailing list thread that led to the
 inclusion of the boardtype 0x0101 (WRT54GS) case in
 https://dev.openwrt.org/browser/trunk/target/linux/brcm47xx/patches-3.10/145
 -MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch?rev=41486 .

 {{{
 /* Verified on: WRT54GS V1.0 */
 static const struct gpio_led
 bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
         BCM47XX_GPIO_LED(0, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
         BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
         BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
 };
 }}}

 Note that this matches the original (broadcom-diag) mapping except it is
 missing the SES LED lines on GPIO 2 and 3. It seems these were left out
 for fear of conflicting with some weird nvram settings of the person
 reporting the bug in that case.

 Quote (reporter):
 > The ADM pins also might be wrong (despite definitions in the nvram
 > that point to those pins). My switch gets detected but when I do
 > "swconfig switch0 show" my system reboots.

 > Note:
 > [   12.580000] gpio-keys gpio-keys.0: unable to claim gpio 6, err=-16
 > [   12.660000] gpio-keys: probe of gpio-keys.0 failed with error -16
 > [   12.900000] leds-gpio: probe of leds-gpio failed with error -16

 Quote (developer):
 > This is because `__gpiod_request` returned -EBUSY.
 >
 > Your nvram has following entries:
 > gpio6=adm_rc
 > gpio5=adm_eedi
 > gpio3=adm_eesk
 > gpio2=adm_eecs
 >
 > All of the above GPIOs are reserved by adm6996. It means registering
 > LEDs failed (because GPIOs 2 and 3 were already in use) and
 > registering buttons failed (because GPIO 6 was already in use).

 https://lists.openwrt.org/pipermail/openwrt-devel/2014-June/025865.html

--
Ticket URL: <https://dev.openwrt.org/ticket/17062#comment:7>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to