Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#425 - mvebu led config (wrt1200 v1) #5488

Closed
openwrt-bot opened this issue Jan 23, 2017 · 11 comments
Closed

FS#425 - mvebu led config (wrt1200 v1) #5488

openwrt-bot opened this issue Jan 23, 2017 · 11 comments
Labels

Comments

@openwrt-bot
Copy link

mike:

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.

@openwrt-bot
Copy link
Author

mkresin:

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*

@openwrt-bot
Copy link
Author

mike:

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

@openwrt-bot
Copy link
Author

mkresin:

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.

@openwrt-bot
Copy link
Author

mike:

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.

@openwrt-bot
Copy link
Author

mkresin:

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!

@openwrt-bot
Copy link
Author

anomeome:

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

@openwrt-bot
Copy link
Author

mkresin:

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.

@openwrt-bot
Copy link
Author

anomeome:

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.

@openwrt-bot
Copy link
Author

mkresin:

Ya, things went South on me trying to change led configs through gui front-end instead of just editing /etc/config/system.

openwrt/luci#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 [[https://forum.lede-project.org/t/community-snapshots-for-wrt1200ac-wrt1900acv1-wrt1900acv2-wrt1900acs-wrt3200acm/545/324?u=mkresin|forum]]

@openwrt-bot
Copy link
Author

mike:

//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!

@openwrt-bot
Copy link
Author

jow-:

LuCI support for "usbport" triggers added in openwrt/luci@1640d14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant