Re: [PATCH 3/7] dt-bindings: usb: add SpacemiT K1 DWC3 glue
From: Krzysztof Kozlowski
Date: Mon Apr 07 2025 - 09:26:49 EST
On 07/04/2025 14:38, Ze Huang wrote:
> Add support for SpacemiT DWC3 glue driver, which manages interrupt,
> reset and clock resource.
>
> Signed-off-by: Ze Huang <huangze@xxxxxxxxxxx>
> ---
> .../devicetree/bindings/usb/spacemit,k1-dwc3.yaml | 78 ++++++++++++++++++++++
> 1 file changed, 78 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.yaml b/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.yaml
Combining 3 subsystems into one patchset is a poor idea.
> new file mode 100644
> index 0000000000000000000000000000000000000000..40ce3fd1330d5f371ec69155c237e10a65a9d8f4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.yaml
> @@ -0,0 +1,78 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/spacemit,k1-dwc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SpacemiT K1 SuperSpeed DWC3 USB SoC Controller Glue
> +
> +maintainers:
> + - Ze Huang <huangze@xxxxxxxxxxx>
> +
> +properties:
> + compatible:
> + const: spacemit,k1-dwc3
> +
> + ranges:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + interconnects:
Missing maxItems
> + description:
> + On SpacemiT K1, USB performs DMA through bus other than parent DT node.
> + The 'interconnects' property explicitly describes this path, ensuring
> + correct address translation.
> +
> + interconnect-names:
> + const: dma-mem
> +
> + # optional
Drop, Don't repeat constraints in free form text.
> + vbus-supply:
> + description: A phandle to the regulator supplying the VBUS voltage.
> +
> +patternProperties:
> + '^usb@':
> + $ref: snps,dwc3.yaml#
No, rather fold child into the parent.
> +
> +additionalProperties: false
This goes after required:, always.
> +
> +required:
> + - compatible
> + - ranges
> + - clocks
> + - resets
> + - interrupts
> + - interconnects
> + - interconnect-names
> +
> +examples:
> + - |
> + usb@c0a00000 {
> + compatible = "spacemit,k1-dwc3";
> + clocks = <&syscon_apmu 16>;
> + interrupts = <149>;
> + interconnects = <&dram_range0>;
> + interconnect-names = "dma-mem";
> + ranges = <0x0 0xc0a00000 0x10000>;
> + resets = <&syscon_apmu 8>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + status = "disabled";
Nope, drop.
Best regards,
Krzysztof