USBH on imx7d (kernel v5.3)

cancel
Showing results for 
Search instead for 
Did you mean: 

USBH on imx7d (kernel v5.3)

513 Views
andre_draszik
Contributor I

I have an imx7d based board that is using the USBH port.

This port isn't working with the upstream kernel since
commit 7c8e8909417e ("usb: chipidea: imx: add HSIC support")
because the pinctrl is non-optional (as opposed to the NXP
kernel 4.19.35 where it appears to work fine for us).

Now, I'd like to restore support, but I am not sure the relevant pinmux
setting is documented in the IMX7D applications processor reference
manual IMX7DRM.pdf that I have.

As far as I understand, I need to provide pinctrl settings for 'idle' and 'active' states, sth like the following:

&usbh {
        ...
        pinctrl-names = "idle", "active";
        pinctrl-0 = <&pinctrl_usbh_idle>;
        pinctrl-1 = <&pinctrl_usbh_active>;
        ...
};

pinctrl_usbh_idle: usbhgrp-idle {
        fsl,pins = <
                MX7D_PAD_USB_H_DATA__USB_H_DATA         0x........
                MX7D_PAD_USB_H_STROBE__USB_H_STROBE     0x........
        >;
};

pinctrl_usbh_active: usbhgrp-active {
        fsl,pins = <
                MX7D_PAD_USB_H_DATA__USB_H_DATA         0x........
                MX7D_PAD_USB_H_STROBE__USB_H_STROBE     0x........
        >;
};


My questions hence are:
* is my understanding correct?
* where can I find the relevant documentation for defining
  MX7D_PAD_USB_H_DATA__USB_H_DATA & MX7D_PAD_USB_H_STROBE__USB_H_STROBE
* what should be the actual register setting
* given USB_H_DATA and USB_H_STROBE don't appear to be board specific
  ('No muxing' is mentioned in the data sheet), should any such configuration
  really go into imx7s.dtsi?

Alternatively, given that this works without the extra pinctrl dance in the
i.MX specific kernel, is it really needed on i.MX7, and can the upstream
kernel be changed to make this optional there as well?


Thank you,
Andre'

Labels (2)
Tags (1)
0 Kudos
2 Replies

345 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Andre,

You could refer to the i.MX Software and Developments Tool page to download the latest supported BSP releases, including their Release Notes document (more recent BSP for i.MX7D is 4.14.98_2.0.0):

i.MX Software | NXP 

In case of searching features or other kernel versions/patches, you could consider the Community BSP, including contacting with its mailing list. You could take a look to the following link for additional details:

FSL Community BSP 

Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------

0 Kudos

345 Views
andre_draszik
Contributor I

Thanks Carlos. As said, I am trying to make this work with the 5.3 kernel. In the 5.3 kernel, the pinctrl settings for 'idle' and 'active' are non-optional, as per commit 7c8e8909417e ("usb: chipidea: imx: add HSIC support") by peter.chen@nxp.com (part of linux v5.0), whereas in any of the NXP kernels (4.19.35, 4.14.98, 4.9.11) they are *optional*. The community BSP doesn't help because they're all still at older versions of the kernel. USBH works with the NXP kernels, but not with the upstream kernel due to that difference.

The datasheet for imx7d states that 'no muxing' is possible for data and strobe, hence there is no pinctrl support for those pins in any (5.x, 4.19.x, 4.14.x, 4.9.x) of the kernels.

I am trying to get an answer on what the right approach to fix this is. Should the pinctrls be made a non-requirement for imx7d, or should they be configured using some setting (which don't seem to be documented in the IMX7DRM)?

I am happy to fix this myself either way, but I don't know enough about the hardware itself.

0 Kudos