cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
9,808 Views
Registered: ‎06-13-2014

Petalinux 2015.4 USB does not work

I followe the wiki page and the forum postings to fix the usb for petalinux 2015.2 2015.2.1 but there have been changes since then, especially with the full adoption of the Linux 4.0 kernel.

 

The device tree has been modified since petalinux 2015.2, but its still not right, especially since one of the configuration field names has apparently changed. Here is what is presently in my device tree. Note that viewport has become view-port.

 

/dts-v1/;

/include/ "system-conf.dtsi"

/ {

      usb_phy0:usb_phy@0 { 

      compatible = "ulpi-phy";

      #phy-cells = <0>;

      reg = <0xe0002000 0x1000>;

      view-port = <0x170>;

      drv-vbus;

    };

};

 

&usb0 {

     usb-phy = <&usb_phy0>;

};

 

I believe, you still need to configure all of the recommended kernel modules into the build. And perform the command line module installs and configfs commands. But without the view-port device tree entry change, the ulpi driver never initializes properly.

 

 

 

0 Kudos
Reply
12 Replies
Explorer
Explorer
7,216 Views
Registered: ‎07-17-2014

That snippet was very helpful...

 

Thanks!

 

 -Ben

0 Kudos
Reply
Visitor
Visitor
6,829 Views
Registered: ‎07-29-2016

Hi @madison_a, I use Petalinux 2015.4 the USB not work too.

The device tree has been modified the same as you write, but the USB not work yet. I think the kernel config may be error, could you show the right config file for me? Thanks.

0 Kudos
Reply
Explorer
Explorer
6,815 Views
Registered: ‎11-22-2015

 

It may not be much help but I know it works in device mode in 2015.4.

 

jeff

0 Kudos
Reply
Observer
Observer
6,735 Views
Registered: ‎06-13-2014

This is what's in my notes. Not sure you need everything turned on. Depends upon how you want to use the USB port. I just want to plug in a keyboard and/or an Ethernet-fob. The use of * or m is the character Kconfig uses to indicate the module status. The lines I am putting in are not necessarily together or even the only items in that menu.

 

Device Drivers

   USB Support

     * support for Host-side USB

     * EHCI HCD (USB 2.0) Support

     * USB Mass Storage Support

 

     * Chip Idea Highspeed Dual Role Controller

     * Chip Idea host controller

 

USB Gadget Support

     m USB Gadget Drivers

     m USB Functions configurable through configfs

     * Mass Storage RNDIS

 

(have side comment in my notes: "Essential")

Device Drivers

    USB Support

        * NOP USB Transceiver Driver

        * Generic ULPI Transceiver Driver

 

My google searches for USB issues started having me go down this path of writing a script to modify the USB setup through configfs, which was not the problem. The device-tree entry gave the device driver a bad address to the USB register set. So, some of the above may be unnecessary, especially the configfs stuff. I'm terrible about making my notes exactly match what's on screen, so I apologize if you need to search through the menus to find the correct configuration item. Hope this helps.

 

 

   

 

0 Kudos
Reply
Explorer
Explorer
6,722 Views
Registered: ‎11-22-2015

you don't need configfs for something like a keyboard which only need host support
0 Kudos
Reply
Visitor
Visitor
6,693 Views
Registered: ‎07-29-2016

Thank you help! But the USB still not work. The error message is:

ci_hdrc ci_hdrc.0: unable to init phy: -110
ci_hdrc: probe of ci_hdrc.0 failed with error -110

 

By read the code ,I know the error is read the USB phy id timeout by ULPI。But I don't why! 

Looking forward to your help,Thanks!

PS:
The hardware board is a development board, so i think the hardware is ok.
 

My configfs like this: 


Device Drivers
USB support
  <*> Support for Host-side USB
  <*> OTG support
  <*> EHCI HCD (USB 2.0) support
  <*> USB Mass Storage support
  <*> ChipIdea Highspeed Dual Role Controller
  <*> ChipIdea host controller
  <*> ChipIdea device controller
    USB Physical Layer drivers --->
      <*> NOP USB Transceiver Driver
      <*> Generic ULPI Transceiver Driver

 

0 Kudos
Reply
Explorer
Explorer
6,685 Views
Registered: ‎11-22-2015

If you only want host you should only enable host functions so it's easier to debug your problem.
0 Kudos
Reply
Visitor
Visitor
6,664 Views
Registered: ‎07-29-2016

I test the configfs the same as your's, but still have the same error.

ci_hdrc ci_hdrc.0: unable to init phy: -110
ci_hdrc: probe of ci_hdrc.0 failed with error -110

 

The  Vivado generated  *.hdf file would that affect the USB phy?

0 Kudos
Reply
Visitor
Visitor
6,569 Views
Registered: ‎07-29-2016

The problem is resolved, thanks.

The root of the problem is the Vivado generated  *.hdf file is config error.

The kernel config and the dts file is correct.

0 Kudos
Reply
Explorer
Explorer
3,207 Views
Registered: ‎04-23-2013

What was the problem with the hdf?

Thanks,

Emmett

0 Kudos
Reply
Explorer
Explorer
3,187 Views
Registered: ‎07-17-2014

I'd have to look again for the specifics, but the The HDF file drops some needed items about USB in wrong sections of the device-tree-blob files so when using the petalinux tools (--get-hw-description), the info about USB is in the wrong place and has to be moved.

THEN, if you run petalinux-config, it will remove some info from the device tree information.

I moved the needed USB into one of the device-tree files that petalinux-config doesn't touch...

 

 -Ben

Explorer
Explorer
3,179 Views
Registered: ‎04-23-2013

Thanks!
We're have the same or similar experience in 2016.3.

0 Kudos
Reply