Skip to content

Commit

Permalink
usb: dwc3-generic: Add rk3568 support
Browse files Browse the repository at this point in the history
RK3568 share glue and ctrl in a single node. Use glue_get_ctrl_dev to
return the glue node as the ctrl node.

Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
  • Loading branch information
Kwiboo authored and keveryang committed Jul 31, 2023
1 parent 6913c30 commit caaeac8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/usb/dwc3/dwc3-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,19 @@ struct dwc3_glue_ops ti_ops = {
.glue_configure = dwc3_ti_glue_configure,
};

static int dwc3_rk_glue_get_ctrl_dev(struct udevice *dev, ofnode *node)
{
*node = dev_ofnode(dev);
if (!ofnode_valid(*node))
return -EINVAL;

return 0;
}

struct dwc3_glue_ops rk_ops = {
.glue_get_ctrl_dev = dwc3_rk_glue_get_ctrl_dev,
};

static int dwc3_glue_bind_common(struct udevice *parent, ofnode node)
{
const char *name = ofnode_get_name(node);
Expand Down Expand Up @@ -596,6 +609,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
{ .compatible = "ti,am654-dwc3" },
{ .compatible = "rockchip,rk3328-dwc3" },
{ .compatible = "rockchip,rk3399-dwc3" },
{ .compatible = "rockchip,rk3568-dwc3", .data = (ulong)&rk_ops },
{ .compatible = "qcom,dwc3" },
{ .compatible = "fsl,imx8mp-dwc3", .data = (ulong)&imx8mp_ops },
{ .compatible = "fsl,imx8mq-dwc3" },
Expand Down

0 comments on commit caaeac8

Please sign in to comment.