[LEDE-DEV] [PATCH] apm821xx: fix USB LED trigger for WNDR4700

Christian Lamparter chunkeey at googlemail.com
Mon Oct 24 10:17:25 PDT 2016


I forgot to mention the builtin sdcard reader in the original post.

On Saturday, October 22, 2016 6:10:52 PM CEST Christian Lamparter wrote:
> Hello,
> 
> On Saturday, October 22, 2016 11:22:35 AM CEST Rafał Miłecki wrote:
> > From: Rafał Miłecki <rafal at milecki.pl>
> > 
> > The old usbdev trigger never supported assigning more than 1 USB port.
> > This code we got was never working as expected. Switch to usbport to
> > have LED working with both ports.
> > 
> > Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> 
> I was testing this on the wndr4700.
> 
> # cat /etc/config/system
> config led 'led_usb3'
>         option name 'USB3'
>         option sysfs 'wndr4700:blue:usb'
>         option trigger 'usbport'
>         list port 'usb2-port1'
>         list port 'usb3-port1'
Note: usb1-port1 is not used there. The usb1 "should always"
be controlled by the dwc2-usb host and not included in this
list. This is because the sd-card reader (the wndr4700 has
one that's user accessible on the right hand side) is wired
directly to it.

Regards,
Christian

[...]

> # lsusb -t
> /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
>     |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
>     |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M

(ignore the following built-in sd-card reader on the dwc2 controller)
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
>     |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
> 
> 
> cat /sys/kernel/debug/usb/devices
> 
> T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 2
> B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0003 Rev= 4.04
> S:  Manufacturer=Linux 4.4.26 xhci-hcd
> S:  Product=xHCI Host Controller
> S:  SerialNumber=0000:45:00.0
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
> 
> T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
> D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
> P:  Vendor=0bb4 ProdID=2910 Rev= 1.00
> S:  Manufacturer=Intenso
> S:  Product=Slim Line
> S:  SerialNumber=0710562A29A29647
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=504mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
> 
> T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
> B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0002 Rev= 4.04
> S:  Manufacturer=Linux 4.4.26 xhci-hcd
> S:  Product=xHCI Host Controller
> S:  SerialNumber=0000:45:00.0
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
> 
> T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=090c ProdID=1000 Rev=11.00
> S:  Manufacturer=SMI Corporation
> S:  Product=USB DISK
> S:  SerialNumber=AA04012900007610
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=31875us

(the dwc2 controller)
> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
> B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0002 Rev= 4.04
> S:  Manufacturer=Linux 4.4.26 dwc2_hsotg
> S:  Product=DWC OTG Controller
> S:  SerialNumber=4bff80000.usbotg
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

(This is the SD-Card reader - it's a GL827L SD/MMC/MS Flash Card Reader
and uses usb-storage class driver)
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=05e3 ProdID=0723 Rev=94.54
> S:  Manufacturer=Generic
> S:  Product=USB Storage
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms




More information about the Lede-dev mailing list