Peter and folks,
I believe Peter meant WZR-HP-AG300H.
Last night, I did some research on behaviors of leds on WZR-HP-AG300H,
and located controls for all remaining leds on wmacs.
wmac gpio
0 1 2.4G amber
0 3 USB
0 5 2.4G green
1 1 5G green
1 3 ROUTER
1 4 MOVIE ENGINE
1 5 5G amber
This result also suggested that we use
ap9x_pci_setup_wmac_led_pin(0, 1);
to correct phy-triggered led on 2.4G band being green,
to amber, to match that of 5G band.
I added a code for the wmac_leds, and they work, EXCEPT that
wmacs must be enabled ONCE (by means of wifi command
execution) before they actually start to work.
After the first enable, leds can be controlled independent
from phy states.
Any suggestions?
Current patch follows.
(Oh, and I also want some suggestions on "band2g" and "band5g" names.)
--- mach-wzr-hp-ag300h.c-orig 2012-07-25 22:53:19.036000195 +0900
+++ mach-wzr-hp-ag300h.c 2012-07-31 13:31:16.905375954 +0900
@@ -75,6 +75,47 @@
},
};
+static struct gpio_led wzrhpag300h_wmac0_leds_gpio[] = {
+ {
+ .name = "buffalo:amber:band2g",
+ .gpio = 1,
+ .active_low = 1,
+ },
+ {
+ .name = "buffalo:green:usb",
+ .gpio = 3,
+ .active_low = 1,
+ },
+ {
+ .name = "buffalo:green:band2g",
+ .gpio = 5,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led wzrhpag300h_wmac1_leds_gpio[] = {
+ {
+ .name = "buffalo:green:band5g",
+ .gpio = 1,
+ .active_low = 1,
+ },
+ {
+ .name = "buffalo:green:router",
+ .gpio = 3,
+ .active_low = 1,
+ },
+ {
+ .name = "buffalo:blue:movie_engine",
+ .gpio = 4,
+ .active_low = 1,
+ },
+ {
+ .name = "buffalo:amber:band5g",
+ .gpio = 5,
+ .active_low = 1,
+ },
+};
+
static struct gpio_keys_button wzrhpag300h_gpio_keys[] __initdata = {
{
.desc = "reset",
@@ -111,6 +152,13 @@
.debounce_interval = WZRHPAG300H_KEYS_DEBOUNCE_INTERVAL,
.gpio = 7,
.active_low = 1,
+ }, {
+ .desc = "movie_engine",
+ .type = EV_KEY,
+ .code = BTN_7,
+ .debounce_interval = WZRHPAG300H_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = 8,
+ .active_low = 1,
}
};
@@ -149,6 +197,14 @@
ath79_register_m25p80_multi(&wzrhpag300h_flash_data);
+ ap9x_pci_setup_wmac_led_pin(0, 1);
+ ap9x_pci_setup_wmac_led_pin(1, 5);
+
+ ap9x_pci_setup_wmac_leds(0, wzrhpag300h_wmac0_leds_gpio,
+ ARRAY_SIZE(wzrhpag300h_wmac0_leds_gpio));
+ ap9x_pci_setup_wmac_leds(1, wzrhpag300h_wmac1_leds_gpio,
+ ARRAY_SIZE(wzrhpag300h_wmac1_leds_gpio));
+
ap94_pci_init(eeprom1, mac1, eeprom2, mac2);
}
--- shinoda
On 2012/07/29, at 1:41, Peter Naulls wrote:
> On 07/27/2012 07:35 PM, LEO Airwarosu Yoichi Shinoda wrote:
>>
>>
>> On 2012/07/28, at 8:04, Peter Naulls wrote:
>>
>>> On 07/27/2012 04:00 PM, LEO Airwarosu Yoichi Shinoda wrote:
>>>>
>>>> Folks,
>>>>
>>>> Please ignore this particular (additional) patch.
>>>>
>>>> I've started to learn how uci-defaults work.
>>>
>>> Also, and unless I've missed some very recent patch, we're still sans
>>> full support of all the LEDs on the AG300N. Anyone want to have
>>> a go?
>>
>> Do you mean full support by something similar to those provided by the
>> factory
>> firmware
>> (e.g.
>> http://www.cellularforless.com/resources/userguides/buffalo_Manual.pdf
>> pp.8-9)?
>
> No, this is different, but possibly, quite similar hardware internally - the
> WZR-AG300N - I thought I had seen mention of that in this thread too, but
> perhaps not. I mention it for completeness.
>
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel