Message ID | 20230601054549.10843-7-nikita.shubin@maquefel.me |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp71575vqr; Wed, 31 May 2023 22:48:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BWmEtwCeemCT3Nm/AAxeK3yT+ZdKIKkMPyXrIhJAk1NJU/v2gHRJnxSeEk0iyO/shZAgZ X-Received: by 2002:a05:622a:1487:b0:3f6:9106:c1c8 with SMTP id t7-20020a05622a148700b003f69106c1c8mr9207989qtx.30.1685598512368; Wed, 31 May 2023 22:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685598512; cv=none; d=google.com; s=arc-20160816; b=vFw21SMz0DygqobzCAe8F7azyrll9fxmIzipYHPnm9PbbouV3zsfCRXApAtu68o5+6 nFXEnk9YO2kMx8FYVSwCbz8c8OA3eqn9BfFXscjhlUBKxi9lRpy8M+MaDmp2tcLYfAXd rlwGYkA8+ZgycMHY5Ekr33A8AhmhFZmlt9UNbak+uhs/YHIIreAlQqbUzD/Ci2nBH6QO EVp7Nv0eazbhWYq2fcgzTB6ecYLSd3ofY+DsLJc8nDdWUkfRm8rO7aoFpnzWTvXBBzg2 tCKvoRKaWP0UIWAESAAkXog4kwzrshlLPLNPR6AWWVtTw5jLfc+Faon10j9aXY2aYSfA vqgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8cV6gUYwDgcHjvA3y2Zr+z89V1euSyhB5rUH846uBY4=; b=fzFwG6kefh+g+IknxAGv/EwB5qCtGSHidFqORUFAN91AyK+FM6Occ26zHEdm9aDhR8 Ho48/ThXmelf+gDQNqbIjZUw4IWgV43SIi1iycDW+iAzjySYhwLKkzBKqECs1N827Hxg RgvgyQTc/YQQoZKGUmXko44Zwf+EkbwulbJ+4YzN4xtELZMCKZZXdrgf/90q0vNCXoKT OK51t/vF+RUhk3a6xoerq2Npx8h+1Gy62TkiOpWGKZHgVm7zTF2Y2ohkj5SKFR3klJFk MjMu7wuqmm0kaCaUDxFGWiKCS0Taf3a05PXz/0D1OPe9oy9hjstm1/NYuMLTvV6g3Gm1 7Xvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=Dzlzl22C; 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 a21-20020a63e855000000b0053fcc7aaa03si2277153pgk.805.2023.05.31.22.48.18; Wed, 31 May 2023 22:48:32 -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=pass header.i=@maquefel.me header.s=mail header.b=Dzlzl22C; 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 S231268AbjFAFqz (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 01:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbjFAFqi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 01:46:38 -0400 X-Greylist: delayed 584 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 31 May 2023 22:46:17 PDT Received: from forward103a.mail.yandex.net (forward103a.mail.yandex.net [178.154.239.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D37F184; Wed, 31 May 2023 22:46:16 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:5e51:0:640:23ee:0]) by forward103a.mail.yandex.net (Yandex) with ESMTP id C3C9046C75; Thu, 1 Jun 2023 08:46:12 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id pjGDMhnDduQ0-sAsX6ddU; Thu, 01 Jun 2023 08:46:12 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1685598372; bh=8cV6gUYwDgcHjvA3y2Zr+z89V1euSyhB5rUH846uBY4=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=Dzlzl22CiudVvU1ZfRV7h+YBUhaKNBYpqBV82sTUXSptEdDpiHqn15Vsk3xPNN60T PX5TJGg0sf1dxiET7qtEta6qcEyJtGQwTRI45Chcv9ucJcGCh3raLpqlD9YF+T05QE J+UIbCQ4wTbuy19ujfm2OKY8t+6QaxXYcFRgJS5I= Authentication-Results: mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin <nikita.shubin@maquefel.me> To: Alexander Sverdlin <alexander.sverdlin@gmail.com>, Arnd Bergmann <arnd@arndb.de>, Linus Walleij <linus.walleij@linaro.org>, Damien Le Moal <dlemoal@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: Nikita Shubin <nikita.shubin@maquefel.me>, Michael Peters <mpeters@embeddedTS.com>, Kris Bahnsen <kris@embeddedTS.com>, linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx Date: Thu, 1 Jun 2023 08:45:30 +0300 Message-Id: <20230601054549.10843-7-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 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,RCVD_IN_DNSWL_NONE, 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 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?1767478145962955601?= X-GMAIL-MSGID: =?utf-8?q?1767478145962955601?= |
Series |
None
|
|
Commit Message
Nikita Shubin
June 1, 2023, 5:45 a.m. UTC
Add YAML bindings for ep93xx SoC PATA.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- renamed file to ep9312-pata
- changed email to dlemoal@kernel.org
- dropped label
- fixed ident
.../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
Comments
On 6/1/23 14:45, Nikita Shubin wrote: > Add YAML bindings for ep93xx SoC PATA. > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > --- > > Notes: > v0 -> v1: > > - renamed file to ep9312-pata Looks OK to me but given that this is both for the cirrus,ep9315-pata and cirrus,ep9312-pata, wouldn't it be better to name the file cirrus,ep931x-pata.yaml ? > - changed email to dlemoal@kernel.org > - dropped label > - fixed ident > > .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++ > 1 file changed, 44 insertions(+) > create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > new file mode 100644 > index 000000000000..3489be55a6fe > --- /dev/null > +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic EP9312 PATA controller > + > +maintainers: > + - Damien Le Moal <dlemoal@kernel.org> > + > +properties: > + compatible: > + oneOf: > + - const: cirrus,ep9312-pata I am not a DT specialist, but isn't this line superfluous since it is listed in the items ? > + - items: > + - const: cirrus,ep9315-pata > + - const: cirrus,ep9312-pata > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + ide@800a0000 { > + compatible = "cirrus,ep9312-pata"; > + reg = <0x800a0000 0x38>; > + interrupt-parent = <&vic1>; > + interrupts = <8>; > + pinctrl-names = "default"; > + pinctrl-0 = <&ide_default_pins>; > + }; > + > +...
Hello Damien! On Fri, 2023-06-02 at 08:57 +0900, Damien Le Moal wrote: > On 6/1/23 14:45, Nikita Shubin wrote: > > Add YAML bindings for ep93xx SoC PATA. > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > --- > > > > Notes: > > v0 -> v1: > > > > - renamed file to ep9312-pata > > Looks OK to me but given that this is both for the cirrus,ep9315-pata > and > cirrus,ep9312-pata, wouldn't it be better to name the file > cirrus,ep931x-pata.yaml ? I was advised against using wildcards by Arnd and Krzysztof. See https://lore.kernel.org/all/c981e048-8925-deba-6916-9199844976b9@linaro.org/ As i understood we should have at least one fallback, in out case it's "cirrus,ep9312-pata" and one for each SoC variant that supports it. All other comments acknowledged and agreed. I will also change ``` >> + if (!drv_data) >> + return -ENXIO; ``` To ENOMEM, as a part of dt conversion patch in v2. > > > > - changed email to dlemoal@kernel.org > > - dropped label > > - fixed ident > > > > .../bindings/ata/cirrus,ep9312-pata.yaml | 44 > > +++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > > > diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312- > > pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312- > > pata.yaml > > new file mode 100644 > > index 000000000000..3489be55a6fe > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > @@ -0,0 +1,44 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Cirrus Logic EP9312 PATA controller > > + > > +maintainers: > > + - Damien Le Moal <dlemoal@kernel.org> > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: cirrus,ep9312-pata > > I am not a DT specialist, but isn't this line superfluous since it is > listed in > the items ? > > > + - items: > > + - const: cirrus,ep9315-pata > > + - const: cirrus,ep9312-pata > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + ide@800a0000 { > > + compatible = "cirrus,ep9312-pata"; > > + reg = <0x800a0000 0x38>; > > + interrupt-parent = <&vic1>; > > + interrupts = <8>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&ide_default_pins>; > > + }; > > + > > +... >
On Fri, Jun 02, 2023 at 08:57:37AM +0900, Damien Le Moal wrote: > On 6/1/23 14:45, Nikita Shubin wrote: > > Add YAML bindings for ep93xx SoC PATA. > > > > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> > > --- > > > > Notes: > > v0 -> v1: > > > > - renamed file to ep9312-pata > > Looks OK to me but given that this is both for the cirrus,ep9315-pata and > cirrus,ep9312-pata, wouldn't it be better to name the file > cirrus,ep931x-pata.yaml ? cirrus,ep9312-pata makes sense given that is the common fallback. Wildcards are okay in filenames (only) when there's not a common fallback. > > - changed email to dlemoal@kernel.org > > - dropped label > > - fixed ident > > > > .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > > > diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > new file mode 100644 > > index 000000000000..3489be55a6fe > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml > > @@ -0,0 +1,44 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Cirrus Logic EP9312 PATA controller > > + > > +maintainers: > > + - Damien Le Moal <dlemoal@kernel.org> > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: cirrus,ep9312-pata > > I am not a DT specialist, but isn't this line superfluous since it is listed in > the items ? No, this entry is for ep9312. The next entry is for ep9315 which is compatible with ep9312 version. The cirrus,ep9315-pata is there in case a distinction (e.g. quirk/errata) needs to be made by the driver without having to change the DT. Rob > > > + - items: > > + - const: cirrus,ep9315-pata > > + - const: cirrus,ep9312-pata
On 6/15/23 04:00, Rob Herring wrote: > On Fri, Jun 02, 2023 at 08:57:37AM +0900, Damien Le Moal wrote: >> On 6/1/23 14:45, Nikita Shubin wrote: >>> Add YAML bindings for ep93xx SoC PATA. >>> >>> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> >>> --- >>> >>> Notes: >>> v0 -> v1: >>> >>> - renamed file to ep9312-pata >> >> Looks OK to me but given that this is both for the cirrus,ep9315-pata and >> cirrus,ep9312-pata, wouldn't it be better to name the file >> cirrus,ep931x-pata.yaml ? > > cirrus,ep9312-pata makes sense given that is the common fallback. > > Wildcards are okay in filenames (only) when there's not a common > fallback. Got it. > >>> - changed email to dlemoal@kernel.org >>> - dropped label >>> - fixed ident >>> >>> .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++ >>> 1 file changed, 44 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml >>> new file mode 100644 >>> index 000000000000..3489be55a6fe >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml >>> @@ -0,0 +1,44 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Cirrus Logic EP9312 PATA controller >>> + >>> +maintainers: >>> + - Damien Le Moal <dlemoal@kernel.org> >>> + >>> +properties: >>> + compatible: >>> + oneOf: >>> + - const: cirrus,ep9312-pata >> >> I am not a DT specialist, but isn't this line superfluous since it is listed in >> the items ? > > No, this entry is for ep9312. The next entry is for ep9315 which is > compatible with ep9312 version. The cirrus,ep9315-pata is there in case > a distinction (e.g. quirk/errata) needs to be made by the driver > without having to change the DT. Thanks for all the clarification. Looks good then. Acked-by: Damien Le Moal <dlemoal@kernel.org> I can take this patch through the ata tree, but it may be better to have it with the entire series (arm tree ?)
diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml new file mode 100644 index 000000000000..3489be55a6fe --- /dev/null +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic EP9312 PATA controller + +maintainers: + - Damien Le Moal <dlemoal@kernel.org> + +properties: + compatible: + oneOf: + - const: cirrus,ep9312-pata + - items: + - const: cirrus,ep9315-pata + - const: cirrus,ep9312-pata + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + ide@800a0000 { + compatible = "cirrus,ep9312-pata"; + reg = <0x800a0000 0x38>; + interrupt-parent = <&vic1>; + interrupts = <8>; + pinctrl-names = "default"; + pinctrl-0 = <&ide_default_pins>; + }; + +...