Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller
       [not found] <20261014072109.1759502-1-ghahramani.navid@gmail.com>
@ 2026-10-14  7:21 ` Navid Ghahremani
  2026-10-15  7:24   ` sashiko-bot
  2026-10-14  7:21 ` [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S Navid Ghahremani
  1 sibling, 1 reply; 4+ messages in thread
From: Navid Ghahremani @ 2026-10-14  7:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, stefandoesinger, krzk, Navid Ghahremani, Greg Kroah-Hartman,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb,
	devicetree, linux-kernel

Describe the USB host integration with three CRM clocks and four reset
bits.

Signed-off-by: Navid Ghahremani <ghahramani.navid@gmail.com>
---
 .../bindings/usb/zte,zx279128s-dwc3.yaml      | 76 +++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml

diff --git a/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml b/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml
new file mode 100644
index 0000000000..2fd9fe0cc7
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/zte,zx279128s-dwc3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ZTE zx279128s DWC3 USB controller
+
+maintainers:
+  - Navid Ghahremani <ghahramani.navid@gmail.com>
+
+description:
+  The ZTE zx279128s has a DesignWare USB3 controller (DWC_usb3 2.80a) with
+  integrated USB 2.0 and USB 3.0 PHYs, used as a host. Its clocks and resets
+  come from the top clock and reset module.
+
+allOf:
+  - $ref: snps,dwc3-common.yaml#
+
+properties:
+  compatible:
+    const: zte,zx279128s-dwc3
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: 20 MHz reference clock
+      - description: bus (AXI) clock
+      - description: 32.768 kHz suspend clock
+
+  clock-names:
+    items:
+      - const: ref
+      - const: bus_early
+      - const: suspend
+
+  resets:
+    description: The four reset bits of the controller and its PHYs, in the
+      order they are released.
+    minItems: 4
+    maxItems: 4
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - resets
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/zte,zx279128s-crm.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    usb@9100000 {
+        compatible = "zte,zx279128s-dwc3";
+        reg = <0x09100000 0x100000>;
+        interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&topcrm ZX279128S_TOP_USB_REF>,
+                 <&topcrm ZX279128S_TOP_USB_ACLK>,
+                 <&topcrm ZX279128S_TOP_USB_SUSPEND>;
+        clock-names = "ref", "bus_early", "suspend";
+        resets = <&topcrm ZX279128S_TOP_RST_USB_B11>,
+                 <&topcrm ZX279128S_TOP_RST_USB_B14>,
+                 <&topcrm ZX279128S_TOP_RST_USB_B9>,
+                 <&topcrm ZX279128S_TOP_RST_USB_B10>;
+        dr_mode = "host";
+    };
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S
       [not found] <20261014072109.1759502-1-ghahramani.navid@gmail.com>
  2026-10-14  7:21 ` [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller Navid Ghahremani
@ 2026-10-14  7:21 ` Navid Ghahremani
  2026-10-15  7:24   ` sashiko-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Navid Ghahremani @ 2026-10-14  7:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arnd, stefandoesinger, krzk, Navid Ghahremani, Thinh Nguyen,
	Greg Kroah-Hartman, linux-usb, linux-kernel

Use the generic DWC3 platform integration to enable clocks and release
resets. ZX279128S is an always-on networking gateway SoC without
system low-power sleep/suspend states, and the suspend clock is an APB
clock gating input handled alongside core clocks, making the generic
platform glue sufficient.

Signed-off-by: Navid Ghahremani <ghahramani.navid@gmail.com>
---
 drivers/usb/dwc3/Kconfig             | 2 +-
 drivers/usb/dwc3/dwc3-generic-plat.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 18169727a4..dd0f6d25dd 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -207,7 +207,7 @@ config USB_DWC3_GENERIC_PLAT
 	default USB_DWC3
 	help
 	  Support USB3 functionality in simple SoC integrations.
-	  Currently supports SpacemiT DWC USB3. Platforms using
+	  Currently supports SpacemiT and ZTE zx279128s DWC USB3. Platforms using
 	  dwc3-of-simple can easily switch to dwc3-generic by flattening
 	  the dwc3 child node in the device tree.
 	  Say 'Y' or 'M' here if your platform integrates DWC3 in a similar way.
diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c
index ca69ac0eb0..aa838cf067 100644
--- a/drivers/usb/dwc3/dwc3-generic-plat.c
+++ b/drivers/usb/dwc3/dwc3-generic-plat.c
@@ -237,6 +237,7 @@ static const struct of_device_id dwc3_generic_of_match[] = {
 	{ .compatible = "fsl,ls1028a-dwc3", &fsl_ls1028_dwc3},
 	{ .compatible = "eswin,eic7700-dwc3", &eic7700_dwc3},
 	{ .compatible = "starfive,jhb100-dwc3", },
+	{ .compatible = "zte,zx279128s-dwc3", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, dwc3_generic_of_match);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller
  2026-10-14  7:21 ` [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller Navid Ghahremani
@ 2026-10-15  7:24   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-10-15  7:24 UTC (permalink / raw)
  To: Navid Ghahremani; +Cc: linux-usb, devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: usb: missing reset header and incorrect macros in example
--

commit 4b49967364799b06d338b499b3fff468b97de327
Author: Navid Ghahremani <ghahramani.navid@gmail.com>

dt-bindings: usb: Add ZTE ZX279128S DWC3 controller

Describe the USB host integration with three CRM clocks and four reset
bits.

> diff --git a/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml b/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml
> new file mode 100644
> index 0000000000000..2fd9fe0cc74bd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/zte,zx279128s-dwc3.yaml

[ ... ]

> +examples:
> +  - |
> +    #include <dt-bindings/clock/zte,zx279128s-crm.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    usb@9100000 {
> +        compatible = "zte,zx279128s-dwc3";
> +        reg = <0x09100000 0x100000>;
> +        interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&topcrm ZX279128S_TOP_USB_REF>,
> +                 <&topcrm ZX279128S_TOP_USB_ACLK>,
> +                 <&topcrm ZX279128S_TOP_USB_SUSPEND>;
> +        clock-names = "ref", "bus_early", "suspend";
> +        resets = <&topcrm ZX279128S_TOP_RST_USB_B11>,
> +                 <&topcrm ZX279128S_TOP_RST_USB_B14>,
> +                 <&topcrm ZX279128S_TOP_RST_USB_B9>,
> +                 <&topcrm ZX279128S_TOP_RST_USB_B10>;

[Severity: Low]
Will this example pass make dt_binding_check?

The example is missing an include for <dt-bindings/reset/zte,zx279128s-reset.h>.

Additionally, the macros used here (e.g., ZX279128S_TOP_RST_USB_B11) appear
to be misspelled. The actual macros defined in the reset header are prefixed
with ZX279128S_RESET_ (e.g., ZX279128S_RESET_USB_B11).

This discrepancy will result in a build failure when validating the schema.

> +        dr_mode = "host";
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014072109.1759502-1-ghahramani.navid@gmail.com?part=21

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S
  2026-10-14  7:21 ` [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S Navid Ghahremani
@ 2026-10-15  7:24   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-10-15  7:24 UTC (permalink / raw)
  To: Navid Ghahremani; +Cc: linux-usb

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] usb: dwc3: generic: clock leak in resume error path
--

commit b05da126b481233779c64514b7441eac703bad0d
Author: Navid Ghahremani <ghahramani.navid@gmail.com>

usb: dwc3: generic-plat: Add ZTE ZX279128S

This commit uses the generic DWC3 platform integration to enable clocks
and release resets for the ZTE ZX279128S SoC.

> diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c
> index ca69ac0eb07ce..aa838cf0676f2 100644
> --- a/drivers/usb/dwc3/dwc3-generic-plat.c
> +++ b/drivers/usb/dwc3/dwc3-generic-plat.c
> @@ -237,6 +237,7 @@ static const struct of_device_id dwc3_generic_of_match[] = {
>  	{ .compatible = "fsl,ls1028a-dwc3", &fsl_ls1028_dwc3},
>  	{ .compatible = "eswin,eic7700-dwc3", &eic7700_dwc3},
>  	{ .compatible = "starfive,jhb100-dwc3", },
> +	{ .compatible = "zte,zx279128s-dwc3", },

[Severity: Medium]
Does dwc3_generic_resume() leak the clock prepare/enable counts if
dwc3_pm_resume() returns an error during system resume?

drivers/usb/dwc3/dwc3-generic-plat.c:dwc3_generic_resume() {
	...
	ret = clk_bulk_prepare_enable(dwc3g->num_clocks, dwc3g->clks);
	if (ret)
		return ret;

	ret = dwc3_pm_resume(dwc);
	if (ret)
		return ret;
	...
}

Should clk_bulk_disable_unprepare() be called in the error path before
returning?

>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, dwc3_generic_of_match);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014072109.1759502-1-ghahramani.navid@gmail.com?part=22

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-15  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261014072109.1759502-1-ghahramani.navid@gmail.com>
2026-10-14  7:21 ` [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller Navid Ghahremani
2026-10-15  7:24   ` sashiko-bot
2026-10-14  7:21 ` [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S Navid Ghahremani
2026-10-15  7:24   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox