OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To
    Mathias Kresin
  • Operating System All
  • Severity Very Low
  • Priority Very Low
  • Reported Version All
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by mike - 23.01.2017
Last edited by Mathias Kresin - 01.02.2017

FS#425 - mvebu led config (wrt1200 v1)

Supply the following if possible:
- Device problem occurs on
- Software versions of LEDE release, packages, etc.
- Steps to reproduce

Device is a Linksys wrt1200 v1 running LEDE Reboot 17.01-SNAPSHOT r3006-ef08595. I noticed the usb2 led wasn’t working, checked the led configs in /etc/config/system and the dev option for config led ‘led_usb3’ was -

option dev ‘3-1’

changed it to -

option dev ‘2-1’

rebooted and usb2 led is working now.

Closed by  Mathias Kresin
01.02.2017 06:49
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with ht tps://git.lede-project.org/726e45dfe956b a6e0814919f2943a6a9d2f529d3

Project Manager
Mathias Kresin commented on 24.01.2017 08:22

Have you tested with an usb2 or usb3 device? It could be that 2-1 is for usb2 and 3-1 is for usb3.

Would you please run the following command on the wrt1200 and paste the output here:

find /sys/ -iname usb*
mike commented on 24.01.2017 21:13

You're right, the drive that's normally connected to the usb3 port is a usb2 drive, so i left the usb3 led config dev option at '2-1' and connected a usb3 drive, led didn't work, changed the dev option to '3-1' and the led worked with the usb3 drive, but not the usb2 drive. Here's the output you asked for -

:~# find /sys/ -iname usb*
/sys/bus/usb
/sys/bus/usb/devices/usb1
/sys/bus/usb/devices/usb2
/sys/bus/usb/devices/usb3
/sys/bus/usb/drivers/usb
/sys/bus/usb/drivers/usb/usb1
/sys/bus/usb/drivers/usb/usb2
/sys/bus/usb/drivers/usb/usb3
/sys/bus/usb/drivers/usbfs
/sys/bus/usb/drivers/usb-storage
/sys/bus/platform/devices/usb3_phy
/sys/bus/platform/drivers/usb_phy_generic
/sys/bus/platform/drivers/usb_phy_generic/usb3_phy
/sys/devices/platform/soc/soc:internal-regs/f10f8000.usb3/usb2
/sys/devices/platform/soc/soc:internal-regs/f10f8000.usb3/usb2/2-0:1.0/usb2-port1
/sys/devices/platform/soc/soc:internal-regs/f10f8000.usb3/usb3
/sys/devices/platform/soc/soc:internal-regs/f10f8000.usb3/usb3/3-0:1.0/usb3-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb1-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb2-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb3-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb2/ports/usb1-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb2/ports/usb2-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb2/ports/usb3-port1
/sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1
/sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-0:1.0/usb1-port1
/sys/devices/platform/usb3_phy
/sys/devices/platform/xhci0-vbus/regulator/regulator.1/usb3_phy-vcc
/sys/firmware/devicetree/base/soc/internal-regs/usb3@f0000
/sys/firmware/devicetree/base/soc/internal-regs/usb3@f8000
/sys/firmware/devicetree/base/soc/internal-regs/usb3@f8000/usb-phy
/sys/firmware/devicetree/base/soc/internal-regs/usb@58000
/sys/firmware/devicetree/base/soc/internal-regs/i2c@11000/pca9635@68/usb3_1@6
/sys/firmware/devicetree/base/soc/internal-regs/i2c@11000/pca9635@68/usb3_2@7
/sys/firmware/devicetree/base/soc/internal-regs/i2c@11000/pca9635@68/usb2@5
/sys/firmware/devicetree/base/usb3_phy
/sys/kernel/debug/clk/usb3h0
/sys/kernel/debug/clk/usb3h1
/sys/kernel/debug/clk/usb3d
/sys/kernel/debug/clk/usb2
/sys/kernel/debug/usb
/sys/kernel/debug/regulator/xhci0-vbus/usb3_phy-vcc
/sys/module/ums_usbat/drivers/usb:ums-usbat
/sys/module/ums_sddr09/drivers/usb:ums-sddr09
/sys/module/ums_sddr55/drivers/usb:ums-sddr55
/sys/module/ums_jumpshot/drivers/usb:ums-jumpshot
/sys/module/ums_datafab/drivers/usb:ums-datafab
/sys/module/ums_cypress/drivers/usb:ums-cypress
/sys/module/usb_storage
/sys/module/usb_storage/drivers/usb:usb-storage
/sys/module/ums_freecom/drivers/usb:ums-freecom
/sys/module/usbcore
/sys/module/usbcore/drivers/usb:hub
/sys/module/usbcore/drivers/usb:usbfs
/sys/module/usbcore/parameters/usbfs_snoop
/sys/module/usbcore/parameters/usbfs_memory_mb
/sys/module/ums_alauda/drivers/usb:ums-alauda
/sys/module/ums_isd200/drivers/usb:ums-isd200
/sys/module/ums_karma/drivers/usb:ums-karma
Project Manager
Mathias Kresin commented on 24.01.2017 22:42

Would you please try an image from https://www.kresin.me/files/mvebu/. The images are build from the 17.01 release branch and do include LuCI.

Don't preserve your config when upgrading! Please test both usb ports with USB 2.0 and USB 3.0 devices. Check if the correct LED is switched on and report back!

The LED names should be fixed as well.

mike commented on 25.01.2017 02:55

Got the image flashed, settings were deleted, tested usb2 and usb3 drives on both ports and all leds work and both drives work, many thanks! Looking forward to the official 17.01 release.

Project Manager
Mathias Kresin commented on 25.01.2017 15:58

I was hinted that there is one more USB LED. I've uploaded new images to take account of this extra LED.

The expected behaviour changes to:

  • the first USB LED should get bright in case either an USB 2.0 or USB 3.0 device is attached to the first USB port.
  • the second USB LED should get bright in case either an USB 2.0 or USB 3.0 device is attached to the second USB port.
  • the "dot" LED below the second (bar) USB LED should get bright in addition to the (bar) LED in case an USB 3 device is attached to the second USB port

The names should be "USB 1" for the first USB LED, "USB 2" for the second USB LED and "USB 2 SS" for the "dot" LED below the second (bar) USB LED.

Would you please test again and confirm that it is working this way on your wrt1200!

anomeome commented on 25.01.2017 17:35

mamba:

root@lede:~# ls -las /sys/bus/usb/devices
     0 drwxr-xr-x    2 root     root             0 Jan  1  1970 .
     0 drwxr-xr-x    4 root     root             0 Jan  1  1970 ..
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 1-0:1.0 -> ../../../devices/platform/soc/soc:internal-regs/f1050000.usb/usb1/1-0:1.0
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 1-1 -> ../../../devices/platform/soc/soc:internal-regs/f1050000.usb/usb1/1-1
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 1-1:1.0 -> ../../../devices/platform/soc/soc:internal-regs/f1050000.usb/usb1/1-1/1-1:1.0
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 2-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb2/2-0:1.0
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 3-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-0:1.0
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 3-2 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-2
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 3-2:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-2/3-2:1.0
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 usb1 -> ../../../devices/platform/soc/soc:internal-regs/f1050000.usb/usb1
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 usb2 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb2
     0 lrwxrwxrwx    1 root     root             0 Jan  1  1970 usb3 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb3

- OK, so firstboot, with a usb stick on usb2 port, usb3 HD on usb3 port it comes up as above and usb2 led lit dimly, no usb3 led. and this:

config led 'led_wan'
        option name 'WAN'
        option sysfs 'mamba:white:wan'
        option trigger 'netdev'
        option mode 'link tx rx'
        option dev 'eth1'

config led 'led_usb1'
        option name 'USB 1'
        option sysfs 'mamba:white:usb2'
        option trigger 'usbport'
        list port 'usb1-port1'

config led 'led_usb2'
        option name 'USB 2'
        option sysfs 'mamba:white:usb3_1'
        option trigger 'usbport'
        list port 'usb2-port1'
        list port 'usb3-port1'

config led 'led_usb2_ss'
        option name 'USB 2 SS'
        option sysfs 'mamba:white:usb3_2'
        option trigger 'usbport'
        list port 'usb3-port1'

Right, terminology usb2 port == usb1 label, usb3 port == usb2 label
So my reference to usb2 led is the one labeled USB 1

Project Manager
Mathias Kresin commented on 25.01.2017 17:54

Mhh, that is unexpected. Would you please clarify which LED you mean with USB3? Is it the USB2-bar LED or the USB2-dot LED?

According to your first paste, you have the following usb port trigger:

/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb1-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb2-port1
/sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-0068/leds/pca963x:caiman:white:usb3_1/ports/usb3-port1

And according to the dts file you should have the following LEDs:

/sys/class/leds/pca963x:caiman:white:usb2
/sys/class/leds/pca963x:caiman:white:usb3_1
/sys/class/leds/pca963x:caiman:white:usb3_2

Would you please attach your /etc/config/system! It should look similar to the one in https://bugs.lede-project.org/index.php?do=details&task_id=423#comment1407.

What I've added is the usb2_ss usb led trigger.

anomeome commented on 25.01.2017 18:19

Ya, things went South on me trying to change led configs through gui front-end instead of just editing /etc/config/system. If there is anything else you think you need from the mamba let me know, otherwise I can switch it out with a rango to test that device.

Project Manager
Mathias Kresin commented on 25.01.2017 18:26
Ya, things went South on me trying to change led configs through gui front-end instead of just editing /etc/config/system.

https://github.com/openwrt/luci/issues/971

otherwise I can switch it out with a rango to test that device

Oh yes, please test it on a rango as well! But better switch to the forum

mike commented on 25.01.2017 21:52

Would you please test again and confirm that it is working this way on your wrt1200!

Flashed the new image and re-tested usb2 and usb3 drives on both ports and leds are still working correctly. The new USB 2 SS led also works as expected, a dot lights up under the usb2 led when a usb3 drive is connected, that's a nice feature i didn't even know about, thanks again!

Admin
Jo-Philipp Wich commented on 25.01.2017 23:12

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing