Re: [PATCH v1 1/5] dt-bindings: pwm: Add Loongson PWM controller

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

 



On Tue, Apr 02, 2024 at 03:58:38PM +0800, Binbin Zhou wrote:
> Add Loongson PWM controller binding with DT schema format using
> json-schema.
> 
> Signed-off-by: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
> ---
>  .../devicetree/bindings/pwm/pwm-loongson.yaml | 64 +++++++++++++++++++

Filename should match compatible.

>  MAINTAINERS                                   |  6 ++
>  2 files changed, 70 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pwm/pwm-loongson.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-loongson.yaml b/Documentation/devicetree/bindings/pwm/pwm-loongson.yaml
> new file mode 100644
> index 000000000000..d25904468353
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/pwm-loongson.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/pwm-loongson.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Loongson PWM Controller
> +
> +maintainers:
> +  - Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
> +
> +description:
> +  It is the generic PWM framework driver for Loongson family.

That's describing the driver. Not really relevant to the binding.


> +  Each PWM has one pulse width output signal and one pulse input
> +  signal to be measured.
> +  It can be found on Loongson-2K series cpus and Loongson LS7A bridge chips.
> +
> +allOf:
> +  - $ref: pwm.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: loongson,ls7a-pwm
> +      - items:
> +          - enum:
> +              - loongson,ls2k0500-pwm
> +              - loongson,ls2k1000-pwm
> +              - loongson,ls2k2000-pwm
> +          - const: loongson,ls7a-pwm
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  '#pwm-cells':
> +    const: 3

Please define what is in each cell. If there's only 2 signals, then the 
first cell defines the output or input (what value for which one?).

Really, the PWM binding is only for outputs, so is a cell even needed? I 
suppose we could use it for inputs too, but that's really "input 
capture" type operation that timers often have. I'll defer to the PWM 
maintainers...

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - '#pwm-cells'

pwm.yaml makes this required already.

Rob





[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