unable to initialize libusb: -99
Hello.
I am trying an image based on morty (2.2) fsl communty BSP on sabre-ai board, and see the lsusb -99 error.
Any suggestion/comment on which part of the configuration I should be look into!
(I already googl'ed and found some old questions/answers on libusb -99 errors, but I could not figure out if they are just the same as my case or not.)
My issue is that SB is not working (lsusb gives me error), as below.
I checked and make sure CONFIG_USB_EHCI_HCD/CONFIG_USB_XHCI_HCD are there.
Quoted 6 lines
root@imx6qsabreauto:~# export LIBUSB_DEBUG=9 root@imx6qsabreauto:~# lsusb -v libusb: debug [libusb_init] created default context libusb: debug [libusb_init] libusb v1.0.20.11004 libusb: error [op_init] could not find usbfs unable to initialize libusb: -99
I am also seeing errors like below in journalctl log, but I am not sure what they mean.
Quoted 6 lines
Jun 28 12:02:02 imx6qsabreauto kernel[313]: hdm_usb: hdm_usb_init() Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver hdm_usb Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver k2l-mocca Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517 Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184200.usb: Can't register ci_hdrc platform device, err=-517...
Hello.
I am still looking into this, since without USB working the board is les use.
And, I noticed there is an post regarding imx6qdl-sabreauto.dtsi issue regarding pca953x control.
https://community.nxp.com/thread/435299
In fact before in the boot log, I see the followings before "Can't register ci_hdrc platform device, err=-517" errors.
I an hardly imagine none of the sabreauto board users (on linux-fslc) can use USB. And also I could use USB on NXP release BSP, so board hardware is not broken.
If there is a fix patch or workaround known, or if it is my configuration problem, I would like to learn.
Quoted 14 lines
pca953x 2-0030: failed reading register
pca953x: probe of 2-0030 failed with error -11
pca953x 2-0032: failed reading register
pca953x: probe of 2-0032 failed with error -11
pca953x 2-0034: failed reading register
pca953x: probe of 2-0034 failed with error -11CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]
Unknown username "adit" in message bus configuration file
mag3110 2-000e: read chip ID
0xfffffff5is not equal to0xc4!
mag3110: probe of 2-000e failed with error -22
Quoted 7 lines
mma8451 2-001c: read chip ID
0x1is not equal to0x1aor0x2a!
mma8451: probe of 2-001c failed with error -22
imx_usb2184000.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184200.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184000.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184200.usb: Can't registerci_hdrcplatform device, err=-517
Any sugestion is highly appreciated.
________________________________
From: Takashi Matsuzawa
Sent: Thursday, June 29, 2017 3:09 PM
To: [email protected]
Subject: unable to initialize libusb: -99
Hello.
I am trying an image based on morty (2.2) fsl communty BSP on sabre-ai board, and see the lsusb -99 error.
Any suggestion/comment on which part of the configuration I should be look into!
(I already googl'ed and found some old questions/answers on libusb -99 errors, but I could not figure out if they are just the same as my case or not.)
My issue is that SB is not working (lsusb gives me error), as below.
I checked and make sure CONFIG_USB_EHCI_HCD/CONFIG_USB_XHCI_HCD are there.
Quoted 6 lines
root@imx6qsabreauto:~# export LIBUSB_DEBUG=9 root@imx6qsabreauto:~# lsusb -v libusb: debug [libusb_init] created default context libusb: debug [libusb_init] libusb v1.0.20.11004 libusb: error [op_init] could not find usbfs unable to initialize libusb: -99
I am also seeing errors like below in journalctl log, but I am not sure what they mean.
Quoted 6 lines
Jun 28 12:02:02 imx6qsabreauto kernel[313]: hdm_usb: hdm_usb_init() Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver hdm_usb Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver k2l-mocca Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517 Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184200.usb: Can't register ci_hdrc platform device, err=-517...
Hello.
Today I tried testing with the unmodified images.
(just followed the build instruction on README from https://github.com/Freescale/fsl-community-bsp-platform), and the result was the below.
lsusb on imx61sabreauto board:
2.0 (jethro) - OK
2.1 (krogoth) - NG
2.2 (morty) - NG
2.3 (pyro) - NG
I am curious since it is OK (lsusb correctly list the USB devices) with jethro, but NG on krogoth and after. I may look into the delta but still not sure where to look into.
Any comment/suggestion is welcomed.
________________________________
From: Takashi Matsuzawa
Sent: Friday, June 30, 2017 9:03 PM
To: [email protected]
Subject: Re: unable to initialize libusb: -99
Hello.
I am still looking into this, since without USB working the board is les use.
And, I noticed there is an post regarding imx6qdl-sabreauto.dtsi issue regarding pca953x control.
https://community.nxp.com/thread/435299
In fact before in the boot log, I see the followings before "Can't register ci_hdrc platform device, err=-517" errors.
I an hardly imagine none of the sabreauto board users (on linux-fslc) can use USB. And also I could use USB on NXP release BSP, so board hardware is not broken.
If there is a fix patch or workaround known, or if it is my configuration problem, I would like to learn.
Quoted 14 lines
pca953x 2-0030: failed reading register
pca953x: probe of 2-0030 failed with error -11
pca953x 2-0032: failed reading register
pca953x: probe of 2-0032 failed with error -11
pca953x 2-0034: failed reading register
pca953x: probe of 2-0034 failed with error -11CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]
Unknown username "adit" in message bus configuration file
mag3110 2-000e: read chip ID
0xfffffff5is not equal to0xc4!
mag3110: probe of 2-000e failed with error -22
Quoted 7 lines
mma8451 2-001c: read chip ID
0x1is not equal to0x1aor0x2a!
mma8451: probe of 2-001c failed with error -22
imx_usb2184000.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184200.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184000.usb: Can't registerci_hdrcplatform device, err=-517imx_usb2184200.usb: Can't registerci_hdrcplatform device, err=-517
Any sugestion is highly appreciated.
________________________________
From: Takashi Matsuzawa
Sent: Thursday, June 29, 2017 3:09 PM
To: [email protected]
Subject: unable to initialize libusb: -99
Hello.
I am trying an image based on morty (2.2) fsl communty BSP on sabre-ai board, and see the lsusb -99 error.
Any suggestion/comment on which part of the configuration I should be look into!
(I already googl'ed and found some old questions/answers on libusb -99 errors, but I could not figure out if they are just the same as my case or not.)
My issue is that SB is not working (lsusb gives me error), as below.
I checked and make sure CONFIG_USB_EHCI_HCD/CONFIG_USB_XHCI_HCD are there.
Quoted 6 lines
root@imx6qsabreauto:~# export LIBUSB_DEBUG=9 root@imx6qsabreauto:~# lsusb -v libusb: debug [libusb_init] created default context libusb: debug [libusb_init] libusb v1.0.20.11004 libusb: error [op_init] could not find usbfs unable to initialize libusb: -99
I am also seeing errors like below in journalctl log, but I am not sure what they mean.
Quoted 6 lines
Jun 28 12:02:02 imx6qsabreauto kernel[313]: hdm_usb: hdm_usb_init() Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver hdm_usb Jun 28 12:02:02 imx6qsabreauto kernel[313]: usbcore: registered new interface driver k2l-mocca Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517 Jun 28 12:02:02 imx6qsabreauto kernel[313]: imx_usb 2184200.usb: Can't register ci_hdrc platform device, err=-517...
Quoted 16 lines · Takashi Matsuzawa
Today I tried testing with the unmodified images.
(just followed the build instruction on README from
https://github.com/Freescale/fsl-community-bsp-platform), and the result was the below.lsusb on imx61sabreauto board:
2.0 (jethro) - OK
2.1 (krogoth) - NG
2.2 (morty) - NG
Quoted 7 lines
2.3 (pyro) - NG
I am curious since it is OK (lsusb correctly list the USB devices) with jethro, but NG on krogoth and after.
I may look into the delta but still not sure where to look into. Any comment/suggestion is welcomed.
I am adding Lauren on Cc. She may know something about it.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Hello.
I examined this today again, and found that following makes this error disappear.
PERFERRED_PROVIDER_uboot = "u-boot-imx"
PERFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PERFERRED_PROVIDER_uboot-mxsboot-native = "u-boot-imx"
Looks like recent u-boot-fslc does not handle imx6qsabreauto (which I was trying), and if I specified u-boot-imx, errors from pca953x, mag3110, mma845x are all gone, and I can lsusb to list USB devices.
________________________________
From: Otavio Salvador <[email protected]>
Sent: Tuesday, July 4, 2017 10:48 PM
To: Takashi Matsuzawa
Cc: [email protected]; Lauren Post
Subject: Re: [meta-freescale] unable to initialize libusb: -99
Quoted 17 lines · Takashi Matsuzawa
Today I tried testing with the unmodified images.
(just followed the build instruction on README from
https://github.com/Freescale/fsl-community-bsp-platform), and the result wasthe below.
lsusb on imx61sabreauto board:
2.0 (jethro) - OK
2.1 (krogoth) - NG
2.2 (morty) - NG
Quoted 7 lines
2.3 (pyro) - NG
I am curious since it is OK (lsusb correctly list the USB devices) with jethro, but NG on krogoth and after.
I may look into the delta but still not sure where to look into. Any comment/suggestion is welcomed.
I am adding Lauren on Cc. She may know something about it.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.brO.S. Systems<http://www.ossystems.com.br/>
www.ossystems.com.brO.S. Systems is specialized in the development, customization and consultancy of embedded operating systems and BSPs based on Linux.
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 6 lines · Takashi Matsuzawa
I examined this today again, and found that following makes this error disappear.
PERFERRED_PROVIDER_uboot= "u-boot-imx"
Quoted 8 lines
PERFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PERFERRED_PROVIDER_uboot-mxsboot-native = "u-boot-imx"
Looks like recent u-boot-fslc does not handle imx6qsabreauto (which I was trying), and if I specified u-boot-imx, errors from pca953x, mag3110, mma845x are all gone, and I can lsusb to list USB devices.
Awesome! Fabio, could you take a look on U-Boot to figure what is missing?
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Hi Takashi,
Quoted 16 lines · Otavio Salvador
Quoted 12 lines · Takashi Matsuzawa
I examined this today again, and found that following makes this error disappear.
PERFERRED_PROVIDER_uboot= "u-boot-imx"PERFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PERFERRED_PROVIDER_uboot-mxsboot-native = "u-boot-imx"
Quoted 6 lines
Quoted 3 lines
Looks like recent u-boot-fslc does not handle imx6qsabreauto (which I was trying), and if I specified u-boot-imx, errors from pca953x, mag3110, mma845x are all gone, and I can lsusb to list USB devices.
Awesome! Fabio, could you take a look on U-Boot to figure what is missing?
Could you please test the following patch against U-Boot 2017.05?
https://pastebin.com/K9P6n1Z7
Thanks
Hello.
Quoted 2 lines
Could you please test the following patch against U-Boot 2017.05?
https://pastebin.com/K9P6n1Z7
I just tried it with u-boot-fslc v2016.11, which is the default for morty.
I have attached (xxx.tar) the patch I applied and the boot log.
It now can report USB devices to lsusb command properly.
Looking into the patch, it is essentially not calling setup_iomux_eimnor() and also not defining CONFIG_SYS_FLASH_BASE, etc. within mx6qsabreauto.h?
In the boot log, I still see some errors from si476x-core, but I am not sure if they are normal or not. So far the system is booted and I can see sceen is normal.
Hi Takashi,
Quoted 5 lines · Takashi Matsuzawa
I just tried it with u-boot-fslc v2016.11, which is the default for morty.
I have attached (xxx.tar) the patch I applied and the boot log.
It now can report USB devices to lsusb command properly.
Great, thanks for testing.
Quoted 2 lines
Looking into the patch, it is essentially not calling
setup_iomux_eimnor()and also not definingCONFIG_SYS_FLASH_BASE, etc. withinmx6qsabreauto.h?
Yes, the idea is to avoid pin conflict between WEIM and I2C3.
I will submit this patch to the U-Boot list and will put you on Cc.
Quoted 3 lines
In the boot log, I still see some errors from si476x-core, but I am not sure if they are normal or not. So far the system is booted and I can see sceen is normal.
I think it is normal. Are you booting with the CPU board only or with CPU + base board?
I have tested the patch on a mx6dlsabreauto with only the CPU board and I compared the kernel boot logs with the NXP U-Boot and with mainline U-Boot.
The logs match when the patch is applied and USB is functional.
The errors we see in some peripherals like audio codec, audio tuner is because these devices are present in the base board only.
Regards,
Fabio Estevam
Hi Takashi,
Quoted 2 lines · Fabio Estevam
The errors we see in some peripherals like audio codec, audio tuner is because these devices are present in the base board only.
Just reviewed your logs and it seems you use the base board.
Can you please use the NXP U-Boot (PREFERRED_PROVIDER_uboot = "u-boot-imx" like you did before) and check whether the tuner is probed correctly?
Thanks
Hello.
Attached my logs for both. My configuration is below, and there no tuner/gps, etc. attached to the board.
MCIMX6x(Q)AICPU2 (CPU)
MCIMXABASEV1 (base)
Lools like both logs share warning messages as well.
________________________________
From: Fabio Estevam <[email protected]>
Sent: Monday, July 10, 2017 8:38 PM
To: Takashi Matsuzawa
Cc: Otavio Salvador; [email protected]
Subject: Re: [meta-freescale] unable to initialize libusb: -99
Hi Takashi,
Quoted 2 lines · Fabio Estevam
The errors we see in some peripherals like audio codec, audio tuner is because these devices are present in the base board only.
Just reviewed your logs and it seems you use the base board.
Can you please use the NXP U-Boot (PREFERRED_PROVIDER_uboot = "u-boot-imx" like you did before) and check whether the tuner is probed correctly?
Thanks
Hi Takashi,
Quoted 6 lines · Takashi Matsuzawa
Hello.
Attached my logs for both. My configuration is below, and there no tuner/gps, etc. attached to the board.
Quoted 6 lines
MCIMX6x(Q)AICPU2 (CPU)
MCIMXABASEV1 (base)
Lools like both logs share warning messages as well.
Thanks for confirming.
This means that the U-Boot issue is solved.
Will submit the patch to the U-Boot list later today.
Thanks