>
> Fixes: 03e6275ae381087bd8 ("usb: chipidea: Fix ULPI on imx51")
> Suggested-by: Lucas Stach <[email protected]>
> Signed-off-by: Fabio Estevam <[email protected]>
> ---
> Changes since v1:
> - Only propagate the error when CONFIG_USB_CHIPIDEA_ULPI is unselected
>
> drivers/usb/chipidea/core.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index
> 85fc6db..e7018a1 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -608,6 +608,17 @@ static int ci_get_platdata(struct device *dev,
> if (!platdata->phy_mode)
> platdata->phy_mode = of_usb_get_phy_mode(dev->of_node);
>
> + if (platdata->phy_mode == USBPHY_INTERFACE_MODE_ULPI) {
> + /*
> + * CONFIG_USB_CHIPIDEA_ULPI needs to be selected
> + * for proper usage of the ULPI mode
> + */
> + if (!IS_ENABLED(CONFIG_USB_CHIPIDEA_ULPI)) {
> + WARN_ONCE(1, "Select CONFIG_USB_CHIPIDEA_ULPI in
> order to use ULPI mode\n");
> + return -EINVAL;
> + }
> + }
> +
> if (!platdata->dr_mode)
> platdata->dr_mode = usb_get_dr_mode(dev);
>
Fabio, I wonder it may cause the USB not work at imx27 which
do not use this configuration now. Any possibilities to test and verify it?
b29397@b29397-desktop:~/work/projects/usb$ find arch/arm/boot/dts/ -name imx* |
xargs grep -rn "ulpi"
arch/arm/boot/dts/imx53-ppd.dts:630: phy_type = "ulpi";
arch/arm/boot/dts/imx53-ppd.dts:640: phy_type = "ulpi";
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts:280: phy_type =
"ulpi";
arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts:57: phy_type = "ulpi";
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi:320: phy_type = "ulpi";
arch/arm/boot/dts/imx27-pdk.dts:113: phy_type = "ulpi";
arch/arm/boot/dts/imx51-zii-rdu1.dts:592: phy_type = "ulpi";
arch/arm/boot/dts/imx51-zii-rdu1.dts:604: phy_type = "ulpi";
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts:303: phy_type = "ulpi";
arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi:81: phy_type = "ulpi";
arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi:90: phy_type = "ulpi";
arch/arm/boot/dts/imx51-babbage.dts:433: phy_type = "ulpi";
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html