[PATCH 04/13] usb: ehci-mx6: Turn on the power domain of USB PHY
Marek Vasut
marex at denx.de
Wed Sep 16 15:38:27 CEST 2020
On 9/16/20 2:56 PM, peng.fan at nxp.com wrote:
[...]
> @@ -569,6 +571,20 @@ static int ehci_usb_phy_mode(struct udevice *dev)
> if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
> return -EINVAL;
>
> + /* Need to power on the PHY before access it */
> +#if CONFIG_IS_ENABLED(POWER_DOMAIN)
> + struct udevice phy_dev;
> + struct power_domain pd;
> + int ret;
> +
> + phy_dev.node = offset_to_ofnode(phy_off);
> + if (!power_domain_get(&phy_dev, &pd)) {
> + ret = power_domain_on(&pd);
> + if (ret)
> + return ret;
> + }
> +#endif
Should we also turn it OFF somewhere ?
More information about the U-Boot
mailing list