[PATCH u-boot-marvell 04/11] usb: host: make PHY handling more generic

Marek Vasut marex at denx.de
Mon Apr 20 03:41:49 CEST 2020


On 4/19/20 5:48 PM, Marek Behún wrote:
[...]
> +static int usb_phy_setup(struct udevice *dev, int index)
> +{
> +	struct phy phy;
> +	int ret;
> +
> +	ret = generic_phy_get_by_index(dev, index, &phy);
> +	if (ret && ret != -ENOENT) {
> +		dev_err(dev, "failed to get usb phy %i\n", index);
> +		return ret;
> +	}
> +
> +	ret = generic_phy_init(&phy);
> +	if (ret) {
> +		dev_err(dev, "failed to init usb phy %i\n", index);
> +		return ret;
> +	}
> +
> +	ret = generic_phy_set_mode(&phy, PHY_MODE_USB_HOST_SS, 0);

How can this ever work with EHCI , which is HS/FS/LS , but not SS ?

[...]

> diff --git a/drivers/usb/host/phy.h b/drivers/usb/host/phy.h
> new file mode 100644
> index 0000000000..ba3139a714
> --- /dev/null
> +++ b/drivers/usb/host/phy.h
> @@ -0,0 +1,31 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * USB phy functions
> + *
> + * Moved from ehci-hcd.c by Marek Behun <marek.behun at nic.cz>
> + *
> + * Copyright (C) Marek Vasut <marex at denx.de>

I presume the copyright needs updating ?

[...]


More information about the U-Boot mailing list