public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>,
	devicetree@vger.kernel.org
Cc: tsbogend@alpha.franken.de, robh+dt@kernel.org,
	krzk+dt@kernel.org, arinc.unal@arinc9.com
Subject: Re: [PATCH v2] dt-bindings: mips: add CPU bindings for MIPS architecture
Date: Mon, 19 Sep 2022 13:17:23 +0200	[thread overview]
Message-ID: <285f80ef-5f5c-e68d-b514-a3e3341841c5@linaro.org> (raw)
In-Reply-To: <20220917041136.526446-1-sergio.paracuellos@gmail.com>

On 17/09/2022 06:11, Sergio Paracuellos wrote:
> Add the yaml binding for available CPUs in MIPS architecture.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Rebase on some recent Linux kernel tree and use scripts/get_maintainers.pl


> ---
> Changes in v2:
>  - Remove 'bindings/mips/brcm/brcm,bmips.txt'
>  - Include 'mips-hpt-frequency' in cpus YAML schema for bmips CPUS's
>  - Add a BMIPS CPU node sample
> 
>  .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
>  .../devicetree/bindings/mips/cpus.yaml        | 100 ++++++++++++++++++
>  2 files changed, 100 insertions(+), 8 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
>  create mode 100644 Documentation/devicetree/bindings/mips/cpus.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
> deleted file mode 100644
> index 8ef71b4085ca..000000000000
> --- a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -* Broadcom MIPS (BMIPS) CPUs
> -
> -Required properties:
> -- compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380",
> -  "brcm,bmips5000"
> -
> -- mips-hpt-frequency: This is common to all CPUs in the system so it lives
> -  under the "cpus" node.
> diff --git a/Documentation/devicetree/bindings/mips/cpus.yaml b/Documentation/devicetree/bindings/mips/cpus.yaml
> new file mode 100644
> index 000000000000..361afde8ce0a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mips/cpus.yaml
> @@ -0,0 +1,100 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mips/cpus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MIPS CPUs bindings
> +
> +maintainers:
> +  - Sergio Paracuellos <sergio.paracuellos@gmail.com>

What about existing maintainers?



> +
> +description: |+

|+ seems not needed


> +  The device tree allows to describe the layout of CPUs in a system through
> +  the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
> +  defining properties for every cpu.

s/cpu/CPU/

> +
> +properties:
> +  reg:
> +    maxItems: 1
> +
> +  compatible:

compatible goes first.

> +    enum:
> +      - brcm,bmips3300
> +      - brcm,bmips4350
> +      - brcm,bmips4380
> +      - brcm,bmips5000
> +      - brcm,bmips5200
> +      - ingenic,xburst-mxu1.0
> +      - ingenic,xburst-fpu1.0-mxu1.1
> +      - ingenic,xburst-fpu2.0-mxu2.0
> +      - loongson,gs264
> +      - mips,mips1004Kc
> +      - mips,m14Kc

Maybe keep alphabetical order?

> +      - mips,mips24KEc
> +      - mips,mips4KEc
> +      - mips,mips74Kc
> +      - mips,mips24Kc
> +      - mti,mips24KEc
> +      - mti,mips14KEc
> +      - mti,mips14Kc
> +      - mti,interaptiv
> +
> +if:

Out it in allOf block

> +  properties:
> +    compatible:
> +      enum:
> +        - brcm,bmips3300
> +        - brcm,bmips4350
> +        - brcm,bmips4380
> +        - brcm,bmips5000
> +        - brcm,bmips5200
> +then:
> +  patternProperties:
> +    mips-hpt-frequency:

It's not a pattern. Did you test the bindings?

> +      $ref: /schemas/types.yaml#/definitions/uint32

Missing description.

else mips-hpt-frequency: false

> +
> +required:
> +  - compatible
> +
> +additionalProperties: true

and this is why you did not notice errors...

> +
> +examples:
> +  - |
> +    cpus {
> +      #size-cells = <0>;
> +      #address-cells = <1>;
> +
> +      cpu@0 {
> +        device_type = "cpu";
> +        compatible = "mips,mips1004Kc";
> +        reg = <0>;
> +      };
> +
> +      cpu@1 {
> +        device_type = "cpu";
> +        compatible = "mips,mips1004Kc";
> +        reg = <1>;
> +      };
> +    };
> +
> +  - |
> +    // Example 2 (BMIPS CPU)
> +    cpus {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      mips-hpt-frequency = <150000000>;

Does not match your bindings. Are you sure you tested the patches?

> +
> +      cpu@0 {
> +        compatible = "brcm,bmips4350";
> +        device_type = "cpu";
> +        reg = <0>;
> +      };
> +
> +      cpu@1 {
> +        compatible = "brcm,bmips4350";
> +        device_type = "cpu";
> +        reg = <1>;
> +      };
> +    };


Best regards,
Krzysztof

  parent reply	other threads:[~2022-09-19 11:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17  4:11 [PATCH v2] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
2022-09-18 11:22 ` Thomas Bogendoerfer
2022-09-18 15:15   ` Sergio Paracuellos
2022-09-19 11:17 ` Krzysztof Kozlowski [this message]
2022-09-19 12:29   ` Sergio Paracuellos
2022-09-19 12:48     ` Krzysztof Kozlowski
2022-09-19 13:41       ` Sergio Paracuellos
2022-09-19 16:08         ` Krzysztof Kozlowski
2022-09-20  5:51           ` Sergio Paracuellos
2022-09-21  6:42             ` Krzysztof Kozlowski
2022-09-21  7:18               ` Sergio Paracuellos
2022-09-21  7:51                 ` Krzysztof Kozlowski
2022-09-21  8:11                   ` Sergio Paracuellos
2022-09-21 11:40                     ` Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=285f80ef-5f5c-e68d-b514-a3e3341841c5@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=arinc.unal@arinc9.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox