[v2,3/7] usb: dwc3-generic: Restrict single ctrl node for RK3328

Message ID 20230606170918.45581-4-jagan@amarulasolutions.com
State New
Headers show
Series
  • rockchip: Fix RK3328 USB support
Related show

Commit Message

Jagan Teki June 6, 2023, 5:09 p.m. UTC
Like Rockchip RK3568, the RK3328 also have single node to
represent the glue and ctrl for USB 3.0.

So, use the driver data to use single ctrl for RK3328 DWC3.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- collect Marek RB

 drivers/usb/dwc3/dwc3-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Robinson June 11, 2023, 2:53 p.m. UTC | #1
On Tue, Jun 6, 2023 at 6:10 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Like Rockchip RK3568, the RK3328 also have single node to
> represent the glue and ctrl for USB 3.0.
>
> So, use the driver data to use single ctrl for RK3328 DWC3.
>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - collect Marek RB
>
>  drivers/usb/dwc3/dwc3-generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 5f8c2613a4..dcf420bafd 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
>         { .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
>         { .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
>         { .compatible = "ti,am654-dwc3" },
> -       { .compatible = "rockchip,rk3328-dwc3" },
> +       { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },

This doesn't build for me against master due to rk_ops not being
defined, is this against another branch or builds upon another patch
set?

>         { .compatible = "rockchip,rk3399-dwc3" },
>         { .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
>         { .compatible = "qcom,dwc3" },
> --
> 2.25.1
>
Jagan Teki June 11, 2023, 4:25 p.m. UTC | #2
On Sun, Jun 11, 2023 at 8:23 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> On Tue, Jun 6, 2023 at 6:10 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Like Rockchip RK3568, the RK3328 also have single node to
> > represent the glue and ctrl for USB 3.0.
> >
> > So, use the driver data to use single ctrl for RK3328 DWC3.
> >
> > Reviewed-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v2:
> > - collect Marek RB
> >
> >  drivers/usb/dwc3/dwc3-generic.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> > index 5f8c2613a4..dcf420bafd 100644
> > --- a/drivers/usb/dwc3/dwc3-generic.c
> > +++ b/drivers/usb/dwc3/dwc3-generic.c
> > @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
> >         { .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
> >         { .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
> >         { .compatible = "ti,am654-dwc3" },
> > -       { .compatible = "rockchip,rk3328-dwc3" },
> > +       { .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
>
> This doesn't build for me against master due to rk_ops not being
> defined, is this against another branch or builds upon another patch
> set?

This, on top of
https://patchwork.ozlabs.org/project/uboot/patch/20230530102617.3413183-5-jonas@kwiboo.se/

Jagan.
Kever Yang July 26, 2023, 11 a.m. UTC | #3
On 2023/6/7 01:09, Jagan Teki wrote:
> Like Rockchip RK3568, the RK3328 also have single node to
> represent the glue and ctrl for USB 3.0.
>
> So, use the driver data to use single ctrl for RK3328 DWC3.
>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
> Changes for v2:
> - collect Marek RB
>
>   drivers/usb/dwc3/dwc3-generic.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 5f8c2613a4..dcf420bafd 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -621,7 +621,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
>   	{ .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
>   	{ .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
>   	{ .compatible = "ti,am654-dwc3" },
> -	{ .compatible = "rockchip,rk3328-dwc3" },
> +	{ .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
>   	{ .compatible = "rockchip,rk3399-dwc3" },
>   	{ .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
>   	{ .compatible = "qcom,dwc3" },

Patch

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 5f8c2613a4..dcf420bafd 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -621,7 +621,7 @@  static const struct udevice_id dwc3_glue_ids[] = {
 	{ .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
 	{ .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
 	{ .compatible = "ti,am654-dwc3" },
-	{ .compatible = "rockchip,rk3328-dwc3" },
+	{ .compatible = "rockchip,rk3328-dwc3", .data = (ulong)&rk_ops },
 	{ .compatible = "rockchip,rk3399-dwc3" },
 	{ .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
 	{ .compatible = "qcom,dwc3" },