Re: [PATCH 2/2] dt-bindings: dma: Convert ingenic-pdma doc to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/03/2024 09:02, bin.yao@xxxxxxxxxxx wrote:
> From: "bin.yao" <bin.yao@xxxxxxxxxxx>
> 
> Convert the textual documentation for the Ingenic SoCs PDMA Controller

I don't see any conversion here.

> devicetree binding to YAML.
> 
> Signed-off-by: bin.yao <bin.yao@xxxxxxxxxxx>

Are you sure this is Latin transliteration of your name? With a dot in
between? Looks like email login...

> ---
>  .../devicetree/bindings/dma/ingenic,pdma.yaml | 67 +++++++++++++++++++
>  include/dt-bindings/dma/ingenic-pdma.h        | 45 +++++++++++++
>  2 files changed, 112 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/dma/ingenic,pdma.yaml
>  create mode 100644 include/dt-bindings/dma/ingenic-pdma.h
> 
> diff --git a/Documentation/devicetree/bindings/dma/ingenic,pdma.yaml b/Documentation/devicetree/bindings/dma/ingenic,pdma.yaml
> new file mode 100644
> index 000000000000..290dbf182a01
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/ingenic,pdma.yaml


> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/ingenic,pdma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ingenic SoCs PDMA Controller
> +
> +maintainers:
> +  - bin.yao <bin.yao@xxxxxxxxxxx>
> +

What is PDMA? Why this is not DMA? Provide description explaining this.

> +allOf:
> +  - $ref: dma-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ingenic,t33-pdma

There is no such soc like t33 so far. Please point me to SoC/board/other
bindings.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupts-names:
> +    const: pdma

Drop names, not needed.

> +
> +  "#dma-cells":
> +    const: 1
> +
> +  dma-channels:
> +    const: 32

Drop property, not needed.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: gate_pdma

Drop names, not needed.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupts-names
> +  - "#dma-cells"
> +  - dma-channels
> +  - clocks
> +  - clock-names
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
> +    pdma:dma@13420000 {

Drop label.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.

> +      compatible = "ingenic,t33-pdma";
> +      reg = <0x13420000 0x10000>;
> +      interrupt-parent = <&intc>;
> +      interrupt-names = "pdma";
> +      interrupts = <10>;
> +      #dma-cells = <0x1>;

That's not hex!

> +      dma-channels = <0x20>;
> +      clocks = <&cgu JZ4780_CLK_PDMA>;
> +      clock-names = "gate_pdma";
> +    };
> +
> diff --git a/include/dt-bindings/dma/ingenic-pdma.h b/include/dt-bindings/dma/ingenic-pdma.h
> new file mode 100644
> index 000000000000..66188d588232
> --- /dev/null
> +++ b/include/dt-bindings/dma/ingenic-pdma.h

Same filename as binding.

> @@ -0,0 +1,45 @@
> +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
> +/*
> + * Copyright (C) 2024 Ingenic Semiconductor Co., Ltd.
> + * Author: bin.yao <bin.yao@xxxxxxxxxxx>
> + */
> +
> +#ifndef __DT_BINDINGS_INGENIC_PDMA_H__
> +#define __DT_BINDINGS_INGENIC_PDMA_H__
> +
> +/*
> + * Request type numbers for the INGENIC DMA controller.
> + */
> +#define INGENIC_DMA_REQ_AIC_LOOP_RX	0x5

IDs start from 0, not 5. IDs are decimal, not hex.

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux