All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Nikita Bondarenko <n2h9z4@gmail.com>
Cc: wim@linux-watchdog.org, linux@roeck-us.net,
	krzysztof.kozlowski+dt@linaro.org, f.fainelli@gmail.com,
	rjui@broadcom.com, sbranden@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com,
	linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] dt-bindings: watchdog: brcm,kona-wdt: convert txt file to yaml
Date: Fri, 21 Apr 2023 13:34:20 -0500	[thread overview]
Message-ID: <20230421183420.GA1568047-robh@kernel.org> (raw)
In-Reply-To: <20230418170341.28805-1-n2h9z4@gmail.com>

On Tue, Apr 18, 2023 at 07:03:41PM +0200, Nikita Bondarenko wrote:
> Converted txt file to yaml. No additional changes.
> 
> Signed-off-by: Nikita Bondarenko <n2h9z4@gmail.com>
> ---
> 
> Changes in v3:
> - updated commit message
> - updated the compatible definition to probably fix "compatible is too long" warning
> - updated example to how it was in the txt file
> 
> 
> I do not have this warning when I am running  
> make  DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dt_binding_check
> maybe I run it without some additional variable?
> 
> But I checked arch/arm/boot/dts/bcm28155-ap.dts, it includes bcm11351.dtsiv which contains 
> compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> which probably causes a warning
> This is exact how it was in txt file example.
> 
> If I put it in an example in a yaml file, dt_binding_check does not pass.
> Looks like the issue is in the enum type of compatible. It does not allow multiple strings.  
> Updated to not to use enum. The example with two strings in compatible passes the checks.
> 
> make  DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dt_binding_check
>   LINT    Documentation/devicetree/bindings
>   CHKDT   Documentation/devicetree/bindings/processed-schema.json
>   SCHEMA  Documentation/devicetree/bindings/processed-schema.json
>   DTEX    Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dts
>   DTC_CHK Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dtb
> 
> make  DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dtbs_check
>   LINT    Documentation/devicetree/bindings
>   CHKDT   Documentation/devicetree/bindings/processed-schema.json
>   SCHEMA  Documentation/devicetree/bindings/processed-schema.json

And that's it? You need to remove all the .dtb files if you don't see 
any DTB lines. But this runs it for you:

https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230418170341.28805-1-n2h9z4@gmail.com/

It all looks fine, so not sure what your question/issue is?

> 
> 
> v2 patch is here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230402135555.62507-1-n2h9z4@gmail.com/
> 
>  .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
>  .../bindings/watchdog/brcm,kona-wdt.yaml      | 41 +++++++++++++++++++
>  2 files changed, 41 insertions(+), 15 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
> deleted file mode 100644
> index 2b86a00e351d..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -Broadcom Kona Family Watchdog Timer
> ------------------------------------
> -
> -This watchdog timer is used in the following Broadcom SoCs:
> -  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
> -
> -Required properties:
> -  - compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> -  - reg: memory address & range
> -
> -Example:
> -	watchdog@35002f40 {
> -		compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> -		reg = <0x35002f40 0x6c>;
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> new file mode 100644
> index 000000000000..3d4403b41cbe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/brcm,kona-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom Kona Family Watchdog Timer
> +
> +description: |
> +  This watchdog timer is used in the following Broadcom SoCs:
> +  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
> +
> +maintainers:
> +  - Florian Fainelli <f.fainelli@gmail.com>
> +  - Ray Jui <rjui@broadcom.com>
> +  - Scott Branden <sbranden@broadcom.com>
> +
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: brcm,bcm11351-wdt
> +      - const: brcm,kona-wdt
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog@35002f40 {
> +        compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> +        reg = <0x35002f40 0x6c>;
> +    };
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-04-21 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 17:03 [PATCH v3] dt-bindings: watchdog: brcm,kona-wdt: convert txt file to yaml Nikita Bondarenko
2023-04-21 18:34 ` Rob Herring [this message]
2023-04-24 16:53   ` Nikita B
2023-06-30 17:16 ` Rob Herring

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=20230421183420.GA1568047-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=n2h9z4@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=wim@linux-watchdog.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.