Re: [RFC PATCH v3 10/37] dt-bindings: kalray: Add CPU bindings for Kalray kvx

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

 



On Mon, Jul 22, 2024 at 11:41:21AM +0200, ysionneau@xxxxxxxxxxxxx wrote:
> From: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
> 
> Add Kalray kvx CPU bindings.
> 
> Signed-off-by: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
> ---
> 
> Notes:
> 
> V2 -> V3: New patch
> ---
>  .../devicetree/bindings/kalray/cpus.yaml      | 105 ++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/kalray/cpus.yaml
> 
> diff --git a/Documentation/devicetree/bindings/kalray/cpus.yaml b/Documentation/devicetree/bindings/kalray/cpus.yaml
> new file mode 100644
> index 0000000000000..cdf1f10573da7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/kalray/cpus.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/kalray/cpus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Kalray CPUs
> +
> +maintainers:
> +  - Jonathan Borne <jborne@xxxxxxxxxxxxx>
> +  - Julian Vetter <jvetter@xxxxxxxxxxxxx>
> +  - Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
> +
> +allOf:
> +  - $ref: /schemas/cpu.yaml#
> +
> +properties:
> +  reg:
> +    maxItems: 1
> +    description: |

Don't need '|' if no formatting.

> +      Contains the CPU number.

Ideally this is tied to something in the h/w and not just made up. If 
so, detail that here.

> +
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: kalray,kv3-1-pe
> +          - const: kalray,kv3-pe

What's the difference between these 2?

> +
> +  clocks:
> +    maxItems: 1
> +
> +  enable-method:
> +    const: "kalray,coolidge-pwr-ctrl"

Why is this needed if there's only 1 possible option?

It doesn't need quotes either.

> +
> +  interrupt-controller:
> +    type: object
> +    additionalProperties: false
> +    description: Describes the CPU's local interrupt controller
> +
> +    properties:
> +      '#interrupt-cells':
> +        const: 1
> +
> +      compatible:
> +        const: kalray,kv3-1-intc
> +
> +      interrupt-controller: true
> +
> +      '#address-cells':
> +        const: 0
> +
> +    required:
> +      - compatible
> +      - '#interrupt-cells'
> +      - '#address-cells'
> +      - interrupt-controller
> +
> +if:
> +  properties:
> +    reg:
> +      const: 0
> +then:
> +  required:
> +    - clocks
> +
> +required:
> +  - reg
> +  - compatible
> +  - interrupt-controller
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +
> +    cpus {
> +        #size-cells = <0>;
> +        #address-cells = <1>;
> +
> +       cpu@0 {
> +         compatible = "kalray,kv3-1-pe";
> +         device_type = "cpu";
> +         reg = <0>;
> +         clocks = <&core_clk>;
> +         cpu_intc0: interrupt-controller {
> +           compatible = "kalray,kv3-1-intc";
> +           #interrupt-cells = <1>;
> +           #address-cells = <0>;
> +           interrupt-controller;
> +         };
> +       };
> +
> +

One blank line.

> +       cpu@1 {
> +         compatible = "kalray,kv3-1-pe";
> +         device_type = "cpu";
> +         reg = <1>;
> +         cpu_intc1: interrupt-controller {
> +           compatible = "kalray,kv3-1-intc";
> +           #interrupt-cells = <1>;
> +           #address-cells = <0>;
> +           interrupt-controller;
> +         };
> +       };
> +    };
> -- 
> 2.45.2
> 
> 
> 
> 
> 




[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