Message ID | 20230424123522.18302-10-nikita.shubin@maquefel.me |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2644542vqo; Mon, 24 Apr 2023 03:38:14 -0700 (PDT) X-Google-Smtp-Source: AKy350aJgbXYotD0HaMva1n7otsJ6gcQJy1EqEmyxHhDain1IDQlwzrBxd3bQMBEsslQhxWhtqLB X-Received: by 2002:a05:6a20:3d82:b0:ee:6dc9:e794 with SMTP id s2-20020a056a203d8200b000ee6dc9e794mr17061813pzi.56.1682332694019; Mon, 24 Apr 2023 03:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682332694; cv=none; d=google.com; s=arc-20160816; b=Ix5Q5jlmCly0qMEIfd9pdHeovzOq2APHcv/jopO+YOXZUw0pLqzmIiNKQTaencYSLb DwJhzQmKhdeuFB8kWGZyKhaLPpFLRR6GgoZWr4bo//fY+Vq12X2fSL8qdFjUIKK0DSQj zj0roUDEUR9K42uS4PkG/mQmr6RTI423UreuehB39WEWuS4rSTsDpTQgvlnpPwVWnTly SmuzMMz41jitwHSw/+TS6sWPgEF3kZYvqX7781buGAwob1PBXpoDLnn0OIfpt6XjQU5a bHq+HUUn1MCklljY0uSRSbO/yTGp7QraJFpfK+vkLmUXirQMK0wDVu3/PwvFBZkli3PV lbWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=2RREFI9NgYDsw84diD52pyQr0vgUs5EY6Rekcc3/M/0=; b=Wy/tEHgB2Z9799YVHvCjS5piA0vTEOYwJDSN3B9HAibJn9eBJdpNd4I5HQx2WZS8jD W5hty/z9NaThjS2PtqStOpP0LYRVBh0VHVvMf85nyPDx87Nmqf2qnvceBokEDOt9Qcm8 y9F1DbgsR74wXjcgfeXYBbl1NK3tUBBHuK6ypFZaairx+JxbUnXsU8Vm04dwegbyyTov m3+oRPwLX3i3Y/LxPJb++YUQPbFoQH1YhiSXSPPz64wiHxZmsQ4Zjc3gkrheTLpLdiuo 75LxLhcru4MqA0FJ+MvGo9013ImcSN4RSrvq5u6nORcPRXMPN6b7pyDaTsS7ex1KNui0 hkdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=NIQe9vf9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a626105000000b0063d2c18473dsi10907062pfb.133.2023.04.24.03.38.00; Mon, 24 Apr 2023 03:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=NIQe9vf9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbjDXKfM (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Mon, 24 Apr 2023 06:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbjDXKeq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Apr 2023 06:34:46 -0400 Received: from forward502c.mail.yandex.net (forward502c.mail.yandex.net [178.154.239.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E8391712; Mon, 24 Apr 2023 03:34:21 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward502c.mail.yandex.net (Yandex) with ESMTP id 5B0B55EC42; Mon, 24 Apr 2023 12:35:43 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-9lS57oD4; Mon, 24 Apr 2023 12:35:42 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328943; bh=2RREFI9NgYDsw84diD52pyQr0vgUs5EY6Rekcc3/M/0=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=NIQe9vf98zd3U2GZrjYkcEZGBmyA8SWIEWCNPgrh8QpRuO+zPNavaB/hZmYD/qOTk 5wGVZvlvJO+1J6s4maZZUuRIvPW5gC1YvxnraiZVpkow4Fb1WsKBHQhnWx6clvdbq1 f+6fF2uxjp1Pxk2tyCNG49DiOgDpCCy4YRkQWr+E= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin <nikita.shubin@maquefel.me> Cc: Arnd Bergmann <arnd@kernel.org>, Linus Walleij <linusw@kernel.org>, Alexander Sverdlin <alexander.sverdlin@gmail.com>, Wim Van Sebroeck <wim@linux-watchdog.org>, Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/43] dt-bindings: watchdog: add DT bindings for Cirrus EP93x Date: Mon, 24 Apr 2023 15:34:25 +0300 Message-Id: <20230424123522.18302-10-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764053686915490718?= X-GMAIL-MSGID: =?utf-8?q?1764053686915490718?= |
Series |
ep93xx device tree conversion
|
|
Commit Message
Nikita Shubin
April 24, 2023, 12:34 p.m. UTC
This adds device tree bindings for the Cirrus Logic EP93xx
watchdog block used in these SoCs.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
.../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml
Comments
On Mon, Apr 24, 2023 at 03:34:25PM +0300, Nikita Shubin wrote: > This adds device tree bindings for the Cirrus Logic EP93xx > watchdog block used in these SoCs. > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > --- > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > new file mode 100644 > index 000000000000..f39d6b14062d > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > @@ -0,0 +1,38 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic EP93xx Watchdog Timer > + > +maintainers: > + - Wim Van Sebroeck <wim@linux-watchdog.org> > + > +description: > + Watchdog driver for Cirrus Logic EP93xx family of devices. > + > +allOf: > + - $ref: "watchdog.yaml#" > + > +properties: > + compatible: > + enum: > + - cirrus,ep9301-wdt > + > + reg: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false The driver does support reading the timeout from devicetree. It might make sense to mention that here. > + > +examples: > + - | > + wdt0: watchdog@80940000 { > + compatible = "cirrus,ep9301-wdt"; > + reg = <0x80940000 0x08>; > + }; > + > -- > 2.39.2 >
On Mon, Apr 24, 2023 at 07:16:16AM -0700, Guenter Roeck wrote: > On Mon, Apr 24, 2023 at 03:34:25PM +0300, Nikita Shubin wrote: > > This adds device tree bindings for the Cirrus Logic EP93xx > > watchdog block used in these SoCs. > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > --- > > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++ > > 1 file changed, 38 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > > > diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > new file mode 100644 > > index 000000000000..f39d6b14062d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > @@ -0,0 +1,38 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Cirrus Logic EP93xx Watchdog Timer > > + > > +maintainers: > > + - Wim Van Sebroeck <wim@linux-watchdog.org> > > + > > +description: > > + Watchdog driver for Cirrus Logic EP93xx family of devices. > > + > > +allOf: > > + - $ref: "watchdog.yaml#" > > + > > +properties: > > + compatible: > > + enum: > > + - cirrus,ep9301-wdt > > + > > + reg: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + > > +additionalProperties: false > > The driver does support reading the timeout from devicetree. > It might make sense to mention that here. > Never mind - I guess that is includeds in watchdog.yaml. Sorry for the noise. > > + > > +examples: > > + - | > > + wdt0: watchdog@80940000 { > > + compatible = "cirrus,ep9301-wdt"; > > + reg = <0x80940000 0x08>; > > + }; > > + > > -- > > 2.39.2 > >
On Mon, Apr 24, 2023 at 07:18:06AM -0700, Guenter Roeck wrote: > On Mon, Apr 24, 2023 at 07:16:16AM -0700, Guenter Roeck wrote: > > On Mon, Apr 24, 2023 at 03:34:25PM +0300, Nikita Shubin wrote: > > > This adds device tree bindings for the Cirrus Logic EP93xx > > > watchdog block used in these SoCs. > > > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > > --- > > > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++ > > > 1 file changed, 38 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > > new file mode 100644 > > > index 000000000000..f39d6b14062d > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > > @@ -0,0 +1,38 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Cirrus Logic EP93xx Watchdog Timer > > > + > > > +maintainers: > > > + - Wim Van Sebroeck <wim@linux-watchdog.org> > > > + > > > +description: > > > + Watchdog driver for Cirrus Logic EP93xx family of devices. > > > + > > > +allOf: > > > + - $ref: "watchdog.yaml#" > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - cirrus,ep9301-wdt > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + > > > +additionalProperties: false > > > > The driver does support reading the timeout from devicetree. > > It might make sense to mention that here. > > > Never mind - I guess that is includeds in watchdog.yaml. > Sorry for the noise. Except that it needs to be 'unevaluatedProperties: false' instead if timeout property is supported. > > > > + > > > +examples: > > > + - | > > > + wdt0: watchdog@80940000 { > > > + compatible = "cirrus,ep9301-wdt"; > > > + reg = <0x80940000 0x08>; > > > + }; > > > + > > > -- > > > 2.39.2 > > >
On 24/04/2023 14:34, Nikita Shubin wrote: > This adds device tree bindings for the Cirrus Logic EP93xx > watchdog block used in these SoCs. > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > --- > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > new file mode 100644 > index 000000000000..f39d6b14062d > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > @@ -0,0 +1,38 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic EP93xx Watchdog Timer EP93xx is no EP9301. This does not match your compatible list. You should probably list all of your devices. With or without compatibility between them (so with a generic fallback for example). > + > +maintainers: > + - Wim Van Sebroeck <wim@linux-watchdog.org> > + > +description: > + Watchdog driver for Cirrus Logic EP93xx family of devices. Drop "driver for" and instead describe the hardware. > + > +allOf: > + - $ref: "watchdog.yaml#" Drop quotes. Best regards, Krzysztof
On 28/04/2023 16:33, Nikita Shubin wrote: > Hello Krzysztof! > > On Tue, 2023-04-25 at 11:31 +0200, Krzysztof Kozlowski wrote: >> On 24/04/2023 14:34, Nikita Shubin wrote: >>> This adds device tree bindings for the Cirrus Logic EP93xx >>> watchdog block used in these SoCs. >>> >>> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> >>> --- >>> .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 >>> +++++++++++++++++++ >>> 1 file changed, 38 insertions(+) >>> create mode 100644 >>> Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml >>> >>> diff --git >>> a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml >>> b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml >>> new file mode 100644 >>> index 000000000000..f39d6b14062d >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- >>> wdt.yaml >>> @@ -0,0 +1,38 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: >>> http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Cirrus Logic EP93xx Watchdog Timer >> >> EP93xx is no EP9301. This does not match your compatible list. You >> should probably list all of your devices. With or without >> compatibility >> between them (so with a generic fallback for example). > > I will rename file to cirrus,ep9301-wdt.yaml, all ep93xx SoC family has > the same watchdog, so there is now reason for other compatible i think. You should always have dedicated compatibles, even if using one fallback. https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42 Best regards, Krzysztof
Hello Krzysztof! On Tue, 2023-04-25 at 11:31 +0200, Krzysztof Kozlowski wrote: > On 24/04/2023 14:34, Nikita Shubin wrote: > > This adds device tree bindings for the Cirrus Logic EP93xx > > watchdog block used in these SoCs. > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > --- > > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 > > +++++++++++++++++++ > > 1 file changed, 38 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml > > new file mode 100644 > > index 000000000000..f39d6b14062d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- > > wdt.yaml > > @@ -0,0 +1,38 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: > > http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Cirrus Logic EP93xx Watchdog Timer > > EP93xx is no EP9301. This does not match your compatible list. You > should probably list all of your devices. With or without > compatibility > between them (so with a generic fallback for example). I will rename file to cirrus,ep9301-wdt.yaml, all ep93xx SoC family has the same watchdog, so there is now reason for other compatible i think. > > > + > > +maintainers: > > + - Wim Van Sebroeck <wim@linux-watchdog.org> > > + > > +description: > > + Watchdog driver for Cirrus Logic EP93xx family of devices. > > Drop "driver for" and instead describe the hardware. > > > + > > +allOf: > > + - $ref: "watchdog.yaml#" > > Drop quotes. > Best regards, > Krzysztof >
On Fri, 2023-04-28 at 14:20 +0200, Krzysztof Kozlowski wrote: > On 28/04/2023 16:33, Nikita Shubin wrote: > > Hello Krzysztof! > > > > On Tue, 2023-04-25 at 11:31 +0200, Krzysztof Kozlowski wrote: > > > On 24/04/2023 14:34, Nikita Shubin wrote: > > > > This adds device tree bindings for the Cirrus Logic EP93xx > > > > watchdog block used in these SoCs. > > > > > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > > > --- > > > > .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 > > > > +++++++++++++++++++ > > > > 1 file changed, 38 insertions(+) > > > > create mode 100644 > > > > Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- > > > > wdt.yaml > > > > > > > > diff --git > > > > a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- > > > > wdt.yaml > > > > b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- > > > > wdt.yaml > > > > new file mode 100644 > > > > index 000000000000..f39d6b14062d > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- > > > > wdt.yaml > > > > @@ -0,0 +1,38 @@ > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > +%YAML 1.2 > > > > +--- > > > > +$id: > > > > http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > > + > > > > +title: Cirrus Logic EP93xx Watchdog Timer > > > > > > EP93xx is no EP9301. This does not match your compatible list. > > > You > > > should probably list all of your devices. With or without > > > compatibility > > > between them (so with a generic fallback for example). > > > > I will rename file to cirrus,ep9301-wdt.yaml, all ep93xx SoC family > > has > > the same watchdog, so there is now reason for other compatible i > > think. > > You should always have dedicated compatibles, even if using one > fallback. > https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42 Krzysztof, sorry to bother you - but i don't quite get, what we should have in compatibles ? Should i make an additional fallback compatible like "cirrus,ep-wdt" and then "compatible" will look like: properties: compatible: - items: - enum: - cirrus,ep9301-wdt - const: cirrus,ep-wdt Or should i describe every ep93xx SoC variant like: properties: compatible: - items: - enum: - cirrus,ep9302-wdt - cirrus,ep9307-wdt - cirrus,ep9312-wdt - cirrus,ep9315-wdt - const: cirrus,ep9301-wdt There are ep9301, ep9302, ep9307, ep9312 and ep9315 SoC variants - all have the same watchdog and rtc implementation without any difference at all. If on of this is true does the same applies to ep9301-rtc and any other variants where we do have a single compatible ? > > Best regards, > Krzysztof >
On 28/04/2023 19:42, Nikita Shubin wrote: > On Fri, 2023-04-28 at 14:20 +0200, Krzysztof Kozlowski wrote: >> On 28/04/2023 16:33, Nikita Shubin wrote: >>> Hello Krzysztof! >>> >>> On Tue, 2023-04-25 at 11:31 +0200, Krzysztof Kozlowski wrote: >>>> On 24/04/2023 14:34, Nikita Shubin wrote: >>>>> This adds device tree bindings for the Cirrus Logic EP93xx >>>>> watchdog block used in these SoCs. >>>>> >>>>> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> >>>>> --- >>>>> .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 >>>>> +++++++++++++++++++ >>>>> 1 file changed, 38 insertions(+) >>>>> create mode 100644 >>>>> Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- >>>>> wdt.yaml >>>>> >>>>> diff --git >>>>> a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- >>>>> wdt.yaml >>>>> b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- >>>>> wdt.yaml >>>>> new file mode 100644 >>>>> index 000000000000..f39d6b14062d >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx- >>>>> wdt.yaml >>>>> @@ -0,0 +1,38 @@ >>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: >>>>> http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>> + >>>>> +title: Cirrus Logic EP93xx Watchdog Timer >>>> >>>> EP93xx is no EP9301. This does not match your compatible list. >>>> You >>>> should probably list all of your devices. With or without >>>> compatibility >>>> between them (so with a generic fallback for example). >>> >>> I will rename file to cirrus,ep9301-wdt.yaml, all ep93xx SoC family >>> has >>> the same watchdog, so there is now reason for other compatible i >>> think. >> >> You should always have dedicated compatibles, even if using one >> fallback. >> https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42 > > Krzysztof, sorry to bother you - but i don't quite get, what we should > have in compatibles ? > > Should i make an additional fallback compatible like "cirrus,ep-wdt" > and then "compatible" will look like: > > properties: > compatible: > - items: > - enum: > - cirrus,ep9301-wdt > - const: cirrus,ep-wdt > > Or should i describe every ep93xx SoC variant like: > > properties: > compatible: > - items: > - enum: > - cirrus,ep9302-wdt > - cirrus,ep9307-wdt > - cirrus,ep9312-wdt > - cirrus,ep9315-wdt > - const: cirrus,ep9301-wdt This one is preferred. Just don't forget for an entry allowing 9301 alone (and everything within oneOf) Syntax looks like: https://elixir.bootlin.com/linux/v6.3-rc6/source/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml#L31 > > There are ep9301, ep9302, ep9307, ep9312 and ep9315 SoC variants - all > have the same watchdog and rtc implementation without any difference at > all. We still prefer to have dedicated compatible, in case some bugs/differences are found. > > If on of this is true does the same applies to ep9301-rtc and any other > variants where we do have a single compatible ? Yes, please. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml new file mode 100644 index 000000000000..f39d6b14062d --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic EP93xx Watchdog Timer + +maintainers: + - Wim Van Sebroeck <wim@linux-watchdog.org> + +description: + Watchdog driver for Cirrus Logic EP93xx family of devices. + +allOf: + - $ref: "watchdog.yaml#" + +properties: + compatible: + enum: + - cirrus,ep9301-wdt + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + wdt0: watchdog@80940000 { + compatible = "cirrus,ep9301-wdt"; + reg = <0x80940000 0x08>; + }; +