* [PATCH v4 0/2] Add driver support for ESWIN EIC7700 SoC USB controller
@ 2025-10-16 9:46 caohang
2025-10-16 9:47 ` [PATCH] dt-bindings: usb: Add ESWIN EIC7700 " caohang
2025-10-16 9:48 ` [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver caohang
0 siblings, 2 replies; 5+ messages in thread
From: caohang @ 2025-10-16 9:46 UTC (permalink / raw)
To: gregkh, robh, krzk+dt, conor+dt, Thinh.Nguyen, p.zabel,
linux-kernel, linux-usb, devicetree
Cc: ningyu, linmin, pinkesh.vaghela, Hang Cao, kernel test robot
From: Hang Cao <caohang@eswincomputing.com>
Add support for ESWIN EIC7700 USB driver controller.
We have removed dwc3-eic7700.c and added changes to dwc3-generic-plat.c.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509160138.P7gRM9Bt-lkp@intel.com/
Changes in v4->v3:
- Updates:
- Removed config option patch dependency from cover letter, because the patch
was applied.
- Remove dwc3-eic7700.c instead of dwc3-generic-plat.c.
- Updates: eswin,eic7700-usb.yaml
- Add usb_en clock.
- Add usb_rst reset.
- Update eswin,hsp-sp-csr description.
- Remove the last two unused items of eswin,hsp-sp-csr.
- Updates: dwc3-generic-plat.c
- Add eswin,eic7700-dwc3 to the compatible table.
- Add the dwc3_generic_match_data structure.
- Add the eic7700_dwc3_bus_init function to initialize the bus.
- Add the init_ops callback in the probe function.
- Link to V3: https://lore.kernel.org/all/20250915085329.2058-1-caohang@eswincomputing.com/
Changes in v3->v2:
- Updates: eswin,eic7700-usb.yaml
- Sort the attributes according to the DTS coding style.
- Remove the #address-cells and #size-cells attributes.
- Fold the child node into the parent.
- Update commit message.
- Updates: dwc3-eic7700.c
- Use dwc3 core as a library.
- Add system and runtime pm.
- Use pm_ptr and remove the __maybe_unused tags.
- Add new author name
- Add prepare and complete function
- Update commit message.
- Link to V2: https://lore.kernel.org/lkml/20250730073953.1623-1-zhangsenchuan@eswincomputing.com/
Changes in v2->v1:
- Updates: eswin,eic7700-usb.yaml
- Drop the redundant descriptions.
- Supplement the constraints of resets.
- Replace "eswin,hsp_sp_csr" with "eswin,hsp-sp-csr"
and add items description.
- Drop numa-node-id, This is not necessary.
- Add patternProperties and match the rules defined
in the "snps,dwc3.yaml" file.
- Add "#address-cells" "#size-cells".
- Update the space indentation, remove the redundant labels,
and sort the attributes according to the DTS encoding style.
- Drop the "status = "disabled" attribute.
- Update the common usb node names and fold the child
nodes into the parent nodes.
- The warning detected by the robot has been resolved.
- Updates: dwc3-eic7700.c
- Remove dwc3_mode_show dwc3_mode_store dwc3_eswin_get_extcon_dev,
dwc3_eswin_device_notifier and dwc3_eswin_host_notifier, usb role
detection and switching are not supported.
- Remove the hub-rst attribute, remove the dwc3_hub_rst_show and
dwc3_hub_rst_store functions, this feature is not supported.
- Use syscon_regmap_lookup_by_phandle_args instead of the
syscon_regmap_lookup_by_phandle function.
- Use dev_err_probe in probe function.
- Drop mutex_lock, which is not required.
- Remove clk_prepare_enable and of_clk_get, and manage multiple
clocks using devm_clk_bulk_get_all_enabled.
- Remove the device_init_wakeup related functions, which were
used incorrectly.
- Remove MODULE_ALIAS, which is used incorrectly.
- The warning detected by the robot has been resolved.
- Link to V1: https://lore.kernel.org/lkml/20250516095237.1516-1-zhangsenchuan@eswincomputing.com/
Hang Cao (2):
dt-bindings: usb: Add ESWIN EIC7700 USB controller
usb: dwc3: eic7700: Add EIC7700 USB driver
.../bindings/usb/eswin,eic7700-usb.yaml | 99 +++++++++++++++++++
drivers/usb/dwc3/dwc3-generic-plat.c | 58 +++++++++++
2 files changed, 157 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] dt-bindings: usb: Add ESWIN EIC7700 USB controller 2025-10-16 9:46 [PATCH v4 0/2] Add driver support for ESWIN EIC7700 SoC USB controller caohang @ 2025-10-16 9:47 ` caohang 2025-10-16 15:47 ` Conor Dooley 2025-10-16 9:48 ` [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver caohang 1 sibling, 1 reply; 5+ messages in thread From: caohang @ 2025-10-16 9:47 UTC (permalink / raw) To: gregkh, robh, krzk+dt, conor+dt, Thinh.Nguyen, p.zabel, linux-kernel, linux-usb, devicetree Cc: ningyu, linmin, pinkesh.vaghela, Hang Cao, Senchuan Zhang From: Hang Cao <caohang@eswincomputing.com> Add Device Tree binding documentation for the ESWIN EIC7700 usb controller module. Signed-off-by: Senchuan Zhang <zhangsenchuan@eswincomputing.com> Signed-off-by: Hang Cao <caohang@eswincomputing.com> --- .../bindings/usb/eswin,eic7700-usb.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml diff --git a/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml b/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml new file mode 100644 index 000000000000..589a3ab6c644 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/eswin,eic7700-usb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ESWIN EIC7700 SoC Usb Controller + +maintainers: + - Wei Yang <yangwei1@eswincomputing.com> + - Senchuan Zhang <zhangsenchuan@eswincomputing.com> + - Hang Cao <caohang@eswincomputing.com> + +description: + The Usb controller on EIC7700 SoC. + +allOf: + - $ref: snps,dwc3-common.yaml# + +properties: + compatible: + const: eswin,eic7700-dwc3 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: peripheral + + clocks: + maxItems: 3 + + clock-names: + items: + - const: aclk + - const: cfg + - const: usb_en + + resets: + maxItems: 2 + + reset-names: + items: + - const: vaux + - const: usb_rst + + eswin,hsp-sp-csr: + description: + HSP CSR is to control and get status of different high-speed peripherals + (such as Ethernet, USB, SATA, etc.) via register, which can tune + board-level's parameters of PHY, etc. + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to HSP Register Controller hsp_sp_csr node. + - description: USB bus register offset. + - description: AXI low power register offset. + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + - resets + - reset-names + - eswin,hsp-sp-csr + +unevaluatedProperties: false + +examples: + - | + usb@50480000 { + compatible = "eswin,eic7700-dwc3"; + reg = <0x50480000 0x10000>; + clocks = <&clock 135>, + <&clock 136>, + <&hspcrg 18>; + clock-names = "aclk", "cfg", "usb_en"; + interrupt-parent = <&plic>; + interrupts = <85>; + interrupt-names = "peripheral"; + resets = <&reset 84>, <&hspcrg 2>; + reset-names = "vaux", "usb_rst"; + dr_mode = "peripheral"; + maximum-speed = "high-speed"; + phy_type = "utmi"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis_u2_susphy_quirk; + snps,dis-del-phy-power-chg-quirk; + snps,parkmode-disable-ss-quirk; + eswin,hsp-sp-csr = <&hsp_sp_csr 0x800 0x818>; + }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: usb: Add ESWIN EIC7700 USB controller 2025-10-16 9:47 ` [PATCH] dt-bindings: usb: Add ESWIN EIC7700 " caohang @ 2025-10-16 15:47 ` Conor Dooley 0 siblings, 0 replies; 5+ messages in thread From: Conor Dooley @ 2025-10-16 15:47 UTC (permalink / raw) To: caohang Cc: gregkh, robh, krzk+dt, conor+dt, Thinh.Nguyen, p.zabel, linux-kernel, linux-usb, devicetree, ningyu, linmin, pinkesh.vaghela, Senchuan Zhang [-- Attachment #1: Type: text/plain, Size: 4121 bytes --] On Thu, Oct 16, 2025 at 05:47:48PM +0800, caohang@eswincomputing.com wrote: > From: Hang Cao <caohang@eswincomputing.com> > > Add Device Tree binding documentation for the ESWIN EIC7700 > usb controller module. > > Signed-off-by: Senchuan Zhang <zhangsenchuan@eswincomputing.com> > Signed-off-by: Hang Cao <caohang@eswincomputing.com> > --- > .../bindings/usb/eswin,eic7700-usb.yaml | 99 +++++++++++++++++++ > 1 file changed, 99 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml > > diff --git a/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml b/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml > new file mode 100644 > index 000000000000..589a3ab6c644 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/eswin,eic7700-usb.yaml > @@ -0,0 +1,99 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/eswin,eic7700-usb.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ESWIN EIC7700 SoC Usb Controller > + > +maintainers: > + - Wei Yang <yangwei1@eswincomputing.com> > + - Senchuan Zhang <zhangsenchuan@eswincomputing.com> > + - Hang Cao <caohang@eswincomputing.com> > + > +description: > + The Usb controller on EIC7700 SoC. > + > +allOf: > + - $ref: snps,dwc3-common.yaml# > + > +properties: > + compatible: > + const: eswin,eic7700-dwc3 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + interrupt-names: > + items: > + - const: peripheral > + > + clocks: > + maxItems: 3 > + > + clock-names: > + items: > + - const: aclk > + - const: cfg > + - const: usb_en > + > + resets: > + maxItems: 2 > + > + reset-names: > + items: > + - const: vaux > + - const: usb_rst Drop the _rst here, since this can't be anything other than a reset. > + eswin,hsp-sp-csr: > + description: > + HSP CSR is to control and get status of different high-speed peripherals > + (such as Ethernet, USB, SATA, etc.) via register, which can tune > + board-level's parameters of PHY, etc. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - items: > + - description: phandle to HSP Register Controller hsp_sp_csr node. > + - description: USB bus register offset. > + - description: AXI low power register offset. This looks better than before, thanks. > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + - interrupt-names > + - resets > + - reset-names > + - eswin,hsp-sp-csr > + > +unevaluatedProperties: false > + > +examples: > + - | > + usb@50480000 { > + compatible = "eswin,eic7700-dwc3"; > + reg = <0x50480000 0x10000>; > + clocks = <&clock 135>, > + <&clock 136>, > + <&hspcrg 18>; > + clock-names = "aclk", "cfg", "usb_en"; > + interrupt-parent = <&plic>; > + interrupts = <85>; > + interrupt-names = "peripheral"; > + resets = <&reset 84>, <&hspcrg 2>; > + reset-names = "vaux", "usb_rst"; > + dr_mode = "peripheral"; > + maximum-speed = "high-speed"; > + phy_type = "utmi"; > + snps,dis_enblslpm_quirk; > + snps,dis-u2-freeclk-exists-quirk; > + snps,dis_u2_susphy_quirk; > + snps,dis-del-phy-power-chg-quirk; > + snps,parkmode-disable-ss-quirk; If any of these "quirks" are required for the device to function properly, please mark them as required so that they don't ever get left out. If it is board dependant, that's fine. I'm only interested in what is set on the SoC level. If most properties from the common snps binding are not possible, please use additionalProperties: false and only permit those that are. pw-bot: changes-requested > + eswin,hsp-sp-csr = <&hsp_sp_csr 0x800 0x818>; > + }; > -- > 2.34.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver 2025-10-16 9:46 [PATCH v4 0/2] Add driver support for ESWIN EIC7700 SoC USB controller caohang 2025-10-16 9:47 ` [PATCH] dt-bindings: usb: Add ESWIN EIC7700 " caohang @ 2025-10-16 9:48 ` caohang 2025-10-16 22:27 ` Thinh Nguyen 1 sibling, 1 reply; 5+ messages in thread From: caohang @ 2025-10-16 9:48 UTC (permalink / raw) To: gregkh, robh, krzk+dt, conor+dt, Thinh.Nguyen, p.zabel, linux-kernel, linux-usb, devicetree Cc: ningyu, linmin, pinkesh.vaghela, Hang Cao, Senchuan Zhang From: Hang Cao <caohang@eswincomputing.com> Add the eic7700 usb driver, which is responsible for identifying,configuring and connecting usb devices. Signed-off-by: Senchuan Zhang <zhangsenchuan@eswincomputing.com> Signed-off-by: Hang Cao <caohang@eswincomputing.com> --- drivers/usb/dwc3/dwc3-generic-plat.c | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c index d96b20570002..98448bc434a5 100644 --- a/drivers/usb/dwc3/dwc3-generic-plat.c +++ b/drivers/usb/dwc3/dwc3-generic-plat.c @@ -10,8 +10,16 @@ #include <linux/clk.h> #include <linux/platform_device.h> #include <linux/reset.h> +#include <linux/regmap.h> +#include <linux/mfd/syscon.h> #include "glue.h" +#define EIC7700_HSP_BUS_FILTER_EN BIT(0) +#define EIC7700_HSP_BUS_CLKEN_GM BIT(9) +#define EIC7700_HSP_BUS_CLKEN_GS BIT(16) +#define EIC7700_HSP_AXI_LP_XM_CSYSREQ BIT(0) +#define EIC7700_HSP_AXI_LP_XS_CSYSREQ BIT(16) + struct dwc3_generic { struct device *dev; struct dwc3 dwc; @@ -20,8 +28,41 @@ struct dwc3_generic { struct reset_control *resets; }; +struct dwc3_generic_match_data { + int (*init_ops)(struct device *dev); +}; + #define to_dwc3_generic(d) container_of((d), struct dwc3_generic, dwc) +static int eic7700_dwc3_bus_init(struct device *dev) +{ + struct regmap *regmap; + u32 hsp_usb_axi_lp; + u32 hsp_usb_bus; + u32 args[2]; + u32 val; + + regmap = syscon_regmap_lookup_by_phandle_args(dev->of_node, + "eswin,hsp-sp-csr", + ARRAY_SIZE(args), args); + if (IS_ERR(regmap)) { + dev_err(dev, "No hsp-sp-csr phandle specified\n"); + return PTR_ERR(regmap); + } + + hsp_usb_bus = args[0]; + hsp_usb_axi_lp = args[1]; + + regmap_read(regmap, hsp_usb_bus, &val); + regmap_write(regmap, hsp_usb_bus, val | EIC7700_HSP_BUS_FILTER_EN | + EIC7700_HSP_BUS_CLKEN_GM | EIC7700_HSP_BUS_CLKEN_GS); + + regmap_write(regmap, hsp_usb_axi_lp, EIC7700_HSP_AXI_LP_XM_CSYSREQ | + EIC7700_HSP_AXI_LP_XS_CSYSREQ); + + return 0; +} + static void dwc3_generic_reset_control_assert(void *data) { reset_control_assert(data); @@ -29,6 +70,7 @@ static void dwc3_generic_reset_control_assert(void *data) static int dwc3_generic_probe(struct platform_device *pdev) { + const struct dwc3_generic_match_data *data; struct dwc3_probe_data probe_data = {}; struct device *dev = &pdev->dev; struct dwc3_generic *dwc3g; @@ -75,6 +117,14 @@ static int dwc3_generic_probe(struct platform_device *pdev) probe_data.dwc = &dwc3g->dwc; probe_data.res = res; probe_data.ignore_clocks_and_resets = true; + + data = of_device_get_match_data(dev); + if (data && data->init_ops) { + ret = data->init_ops(dev); + if (ret < 0) + return dev_err_probe(dev, ret, "failed to init ops\n"); + } + ret = dwc3_core_probe(&probe_data); if (ret) return dev_err_probe(dev, ret, "failed to register DWC3 Core\n"); @@ -139,6 +189,10 @@ static int dwc3_generic_runtime_idle(struct device *dev) return dwc3_runtime_idle(dev_get_drvdata(dev)); } +static const struct dwc3_generic_match_data eic7700_dwc3_data = { + .init_ops = eic7700_dwc3_bus_init, +}; + static const struct dev_pm_ops dwc3_generic_dev_pm_ops = { SYSTEM_SLEEP_PM_OPS(dwc3_generic_suspend, dwc3_generic_resume) RUNTIME_PM_OPS(dwc3_generic_runtime_suspend, dwc3_generic_runtime_resume, @@ -147,6 +201,10 @@ static const struct dev_pm_ops dwc3_generic_dev_pm_ops = { static const struct of_device_id dwc3_generic_of_match[] = { { .compatible = "spacemit,k1-dwc3", }, + { + .compatible = "eswin,eic7700-dwc3", + .data = &eic7700_dwc3_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, dwc3_generic_of_match); -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver 2025-10-16 9:48 ` [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver caohang @ 2025-10-16 22:27 ` Thinh Nguyen 0 siblings, 0 replies; 5+ messages in thread From: Thinh Nguyen @ 2025-10-16 22:27 UTC (permalink / raw) To: caohang@eswincomputing.com Cc: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, Thinh Nguyen, p.zabel@pengutronix.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, ningyu@eswincomputing.com, linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com, Senchuan Zhang On Thu, Oct 16, 2025, caohang@eswincomputing.com wrote: > From: Hang Cao <caohang@eswincomputing.com> > > Add the eic7700 usb driver, which is responsible for > identifying,configuring and connecting usb devices. > > Signed-off-by: Senchuan Zhang <zhangsenchuan@eswincomputing.com> > Signed-off-by: Hang Cao <caohang@eswincomputing.com> > --- > drivers/usb/dwc3/dwc3-generic-plat.c | 58 ++++++++++++++++++++++++++++ > 1 file changed, 58 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c > index d96b20570002..98448bc434a5 100644 > --- a/drivers/usb/dwc3/dwc3-generic-plat.c > +++ b/drivers/usb/dwc3/dwc3-generic-plat.c > @@ -10,8 +10,16 @@ > #include <linux/clk.h> > #include <linux/platform_device.h> > #include <linux/reset.h> > +#include <linux/regmap.h> > +#include <linux/mfd/syscon.h> > #include "glue.h" > > +#define EIC7700_HSP_BUS_FILTER_EN BIT(0) > +#define EIC7700_HSP_BUS_CLKEN_GM BIT(9) > +#define EIC7700_HSP_BUS_CLKEN_GS BIT(16) > +#define EIC7700_HSP_AXI_LP_XM_CSYSREQ BIT(0) > +#define EIC7700_HSP_AXI_LP_XS_CSYSREQ BIT(16) > + > struct dwc3_generic { > struct device *dev; > struct dwc3 dwc; > @@ -20,8 +28,41 @@ struct dwc3_generic { > struct reset_control *resets; > }; > > +struct dwc3_generic_match_data { > + int (*init_ops)(struct device *dev); > +}; > + > #define to_dwc3_generic(d) container_of((d), struct dwc3_generic, dwc) > > +static int eic7700_dwc3_bus_init(struct device *dev) > +{ > + struct regmap *regmap; > + u32 hsp_usb_axi_lp; > + u32 hsp_usb_bus; > + u32 args[2]; > + u32 val; > + > + regmap = syscon_regmap_lookup_by_phandle_args(dev->of_node, > + "eswin,hsp-sp-csr", > + ARRAY_SIZE(args), args); > + if (IS_ERR(regmap)) { > + dev_err(dev, "No hsp-sp-csr phandle specified\n"); > + return PTR_ERR(regmap); > + } > + > + hsp_usb_bus = args[0]; > + hsp_usb_axi_lp = args[1]; > + > + regmap_read(regmap, hsp_usb_bus, &val); > + regmap_write(regmap, hsp_usb_bus, val | EIC7700_HSP_BUS_FILTER_EN | > + EIC7700_HSP_BUS_CLKEN_GM | EIC7700_HSP_BUS_CLKEN_GS); > + > + regmap_write(regmap, hsp_usb_axi_lp, EIC7700_HSP_AXI_LP_XM_CSYSREQ | > + EIC7700_HSP_AXI_LP_XS_CSYSREQ); > + > + return 0; > +} > + > static void dwc3_generic_reset_control_assert(void *data) > { > reset_control_assert(data); > @@ -29,6 +70,7 @@ static void dwc3_generic_reset_control_assert(void *data) > > static int dwc3_generic_probe(struct platform_device *pdev) > { > + const struct dwc3_generic_match_data *data; > struct dwc3_probe_data probe_data = {}; > struct device *dev = &pdev->dev; > struct dwc3_generic *dwc3g; > @@ -75,6 +117,14 @@ static int dwc3_generic_probe(struct platform_device *pdev) > probe_data.dwc = &dwc3g->dwc; > probe_data.res = res; > probe_data.ignore_clocks_and_resets = true; > + > + data = of_device_get_match_data(dev); > + if (data && data->init_ops) { > + ret = data->init_ops(dev); > + if (ret < 0) > + return dev_err_probe(dev, ret, "failed to init ops\n"); > + } > + > ret = dwc3_core_probe(&probe_data); > if (ret) > return dev_err_probe(dev, ret, "failed to register DWC3 Core\n"); > @@ -139,6 +189,10 @@ static int dwc3_generic_runtime_idle(struct device *dev) > return dwc3_runtime_idle(dev_get_drvdata(dev)); > } > > +static const struct dwc3_generic_match_data eic7700_dwc3_data = { > + .init_ops = eic7700_dwc3_bus_init, > +}; > + > static const struct dev_pm_ops dwc3_generic_dev_pm_ops = { > SYSTEM_SLEEP_PM_OPS(dwc3_generic_suspend, dwc3_generic_resume) > RUNTIME_PM_OPS(dwc3_generic_runtime_suspend, dwc3_generic_runtime_resume, > @@ -147,6 +201,10 @@ static const struct dev_pm_ops dwc3_generic_dev_pm_ops = { > > static const struct of_device_id dwc3_generic_of_match[] = { > { .compatible = "spacemit,k1-dwc3", }, > + { > + .compatible = "eswin,eic7700-dwc3", > + .data = &eic7700_dwc3_data, This data is for dwc3_probe_data. Use this when you need to pass the data to the core. We're already in the glue, you can just check against the compatible string and directly call the initialization in the dwc3_generic_probe. Create a new function dwc3_vendor_pre_init(). Check the compatible string and perform your initialization there. Have dwc3_generic_probe() call this prior to dwc3_core_probe(). > + }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, dwc3_generic_of_match); > -- > 2.34.1 > Please rebase against Greg's usb-testing branch. There are new changes to the glue layer. Also, there's [PATCH v4 0/2] header, but this patch $subject is prefixed without version. Please fix that. Thanks, Thinh ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-16 22:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-16 9:46 [PATCH v4 0/2] Add driver support for ESWIN EIC7700 SoC USB controller caohang 2025-10-16 9:47 ` [PATCH] dt-bindings: usb: Add ESWIN EIC7700 " caohang 2025-10-16 15:47 ` Conor Dooley 2025-10-16 9:48 ` [PATCH] usb: dwc3: eic7700: Add EIC7700 USB driver caohang 2025-10-16 22:27 ` Thinh Nguyen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).