Skip to content

Commit e4d5f1f

Browse files
nxpfranklijannau
authored andcommitted
usb: dwc3: dwc3-generic-plat: Add layerscape dwc3 support
Add layerscape dwc3 support by using flatten dwc3 core library. Layerscape dwc3 need set gsbuscfg0-reqinfo as 0x2222 when dma-coherence set. Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20250929-ls_dma_coherence-v5-3-2ebee578eb7e@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8a985bc commit e4d5f1f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

drivers/usb/dwc3/dwc3-generic-plat.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ static void dwc3_generic_reset_control_assert(void *data)
2929

3030
static int dwc3_generic_probe(struct platform_device *pdev)
3131
{
32+
const struct dwc3_properties *properties;
3233
struct dwc3_probe_data probe_data = {};
3334
struct device *dev = &pdev->dev;
3435
struct dwc3_generic *dwc3g;
@@ -75,7 +76,13 @@ static int dwc3_generic_probe(struct platform_device *pdev)
7576
probe_data.dwc = &dwc3g->dwc;
7677
probe_data.res = res;
7778
probe_data.ignore_clocks_and_resets = true;
78-
probe_data.properties = DWC3_DEFAULT_PROPERTIES;
79+
80+
properties = of_device_get_match_data(dev);
81+
if (properties)
82+
probe_data.properties = *properties;
83+
else
84+
probe_data.properties = DWC3_DEFAULT_PROPERTIES;
85+
7986
ret = dwc3_core_probe(&probe_data);
8087
if (ret)
8188
return dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
@@ -143,8 +150,13 @@ static const struct dev_pm_ops dwc3_generic_dev_pm_ops = {
143150
dwc3_generic_runtime_idle)
144151
};
145152

153+
static const struct dwc3_properties fsl_ls1028_dwc3 = {
154+
.gsbuscfg0_reqinfo = 0x2222,
155+
};
156+
146157
static const struct of_device_id dwc3_generic_of_match[] = {
147158
{ .compatible = "spacemit,k1-dwc3", },
159+
{ .compatible = "fsl,ls1028a-dwc3", &fsl_ls1028_dwc3},
148160
{ /* sentinel */ }
149161
};
150162
MODULE_DEVICE_TABLE(of, dwc3_generic_of_match);

0 commit comments

Comments
 (0)