Message ID | IA1PR20MB4953865775FA926B2BA4580CBBB72@IA1PR20MB4953.namprd20.prod.outlook.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs | expand |
On Mon, 29 Jul 2024 12:36:51 +0800, Inochi Amaoto wrote: > The DMA IP of Sophgo CV18XX/SG200X is based on a DW AXI CORE, with > an additional channel remap register located in the top system control > area. The DMA channel is exclusive to each core. > > In addition, the DMA multiplexer is a subdevice of system controller, > so this binding only contains necessary properties for the multiplexer > itself. > > Add the dmamux binding for CV18XX/SG200X series SoC. > > Signed-off-by: Inochi Amaoto <inochiama@outlook.com> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../bindings/dma/sophgo,cv1800-dmamux.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml > 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/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/IA1PR20MB4953865775FA926B2BA4580CBBB72@IA1PR20MB4953.namprd20.prod.outlook.com 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 Mon, Jul 29, 2024 at 12:21:42AM GMT, Rob Herring (Arm) wrote: > > On Mon, 29 Jul 2024 12:36:51 +0800, Inochi Amaoto wrote: > > The DMA IP of Sophgo CV18XX/SG200X is based on a DW AXI CORE, with > > an additional channel remap register located in the top system control > > area. The DMA channel is exclusive to each core. > > > > In addition, the DMA multiplexer is a subdevice of system controller, > > so this binding only contains necessary properties for the multiplexer > > itself. > > > > Add the dmamux binding for CV18XX/SG200X series SoC. > > > > Signed-off-by: Inochi Amaoto <inochiama@outlook.com> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > .../bindings/dma/sophgo,cv1800-dmamux.yaml | 51 +++++++++++++++++++ > > 1 file changed, 51 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml > > > > 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/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > Hi Rob, Could you share some suggestions? I can not reproduce this error with latest dtschema. I think this is more like a misreporting. Regards, Inochi.
On 29/07/2024 09:00, Inochi Amaoto wrote: >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# >> > > Hi Rob, > > Could you share some suggestions? I can not reproduce this error with > latest dtschema. I think this is more like a misreporting. You would need dtschema from the master branch, so newer than 2024.05. Best regards, Krzysztof
On Mon, Jul 29, 2024 at 11:30:20AM GMT, Krzysztof Kozlowski wrote: > On 29/07/2024 09:00, Inochi Amaoto wrote: > >> yamllint warnings/errors: > >> > >> dtschema/dtc warnings/errors: > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > >> > > > > Hi Rob, > > > > Could you share some suggestions? I can not reproduce this error with > > latest dtschema. I think this is more like a misreporting. > > You would need dtschema from the master branch, so newer than 2024.05. > > Best regards, > Krzysztof > Thanks, I will have a try.
On Mon, Jul 29, 2024 at 11:30:20AM GMT, Krzysztof Kozlowski wrote: > On 29/07/2024 09:00, Inochi Amaoto wrote: > >> yamllint warnings/errors: > >> > >> dtschema/dtc warnings/errors: > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > >> > > > > Hi Rob, > > > > Could you share some suggestions? I can not reproduce this error with > > latest dtschema. I think this is more like a misreporting. > > You would need dtschema from the master branch, so newer than 2024.05. > > Best regards, > Krzysztof > Is it a must for the type array to have more than 1 element? I have tested the value "<&dmac 0>" and "<&dmac>, <&dmac>". Both pass the check (These value are just for test, not the real hardware). Setting dma-masters to type "phandle" also has no change. It do not accept the value "<&dmac>", Is there any suggestion for this? Thanks in advance. Regards, Inochi
On Mon, Jul 29, 2024 at 08:28:09PM +0800, Inochi Amaoto wrote: > On Mon, Jul 29, 2024 at 11:30:20AM GMT, Krzysztof Kozlowski wrote: > > On 29/07/2024 09:00, Inochi Amaoto wrote: > > >> yamllint warnings/errors: > > >> > > >> dtschema/dtc warnings/errors: > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > > >> > > > > > > Hi Rob, > > > > > > Could you share some suggestions? I can not reproduce this error with > > > latest dtschema. I think this is more like a misreporting. > > > > You would need dtschema from the master branch, so newer than 2024.05. > > > > Best regards, > > Krzysztof > > > > Is it a must for the type array to have more than 1 element? > I have tested the value "<&dmac 0>" and "<&dmac>, <&dmac>". > Both pass the check (These value are just for test, not the > real hardware). > > Setting dma-masters to type "phandle" also has no change. > It do not accept the value "<&dmac>", Is there any suggestion > for this? Thanks in advance. The issue is 'dma-masters' is also defined as a uint32 in the Spear binding. Types aren't local to a binding, so when there's a 4 byte value, is that a phandle or plain uint32? I'm working on a fix in dtschema for this. It should be committed shortly. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Rob
On Mon, Jul 29, 2024 at 10:02:01AM GMT, Rob Herring wrote: > On Mon, Jul 29, 2024 at 08:28:09PM +0800, Inochi Amaoto wrote: > > On Mon, Jul 29, 2024 at 11:30:20AM GMT, Krzysztof Kozlowski wrote: > > > On 29/07/2024 09:00, Inochi Amaoto wrote: > > > >> yamllint warnings/errors: > > > >> > > > >> dtschema/dtc warnings/errors: > > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > > >> from schema $id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > > > >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.example.dtb: dma-router@154: dma-masters: 4294967295 is not of type 'array' > > > >> from schema $id: http://devicetree.org/schemas/dma/dma-router.yaml# > > > >> > > > > > > > > Hi Rob, > > > > > > > > Could you share some suggestions? I can not reproduce this error with > > > > latest dtschema. I think this is more like a misreporting. > > > > > > You would need dtschema from the master branch, so newer than 2024.05. > > > > > > Best regards, > > > Krzysztof > > > > > > > Is it a must for the type array to have more than 1 element? > > I have tested the value "<&dmac 0>" and "<&dmac>, <&dmac>". > > Both pass the check (These value are just for test, not the > > real hardware). > > > > Setting dma-masters to type "phandle" also has no change. > > It do not accept the value "<&dmac>", Is there any suggestion > > for this? Thanks in advance. > > The issue is 'dma-masters' is also defined as a uint32 in the Spear > binding. Types aren't local to a binding, so when there's a 4 byte > value, is that a phandle or plain uint32? I'm working on a fix in > dtschema for this. It should be committed shortly. > > > Reviewed-by: Rob Herring (Arm) <robh@kernel.org> > > Rob Thanks for the explanation. Regards, Inochi.
diff --git a/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml new file mode 100644 index 000000000000..480cb117db9b --- /dev/null +++ b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo CV1800/SG200 Series DMA multiplexer + +maintainers: + - Inochi Amaoto <inochiama@outlook.com> + +description: | + The DMA multiplexer of CV1800 is a subdevice of the system + controller. It support mapping 8 channels, but each channel + can be mapped only once. + +allOf: + - $ref: dma-router.yaml# + +properties: + compatible: + const: sophgo,cv1800-dmamux + + reg: + items: + - description: DMA channal remapping register + - description: DMA channel interrupt mapping register + + '#dma-cells': + const: 2 + description: + The first cells is device id. The second one is the cpu id. + + dma-masters: + maxItems: 1 + +required: + - reg + - '#dma-cells' + - dma-masters + +additionalProperties: false + +examples: + - | + dma-router@154 { + compatible = "sophgo,cv1800-dmamux"; + reg = <0x154 0x8>, <0x298 0x4>; + #dma-cells = <2>; + dma-masters = <&dmac>; + };