Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Frank Li and committed by
Greg Kroah-Hartman
1c97fc90 7298c06d

+13 -1
+13 -1
drivers/usb/dwc3/dwc3-generic-plat.c
··· 29 29 30 30 static int dwc3_generic_probe(struct platform_device *pdev) 31 31 { 32 + const struct dwc3_properties *properties; 32 33 struct dwc3_probe_data probe_data = {}; 33 34 struct device *dev = &pdev->dev; 34 35 struct dwc3_generic *dwc3g; ··· 76 75 probe_data.dwc = &dwc3g->dwc; 77 76 probe_data.res = res; 78 77 probe_data.ignore_clocks_and_resets = true; 79 - probe_data.properties = DWC3_DEFAULT_PROPERTIES; 78 + 79 + properties = of_device_get_match_data(dev); 80 + if (properties) 81 + probe_data.properties = *properties; 82 + else 83 + probe_data.properties = DWC3_DEFAULT_PROPERTIES; 84 + 80 85 ret = dwc3_core_probe(&probe_data); 81 86 if (ret) 82 87 return dev_err_probe(dev, ret, "failed to register DWC3 Core\n"); ··· 153 146 dwc3_generic_runtime_idle) 154 147 }; 155 148 149 + static const struct dwc3_properties fsl_ls1028_dwc3 = { 150 + .gsbuscfg0_reqinfo = 0x2222, 151 + }; 152 + 156 153 static const struct of_device_id dwc3_generic_of_match[] = { 157 154 { .compatible = "spacemit,k1-dwc3", }, 155 + { .compatible = "fsl,ls1028a-dwc3", &fsl_ls1028_dwc3}, 158 156 { /* sentinel */ } 159 157 }; 160 158 MODULE_DEVICE_TABLE(of, dwc3_generic_of_match);