From: Yao Zi <me@ziyao.cc>
To: alice.guo@oss.nxp.com, "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
u-boot@lists.denx.de
Cc: Stefano Babic <sbabic@nabladev.com>,
Fabio Estevam <festevam@gmail.com>, Tom Rini <trini@konsulko.com>,
Marek Vasut <marex@denx.de>,
Marek Vasut <marek.vasut@mailbox.org>, Ye Li <ye.li@nxp.com>,
Tim Harvey <tharvey@gateworks.com>, Peng Fan <peng.fan@nxp.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Lukasz Majewski <lukma@denx.de>, Sherry Sun <sherry.sun@nxp.com>,
Kever Yang <kever.yang@rock-chips.com>,
Jonas Karlman <jonas@kwiboo.se>,
Quentin Schulz <quentin.schulz@cherry.de>,
George Chan <gchan9527@gmail.com>, Simon Glass <sjg@chromium.org>,
David Zang <davidzangcs@gmail.com>, Alice Guo <alice.guo@nxp.com>
Subject: Re: [PATCH v1 4/7] usb: ci_udc: Convert driver to DM_USB_GADGET
Date: Tue, 16 Dec 2025 10:00:31 +0000 [thread overview]
Message-ID: <aUEtvy4ggZE-z8-j@pie> (raw)
In-Reply-To: <20251216-imx8ulp-v1-4-504115a53020@nxp.com>
On Tue, Dec 16, 2025 at 02:38:36PM +0800, alice.guo@oss.nxp.com wrote:
> From: Sherry Sun <sherry.sun@nxp.com>
>
> Convert the ci_udc driver to driver model by using the uclass
> UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
> PHY both are initialized by parsing the device tree nodes.
>
> If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
> if it does not defined, we can use ci_udc driver in its original Non-DM
> way.
>
> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
> Reviewed-by: Ye Li <ye.li@nxp.com>
> ---
> drivers/usb/gadget/ci_udc.c | 352 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 348 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index 4bff75da759..154a3ab7f22 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
...
> +static int ci_udc_otg_probe(struct udevice *dev)
> +{
> + struct ci_udc_priv_data *priv = dev_get_priv(dev);
> + struct usb_ehci *ehci;
> + int ret;
> +
> + ehci = (struct usb_ehci *)devfdt_get_addr(&priv->otgdev);
> +
> + pinctrl_select_state(&priv->otgdev, "default");
I think device core would take care of pinctrl and set it to "default"
state before probing the driver if possible, is this call to
pinctrl_select_state really necessary? See device_probe() in
drivers/core/device.c.
Regards,
Yao Zi
next prev parent reply other threads:[~2025-12-16 10:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 6:38 [PATCH 0/7] Enable USB in device mode on i.MX8ULP EVK alice.guo
2025-12-16 6:38 ` [PATCH v1 1/7] usb: ehci-mx6: Move USB PHY register definitions to common header alice.guo
2025-12-16 6:38 ` [PATCH v1 2/7] usb: ehci-mx6: Fix usb_oc_config() for i.MX7/8M/9/7ULP/8 and 8ULP platforms alice.guo
2025-12-16 11:15 ` Marek Vasut
2025-12-25 10:41 ` 回复: " Alice Guo (OSS)
2025-12-25 20:56 ` Marek Vasut
2025-12-16 6:38 ` [PATCH v1 3/7] usb: ehci-mx6: Extract PHY initialization into reusable function alice.guo
2025-12-16 9:52 ` [PATCH v1 3/7] usb: ehci-mx6: Extract PHY initialization into reusable functionr Yao Zi
2025-12-16 11:17 ` [PATCH v1 3/7] usb: ehci-mx6: Extract PHY initialization into reusable function Marek Vasut
2025-12-25 10:49 ` 回复: " Alice Guo (OSS)
2025-12-16 6:38 ` [PATCH v1 4/7] usb: ci_udc: Convert driver to DM_USB_GADGET alice.guo
2025-12-16 10:00 ` Yao Zi [this message]
2025-12-16 11:19 ` Marek Vasut
2025-12-16 14:07 ` Tom Rini
2025-12-16 6:38 ` [PATCH v1 5/7] usb: Kconfig: imply DM_USB_GADGET alice.guo
2025-12-16 9:49 ` Quentin Schulz
2025-12-16 10:07 ` Yao Zi
2025-12-25 10:16 ` 回复: " Alice Guo (OSS)
2025-12-25 15:06 ` Tom Rini
2025-12-16 6:38 ` [PATCH v1 6/7] usb: gadget: ci_udc: Add i.MX8ULP support alice.guo
2025-12-16 6:38 ` [PATCH v1 7/7] imx8ulp_evk: Enable USB controller at 0x29920000 in device mode alice.guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aUEtvy4ggZE-z8-j@pie \
--to=me@ziyao.cc \
--cc=alice.guo@nxp.com \
--cc=alice.guo@oss.nxp.com \
--cc=davidzangcs@gmail.com \
--cc=festevam@gmail.com \
--cc=gchan9527@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=marek.vasut@mailbox.org \
--cc=marex@denx.de \
--cc=mkorpershoek@kernel.org \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=sbabic@nabladev.com \
--cc=sherry.sun@nxp.com \
--cc=sjg@chromium.org \
--cc=tharvey@gateworks.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.