Good day to all,

For last two days I've been trying to build the replacement for my old-good
DIR-320 home router running OpenWRT. Due to a number of reasons I don't want to
dive into I ended up with buying DIR-615 rev. E4 router and trying to get
working under OpenWRT.

Current OpenWRT trunk don't support this hardware.rev of DIR-615, but its
hardware is very similar to DIR-600/601 rev.A1 so I used that profile as a base
for a new DIR-615-E4-USB profile. Without diving deep into detail I was had
successfully compiled and flashed OpenWRT into box and got it working pretty
good (including USB port I had soldered into it), but all leds except power were
nonfunctional (i.e. not lit).

DIR-615 E4 is equipped with dual color "power" led (amber/green), dual color
"wan" led (amber/green), single color "WiFi" led (green), four single color "lan
port X" leds (green) and one single color "WPS" led (blue). I had sequentially
checked all the GPIO lines of AR7240 CPU and found how to control all the leds
except for WiFi one. It wasn't hard to create mach-dir-615-e4-usb.c file based
on mach-dir-600-a1.c and patch it with the correct leds definitions.

Now I want WAN and LAN1-4 leds to be lit when active link detected on
appropriate port and to blink on tx/rx. It's easy to achive for wan port with
help of ledtrig-netdev as this port is connected to a dedicated CPU ethernet
interface (eth1 in my case), but I don't know if it is possible to use netdev
ledtrig to track the state of the separate HW ports of the built-in AR7240
switch. Any help with this?

P.S. Another gotcha is the WiFi led. Looks like it is connected to the one of
the GPIO lines of AR9287 chip DIR-615 uses for WiFi. Default led_pin<=>GPIO
assignment for this chip by compat-wireless (ath9k.h: #define ATH_LED_PIN_9287
8) isn't working for this box. Using the method of trial and error I was able to
get the WiFi led lit upon ath9k initialization. Correct GPIO line seems to be 17
and I set it using ap91_pci_setup_wmac_led_pin(17) call in the
mach-dir-615-e4-usb.c. Unfortunately it seems that once the let get lit there's
no was to shut it off or make it blink. Feeding any values into appropriate
files of sysfs interface at /sys/class/leds/ath9k-phy0/ have no effect.
Unloading ath* and *80211 kernel modules have no effect. No matter what I do
(except for rebooting the box) WiFi led remains on. I would appreciate any
advice about how to debug this incorrect WiFi led behavior. Thanks in advance.

P.P.S. I will post the patch that adds support for DIR-615 rev.E4 to the OpenWRT
as soon would address this led-related bugs.

-- 
Best regards,
Alexey Loukianov                          mailto:[email protected]
System Engineer,                            Mob.:+7(926)218-1320
*nix Specialist


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to