[PATCH v2 1/7] usb: onboard-hub: Add reset-gpio support
Abbarapu, Venkatesh
venkatesh.abbarapu at amd.com
Mon Sep 30 07:07:15 CEST 2024
Hi Marek,
> -----Original Message-----
> From: Marek Vasut <marex at denx.de>
> Sent: Saturday, September 28, 2024 2:05 AM
> To: Abbarapu, Venkatesh <venkatesh.abbarapu at amd.com>; u-boot at lists.denx.de
> Cc: Simek, Michal <michal.simek at amd.com>; fabrice.gasnier at foss.st.com; git
> (AMD-Xilinx) <git at amd.com>
> Subject: Re: [PATCH v2 1/7] usb: onboard-hub: Add reset-gpio support
>
> On 9/27/24 9:01 AM, Venkatesh Yadav Abbarapu wrote:
>
> [...]
>
> > @@ -30,7 +40,24 @@ static int usb_onboard_hub_probe(struct udevice *dev)
> > if (ret)
> > dev_err(dev, "can't enable vdd-supply: %d\n", ret);
> >
> > - return ret;
> > + hub->reset_gpio = devm_gpiod_get_optional(dev, "reset",
> > + GPIOD_IS_OUT |
> GPIOD_ACTIVE_LOW);
> > + /* property is optional, don't return error! */
> > + if (hub->reset_gpio) {
> > + ret = dm_gpio_set_value(hub->reset_gpio, 1);
> > + if (ret)
> > + return ret;
> > +
> > + udelay(data->reset_us);
>
> Where is this assigned ?
This is assigned in this patch https://lore.kernel.org/u-boot/20240927070137.21816-4-venkatesh.abbarapu@amd.com/
+static const struct onboard_hub_data usb5744_data = {
+ .reset_us = 10000,
+ .power_on_delay_us = 10000,
+};
>
> > +
> > + ret = dm_gpio_set_value(hub->reset_gpio, 0);
> > + if (ret)
> > + return ret;
> > +
> > + udelay(data->power_on_delay_us);
> > + }
>
> Is the reset asserted time and post-reset time identical for all USB HUBs ? I don't
> think it is.
Yes...it won't be the same for all the USB HUBs, as it needs to be updated in the onboard_hub_data structure as
+static const struct onboard_hub_data usb5744_data = {
+ .reset_us = 10000,
+ .power_on_delay_us = 10000,
+};
Thanks
Venkatesh
>
> > + return 0;
> > }
> [...]
More information about the U-Boot
mailing list