mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Matthew Gerlach <matthew.gerlach@altera.com>
Cc: krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: edac: altera-s10: Convert to YAML
Date: Fri, 21 Mar 2025 16:05:02 -0500	[thread overview]
Message-ID: <20250321210502.GA3912181-robh@kernel.org> (raw)
In-Reply-To: <20250321153109.8362-1-matthew.gerlach@altera.com>

On Fri, Mar 21, 2025 at 08:31:09AM -0700, Matthew Gerlach wrote:
> Convert the device tree bindings for the Altera Stratix10 SoCFPGA ECC
> Manager from text to yaml.
> 
> Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
> ---
> v2:
>  - Fix $id: path.
>  - Remove unneeded '|'.
>  - Move vendor properties last (but before child nodes).
>  - Add appropriate blank lines.
>  - Don't break ABI.
>  - Avoid changing existing DTSI and DTS.
> ---
>  .../edac/altr,socfpga-s10-ecc-manager.yaml    | 280 ++++++++++++++++++
>  .../bindings/edac/socfpga-eccmgr.txt          | 150 ----------
>  MAINTAINERS                                   |   5 +
>  3 files changed, 285 insertions(+), 150 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/edac/altr,socfpga-s10-ecc-manager.yaml
> 
> diff --git a/Documentation/devicetree/bindings/edac/altr,socfpga-s10-ecc-manager.yaml b/Documentation/devicetree/bindings/edac/altr,socfpga-s10-ecc-manager.yaml
> new file mode 100644
> index 000000000000..a908bb4df60f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/edac/altr,socfpga-s10-ecc-manager.yaml
> @@ -0,0 +1,280 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (C) 2025 Altera Corporation
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/edac/altr,socfpga-s10-ecc-manager.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Altera Stratix10 SoCFPGA ECC Manager (ARM64)
> +
> +maintainers:
> +  - Matthew Gerlach <matthew.gerlach@altera.com
> +
> +description:
> +  The Stratix10 implementation of the SoCFPGA ECC Manager counts and corrects
> +  single bit errors. Double bit errors are treated as SErrors in ARM64. This
> +  implementation requires access to registers only available to the Secure
> +  Device Manager (SDM) via Secure Monitor Calls (SMC).
> +
> +properties:
> +
> +  compatible:
> +    $ref: /schemas/types.yaml#/definitions/string-array

compatible already has a type, drop this. Elsewhere too.

> +    description: list of compatibles

Don't need generic descriptions. Drop.

> +    items:
> +      - const: altr,socfpga-s10-ecc-manager
> +      - const: altr,socfpga-a10-ecc-manager

This doesn't work for socfpga_arria10.dtsi. You need:

oneOf:
  - items:
      - const: altr,socfpga-s10-ecc-manager
      - const: altr,socfpga-a10-ecc-manager
  - const: altr,socfpga-a10-ecc-manager

Make sure the other compatibles pass validation too.

> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  ranges: true
> +
> +  altr,sysmgr-syscon:
> +    maxItems: 1

       $ref: /schemas/types.yaml#/definitions/phandle

And a description of what this is for.

> +
> +  sdramedac:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        const: altr,sdram-edac-s10
> +
> +      interrupts:
> +        maxItems: 1
> +
> +      altr,sdr-syscon:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to SDRAM parent
> +
> +    required:
> +      - compatible
> +      - interrupts
> +      - altr,sdr-syscon
> +
> +  ocram-ecc@ff8cc000:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description: list of compatibles
> +        items:
> +          - const: altr,socfpga-s10-ocram-ecc
> +          - const: altr,socfpga-a10-ocram-ecc
> +
> +      reg:
> +        maxItems: 1
> +
> +      interrupts:
> +        maxItems: 1
> +
> +      altr,ecc-parent:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to OCRAM parent
> +
> +    required:
> +      - compatible
> +      - reg
> +      - interrupts
> +      - altr,ecc-parent
> +
> +  usb0-ecc@ff8c4000:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description: list of compatibles
> +        items:
> +          - const: altr,socfpga-s10-usb-ecc
> +          - const: altr,socfpga-usb-ecc
> +
> +      reg:
> +        maxItems: 1
 > +
> +      interrupts:
> +        maxItems: 1
> +
> +      altr,ecc-parent:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to USB parent
> +
> +    required:
> +      - compatible
> +      - reg
> +      - interrupts
> +      - altr,ecc-parent
> +
> +  emac0-rx-ecc@ff8c0000:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description: list of compatibles
> +        items:
> +          - const: altr,socfpga-s10-eth-mac-ecc
> +          - const: altr,socfpga-eth-mac-ecc
> +
> +      reg:
> +        maxItems: 1
> +
> +      interrupts:
> +        maxItems: 1
> +
> +      altr,ecc-parent:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to ethernet parent
> +
> +    required:
> +      - compatible
> +      - reg
> +      - interrupts
> +      - altr,ecc-parent
> +
> +  emac0-tx-ecc@ff8c0400:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description: list of compatibles
> +        items:
> +          - const: altr,socfpga-s10-eth-mac-ecc
> +          - const: altr,socfpga-eth-mac-ecc
> +
> +      reg:
> +        maxItems: 1
> +
> +      interrupts:
> +        maxItems: 1
> +
> +      altr,ecc-parent:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to ethernet parent
> +
> +    required:
> +      - compatible
> +      - reg
> +      - interrupts
> +      - altr,ecc-parent
> +
> +  sdmmca-ecc@ff8c8c00:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description: list of compatibles
> +        items:
> +          - const: altr,socfpga-s10-sdmmc-ecc
> +          - const: altr,socfpga-sdmmc-ecc
> +
> +      reg:
> +        maxItems: 1
> +
> +      interrupts:
> +        maxItems: 2
> +
> +      altr,ecc-parent:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to ethernet parent

SD/MMC parent?

Rob

      reply	other threads:[~2025-03-21 21:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 15:31 Matthew Gerlach
2025-03-21 21:05 ` Rob Herring [this message]

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=20250321210502.GA3912181-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.gerlach@altera.com \
    /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

all inboxes | Powered by JetHome®