From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A72DFC43460 for ; Wed, 14 Apr 2021 22:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82EAD6115C for ; Wed, 14 Apr 2021 22:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231502AbhDNWQT (ORCPT ); Wed, 14 Apr 2021 18:16:19 -0400 Received: from mail-ot1-f50.google.com ([209.85.210.50]:34574 "EHLO mail-ot1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231190AbhDNWQR (ORCPT ); Wed, 14 Apr 2021 18:16:17 -0400 Received: by mail-ot1-f50.google.com with SMTP id k14-20020a9d7dce0000b02901b866632f29so20817285otn.1; Wed, 14 Apr 2021 15:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F07gtHUJwY/w7iuYzdTNfY1HnMAu4hugjUa0Lgoy7/U=; b=NsJMRPRosVt9CSm4SZ3LQE3Znv1fU6h3h2NsIbySrrlTBEu6s29AL7n6u57KrQ6VzJ Yo+0ApRlF1Wmq35IzeQbgNSqMs0vBS90BjZcWctwOL2fKq4VJvgyICbwUa1kNsAgSEyd MKI8ev31WxSpnT+UuKA5CmBnYOr5AWMMuvJ4yh2Mbb/Xt7mx2VIztLa6rxxhSCYiJYh/ cEWukY0RAA0KYZWeS4O5W2ltp43j8pKvgCuuAR2QJs/WgJIkgqsvXAnbfj0eZV/3el1L 39qhGy8XbAS1QFjJTsgxDkCdIXtzKGRsBYHJy5OH0KYpBHumS0JL7YbQvTG/j9B7dmrt wybA== X-Gm-Message-State: AOAM531F/yjwkSnznJOcQhgqNotqfdLtW1u7DohsH8z6VOQFrmaVJpor XNsVpB73GpRywnig4v6yiw== X-Google-Smtp-Source: ABdhPJwQ/l5ePXdK2531ARA8Lyb1Lw/ISWyLZmahs26BmVT5HGe9aezzG+AecBIPDpM7O6nek5tzSQ== X-Received: by 2002:a9d:4911:: with SMTP id e17mr223342otf.38.1618438555210; Wed, 14 Apr 2021 15:15:55 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o2sm205446oti.30.2021.04.14.15.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 15:15:54 -0700 (PDT) Received: (nullmailer pid 63091 invoked by uid 1000); Wed, 14 Apr 2021 22:15:53 -0000 Date: Wed, 14 Apr 2021 17:15:53 -0500 From: Rob Herring To: Billy Tsai Cc: lee.jones@linaro.org, joel@jms.id.au, andrew@aj.id.au, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, BMC-SW@aspeedtech.com Subject: Re: [v2 1/2] dt-bindings: Add bindings for aspeed pwm-tach and pwm. Message-ID: <20210414221553.GA56046@robh.at.kernel.org> References: <20210414104939.1093-1-billy_tsai@aspeedtech.com> <20210414104939.1093-2-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414104939.1093-2-billy_tsai@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 14, 2021 at 06:49:38PM +0800, Billy Tsai wrote: > This patch adds device bindings for aspeed pwm-tach device which is a > multi-function device include pwn and tach function and pwm device which > should be the sub-node of pwm-tach device. > > Signed-off-by: Billy Tsai > Change-Id: I18d9dea14c3a04e1b7e38ffecd49d45917b9b545 Drop > --- > .../bindings/mfd/aspeed,ast2600-pwm-tach.yaml | 60 +++++++++++++++++++ > .../bindings/pwm/aspeed,ast2600-pwm.yaml | 44 ++++++++++++++ > 2 files changed, 104 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml b/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > new file mode 100644 > index 000000000000..eaf8bdf8d44e > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2021 ASPEED, Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/aspeed,ast2600-pwm-tach.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: PWM Tach controller Device Tree Bindings > + > +description: | > + The PWM Tach controller is represented as a multi-function device which > + includes: > + PWM > + Tach But is it really? A PWM and tach sounds like a fan controller. Look at other existing PWM+tach bindings we have for fans. > + > +maintainers: > + - Billy Tsai > + > +properties: > + compatible: > + items: > + - enum: > + - aspeed,ast2600-pwm-tach > + - const: syscon > + - const: simple-mfd > + reg: > + maxItems: 1 > + "#address-cells": > + const: 1 > + "#size-cells": > + const: 1 > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + > +additionalProperties: > + type: object As you know the 2 node names, they should be documented. However, see below. > + > +examples: > + - | > + pwm_tach: pwm_tach@1e610000 { > + compatible = "aspeed,ast2600-pwm-tach", "syscon", "simple-mfd"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x1e610000 0x100>; > + > + pwm: pwm@0 { > + compatible = "aspeed,ast2600-pwm"; > + #pwm-cells = <3>; > + reg = <0x0 0x100>; > + }; > + > + tach: tach@1 { > + compatible = "aspeed,ast2600-tach"; > + reg = <0x0 0x100>; You have 2 nodes at the same address. Not valid. > + }; There's no real need for 2 child nodes. The parent node can be a PWM provider. > + }; > diff --git a/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > new file mode 100644 > index 000000000000..97923e68ccb9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2021 ASPEED, Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/aspeed,ast2600-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ASPEED AST2600 PWM controller > + > +maintainers: > + - Billy Tsai > + > +description: | > + The ASPEED PWM controller can support upto 16 PWM outputs. > + > +properties: > + compatible: > + enum: > + - aspeed,ast2600-pwm > + > + "#pwm-cells": > + const: 3 > + > + reg: > + maxItems: 1 > + > +additionalProperties: false > + > +examples: > + - | > + // The PWM should be a subnode of a "aspeed,ast2600-pwm-tach" compatible > + // node. > + pwm_tach: pwm_tach@1e610000 { > + compatible = "aspeed,ast2600-pwm-tach", "syscon", "simple-mfd"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x1e610000 0x100>; > + > + pwm: pwm@0 { > + compatible = "aspeed,ast2600-pwm"; > + #pwm-cells = <3>; > + reg = <0x0 0x100>; > + }; > + }; > -- > 2.25.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71DEDC433ED for ; Wed, 14 Apr 2021 22:17:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5DAC6115C for ; Wed, 14 Apr 2021 22:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5DAC6115C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jLkRUjqeUM/QYbDkL2MID4Tw8OOXuF3+IuAJs6IG5Us=; b=buyYb3gdjxU9OtKTwEKMJY6Ka oKaDaE5vQtZXKToIbjR6xtyN/jk8whqxQJJHsqI0Iuu0rEtnKMYVdlX/7I7835GG7e+iT6gKnguKD LjKYSvd4QWFiA2A97pRlpAEAVBOzTB0CqBUXkxgPk5mt/RuMcQGAcHZAM02r6X+8zJdhezwkt3G9I gUjEpClglz4u3DbENXfOZScFsOvPjr/URvOioLdSY7UlcjXH97lj1fKZIFX5F2pfVvudu7YZestev WyW57zYhS0CT+9CI0S3LCeW2ANMkak/+zMTuLZ4dzei3JJw30J0humVFu/nfHrRpyPeq26h8N5RO1 3wnEIXsqQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWnnr-00DzCc-8M; Wed, 14 Apr 2021 22:16:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWnnk-00DzBJ-Jf for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 22:16:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=F07gtHUJwY/w7iuYzdTNfY1HnMAu4hugjUa0Lgoy7/U=; b=4A0MMuBuoaWw5k4qOp8ROnBalN 187Fo+PeFBzBrwsqPb+KBHKpCnZXNQxKi1Gm6DEg++onh0NOePc+sd5p6Z9xw72ei1Ai8gCthZJUl BnNjexglWkHUpZV4dZHk+vwFBSGsCyAxe7n07OX4kqYKcoE1BqUyP6vBNggWC18mAXnB12BUWJ7Aj 7XD+1Pfe8J7XuMz1w+BM4DBhIUfIxy+KZdRB8CB6g0STLg0IWsn0alGMgm0lm85JtEzvCkGrmlYbV AMux6GXGS1ie4lbv7trqbaiHWQfoH9nglmDt0TvJR8t9uLtfbC+qt19itdlfqpoz3AA6FDsljGwVW f7YU15fw==; Received: from mail-ot1-f43.google.com ([209.85.210.43]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWnnh-0088Yz-2J for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 22:15:58 +0000 Received: by mail-ot1-f43.google.com with SMTP id a2-20020a0568300082b029028d8118b91fso2333240oto.2 for ; Wed, 14 Apr 2021 15:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F07gtHUJwY/w7iuYzdTNfY1HnMAu4hugjUa0Lgoy7/U=; b=oYfCPokVqr2mYnET3JRpHKOIVWCbiVjXaI+H8zdbtgrSD7blPrBdmlZqoV8ICj6aYY +6RGV7T7Oc2pC7t1/YlsLlkvkxIbrvwPseSIIOsrK1KF1Ef8oinpPSYQIZrypDCtqf2D dy5TSULPm9pb5ss4ydM7srerjNuEFzDAXQ2Z6tIa7guJE8GA9vwnxCqXNwyWI+GKAtDl zQVYLF9I2C1DBSLZUTwvSRBOPFz7iZDWxKfBYvyfqEFzaXVyjBUAasPjahWJPGGVM9J8 D9f/wD8igltB+5xEpKS+gWg+Imnp3NJFvrLeha/5p2nzlV4w9XYwuW/uACMqkKVOAsGw EWFg== X-Gm-Message-State: AOAM5300PFqLJo65s6ZIWFw1Sk/TZsRjBV+IWzA7e+IeJ1qvqsCMrv9K LBEPH7KR3LyQ66eGKUIUYw== X-Google-Smtp-Source: ABdhPJwQ/l5ePXdK2531ARA8Lyb1Lw/ISWyLZmahs26BmVT5HGe9aezzG+AecBIPDpM7O6nek5tzSQ== X-Received: by 2002:a9d:4911:: with SMTP id e17mr223342otf.38.1618438555210; Wed, 14 Apr 2021 15:15:55 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o2sm205446oti.30.2021.04.14.15.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 15:15:54 -0700 (PDT) Received: (nullmailer pid 63091 invoked by uid 1000); Wed, 14 Apr 2021 22:15:53 -0000 Date: Wed, 14 Apr 2021 17:15:53 -0500 From: Rob Herring To: Billy Tsai Cc: lee.jones@linaro.org, joel@jms.id.au, andrew@aj.id.au, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, BMC-SW@aspeedtech.com Subject: Re: [v2 1/2] dt-bindings: Add bindings for aspeed pwm-tach and pwm. Message-ID: <20210414221553.GA56046@robh.at.kernel.org> References: <20210414104939.1093-1-billy_tsai@aspeedtech.com> <20210414104939.1093-2-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210414104939.1093-2-billy_tsai@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_151557_142600_F9D30829 X-CRM114-Status: GOOD ( 21.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 14, 2021 at 06:49:38PM +0800, Billy Tsai wrote: > This patch adds device bindings for aspeed pwm-tach device which is a > multi-function device include pwn and tach function and pwm device which > should be the sub-node of pwm-tach device. > > Signed-off-by: Billy Tsai > Change-Id: I18d9dea14c3a04e1b7e38ffecd49d45917b9b545 Drop > --- > .../bindings/mfd/aspeed,ast2600-pwm-tach.yaml | 60 +++++++++++++++++++ > .../bindings/pwm/aspeed,ast2600-pwm.yaml | 44 ++++++++++++++ > 2 files changed, 104 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml b/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > new file mode 100644 > index 000000000000..eaf8bdf8d44e > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2021 ASPEED, Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/aspeed,ast2600-pwm-tach.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: PWM Tach controller Device Tree Bindings > + > +description: | > + The PWM Tach controller is represented as a multi-function device which > + includes: > + PWM > + Tach But is it really? A PWM and tach sounds like a fan controller. Look at other existing PWM+tach bindings we have for fans. > + > +maintainers: > + - Billy Tsai > + > +properties: > + compatible: > + items: > + - enum: > + - aspeed,ast2600-pwm-tach > + - const: syscon > + - const: simple-mfd > + reg: > + maxItems: 1 > + "#address-cells": > + const: 1 > + "#size-cells": > + const: 1 > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + > +additionalProperties: > + type: object As you know the 2 node names, they should be documented. However, see below. > + > +examples: > + - | > + pwm_tach: pwm_tach@1e610000 { > + compatible = "aspeed,ast2600-pwm-tach", "syscon", "simple-mfd"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x1e610000 0x100>; > + > + pwm: pwm@0 { > + compatible = "aspeed,ast2600-pwm"; > + #pwm-cells = <3>; > + reg = <0x0 0x100>; > + }; > + > + tach: tach@1 { > + compatible = "aspeed,ast2600-tach"; > + reg = <0x0 0x100>; You have 2 nodes at the same address. Not valid. > + }; There's no real need for 2 child nodes. The parent node can be a PWM provider. > + }; > diff --git a/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > new file mode 100644 > index 000000000000..97923e68ccb9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2021 ASPEED, Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/aspeed,ast2600-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ASPEED AST2600 PWM controller > + > +maintainers: > + - Billy Tsai > + > +description: | > + The ASPEED PWM controller can support upto 16 PWM outputs. > + > +properties: > + compatible: > + enum: > + - aspeed,ast2600-pwm > + > + "#pwm-cells": > + const: 3 > + > + reg: > + maxItems: 1 > + > +additionalProperties: false > + > +examples: > + - | > + // The PWM should be a subnode of a "aspeed,ast2600-pwm-tach" compatible > + // node. > + pwm_tach: pwm_tach@1e610000 { > + compatible = "aspeed,ast2600-pwm-tach", "syscon", "simple-mfd"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x1e610000 0x100>; > + > + pwm: pwm@0 { > + compatible = "aspeed,ast2600-pwm"; > + #pwm-cells = <3>; > + reg = <0x0 0x100>; > + }; > + }; > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel