Message ID | 20250407-b4-k1-usb3-v3-2-v1-3-bf0bcc41c9ba@whut.edu.cn (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | Add USB3.0 PHY and host controller support for SpacemiT K1 SoC | expand |
Context | Check | Description |
---|---|---|
bjorn/pre-ci_am | fail | Failed to apply series |
On Mon, 07 Apr 2025 20:38:48 +0800, Ze Huang wrote: > Add support for SpacemiT DWC3 glue driver, which manages interrupt, > reset and clock resource. > > Signed-off-by: Ze Huang <huangze@whut.edu.cn> > --- > .../devicetree/bindings/usb/spacemit,k1-dwc3.yaml | 78 ++++++++++++++++++++++ > 1 file changed, 78 insertions(+) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@c0a00000 (spacemit,k1-dwc3): '#address-cells', '#size-cells' do not match any of the regexes: '^usb@', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/spacemit,k1-dwc3.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@c0a00000 (spacemit,k1-dwc3): usb@0:reg: [[0, 0], [0, 65536]] is too long from schema $id: http://devicetree.org/schemas/usb/spacemit,k1-dwc3.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@0 (snps,dwc3): reg: [[0, 0], [0, 65536]] is too long from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250407-b4-k1-usb3-v3-2-v1-3-bf0bcc41c9ba@whut.edu.cn The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 4/7/25 9:22 PM, Krzysztof Kozlowski wrote: > 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@whut.edu.cn> >> --- >> .../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. Acknowledged, will split into two sets in next version 1. usb2 phy and combo phy 2. dwc3 glue driver and dts > >> 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@whut.edu.cn> >> + >> +properties: >> + compatible: >> + const: spacemit,k1-dwc3 >> + >> + ranges: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + resets: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + interconnects: > Missing maxItems Will fix > >> + 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. Will do > >> + 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. I’m not entirely sure I understand your suggestion. Could you please provide an example? Thanks! > >> + >> +additionalProperties: false > This goes after required:, always. OK > >> + >> +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. Will drop 'status' > > > > Best regards, > Krzysztof > >
On 4/7/25 9:51 PM, Rob Herring (Arm) wrote: > On Mon, 07 Apr 2025 20:38:48 +0800, Ze Huang wrote: >> Add support for SpacemiT DWC3 glue driver, which manages interrupt, >> reset and clock resource. >> >> Signed-off-by: Ze Huang <huangze@whut.edu.cn> >> --- >> .../devicetree/bindings/usb/spacemit,k1-dwc3.yaml | 78 ++++++++++++++++++++++ >> 1 file changed, 78 insertions(+) >> > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@c0a00000 (spacemit,k1-dwc3): '#address-cells', '#size-cells' do not match any of the regexes: '^usb@', 'pinctrl-[0-9]+' > from schema $id: http://devicetree.org/schemas/usb/spacemit,k1-dwc3.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@c0a00000 (spacemit,k1-dwc3): usb@0:reg: [[0, 0], [0, 65536]] is too long > from schema $id: http://devicetree.org/schemas/usb/spacemit,k1-dwc3.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.example.dtb: usb@0 (snps,dwc3): reg: [[0, 0], [0, 65536]] is too long > from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml# Thanks for the report! I’ll add '#address-cells' and '#size-cells' under properties to resolve the error. because if I drop them from the example, I get warnings like: Warning (avoid_default_addr_size): /example-0/usb@c0a00000/usb@0: Relying on default #address-cells value > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250407-b4-k1-usb3-v3-2-v1-3-bf0bcc41c9ba@whut.edu.cn > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. > > >
On 09/04/2025 10:16, Ze Huang wrote: >> >>> + 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. > > I’m not entirely sure I understand your suggestion. Could you please provide > an example? Thanks! Do not create glue node, but only one node for entire DWC. All new DWC USB bindings are supposed to follow this new approach. There are some examples in the tree and some on the lists. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.yaml b/Documentation/devicetree/bindings/usb/spacemit,k1-dwc3.yaml 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@whut.edu.cn> + +properties: + compatible: + const: spacemit,k1-dwc3 + + ranges: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interconnects: + 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 + vbus-supply: + description: A phandle to the regulator supplying the VBUS voltage. + +patternProperties: + '^usb@': + $ref: snps,dwc3.yaml# + +additionalProperties: false + +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"; + + usb@0 { + compatible = "snps,dwc3"; + reg = <0x0 0x0 0x0 0x10000>; + interrupt-parent = <&plic>; + interrupts = <125>; + phys = <&usb_phy2>, <&usb_phy3 2>; + phy-names = "usb2-phy", "usb3-phy"; + }; + };
Add support for SpacemiT DWC3 glue driver, which manages interrupt, reset and clock resource. Signed-off-by: Ze Huang <huangze@whut.edu.cn> --- .../devicetree/bindings/usb/spacemit,k1-dwc3.yaml | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+)