Message ID | 20230608021839.12769-2-billy_tsai@aspeedtech.com |
---|---|
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 k13csp617335vqr; Wed, 7 Jun 2023 19:21:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pfhSRa7gVkDWnOUgwxvl2wHHiGr8v0+a7P1l1djhEuM0Cd+0DqkPNKwdNfIiVoodN9VJM X-Received: by 2002:a05:6a00:cd4:b0:64c:e899:dcd1 with SMTP id b20-20020a056a000cd400b0064ce899dcd1mr10168705pfv.5.1686190907532; Wed, 07 Jun 2023 19:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686190907; cv=none; d=google.com; s=arc-20160816; b=0agt82WlAM+Cu0gc2xMNUYxpo7Svtg7Abg7PoMhAiAevQaqMTyBoz6PgJilsyIJ7mD 7KcDRTizpbbSZRQjrFp2HjKMtDaxVSI3bZlC2lq/VbLdZ/xtbYpCSyUuhAIERHb+i+/B 9XrbD83DJcE2OY3bQ2QL9526a/l441rE57N0tase8A/bprk3xiy4RtFcDe0glDmW+1+f U8VIeuXXLKea9CwqrFIL9GMO3E/iL14oInJe9j2Mk7NVTPwjTii+8+HjOnDqyxzUOEAX n8gAmZGJQbVjUUXFIpyFBwS/RLsiuJOuDuGcblBNQH5YfRuQEV2QU5x/SjKkG1lukbWp mphw== 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:to:from; bh=puLIxiLmBFuhQ8fWigG0vxwekNRPYyLq01Q1D5eZWkM=; b=pkJ0ryQtAG3TwIwkUYPBZ+QGWrDsl15CcCwrFvNxuHUNPD9V+ZXyEcvUrmv4I+IZKL RR4MgZx1NhK0hI2KY7o/jX6jGr0p/4GLcnZEklRP32A93WzOyI5bNxYg2fV+8zrdyd21 Fihi5yriAgn9vHZdy63wWQF+AUMVZnMgqDgSVgNFV2h5Fd/OhKVYfydIWP3lVLobkatI Wx6O8gy4gwwp2FHJ2PbR2+FKSfp6tdwLaAlr/RGkoUXcdaHZwFAmtg0wzOlgeJw4TDJf AX4y69c27alDqANz++seUG1khjLSEkm3bcuC1q63rm18NonIYVDbBiVs2Pay801kvkq1 c67A== ARC-Authentication-Results: i=1; mx.google.com; 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 r8-20020aa79628000000b00660b5630927si62306pfg.133.2023.06.07.19.21.33; Wed, 07 Jun 2023 19:21:47 -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; 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 S233256AbjFHCQc (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 22:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbjFHCQa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 22:16:30 -0400 Received: from mail.aspeedtech.com (mail.aspeedtech.com [211.20.114.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C964926A3; Wed, 7 Jun 2023 19:16:28 -0700 (PDT) Received: from BillyTsai-pc.aspeed.com (192.168.1.221) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 8 Jun 2023 10:16:21 +0800 From: Billy Tsai <billy_tsai@aspeedtech.com> To: <jdelvare@suse.com>, <linux@roeck-us.net>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <joel@jms.id.au>, <andrew@aj.id.au>, <thierry.reding@gmail.com>, <u.kleine-koenig@pengutronix.de>, <corbet@lwn.net>, <p.zabel@pengutronix.de>, <billy_tsai@aspeedtech.com>, <linux-hwmon@vger.kernel.org>, <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>, <linux-doc@vger.kernel.org>, <patrick@stwcx.xyz> Subject: [v6 1/4] dt-bindings: pwm: Add ASPEED PWM Control documentation Date: Thu, 8 Jun 2023 10:18:36 +0800 Message-ID: <20230608021839.12769-2-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230608021839.12769-1-billy_tsai@aspeedtech.com> References: <20230608021839.12769-1-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.1.221] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1768099317241068639?= X-GMAIL-MSGID: =?utf-8?q?1768099317241068639?= |
Series |
Support pwm/tach driver for aspeed ast26xx
|
|
Commit Message
Billy Tsai
June 8, 2023, 2:18 a.m. UTC
Document the compatible for aspeed,ast2600-pwm device.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
.../bindings/pwm/aspeed,ast2600-pwm.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml
Comments
On 08/06/2023 04:18, Billy Tsai wrote:
> Document the compatible for aspeed,ast2600-pwm device.
This is a friendly reminder during the review process.
It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.
Thank you.
I don't understand why you make the same mistakes, even though I pointed
them out two times already.
I am not going to point third time. Sorry, it's a waste of my time.
NAK.
Best regards,
Krzysztof
On 08/06/2023 04:18, Billy Tsai wrote: > Document the compatible for aspeed,ast2600-pwm device. > > Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> > --- > .../bindings/pwm/aspeed,ast2600-pwm.yaml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > > 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..a9e040263578 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml > @@ -0,0 +1,38 @@ > +# 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 <billy_tsai@aspeedtech.com> > + > +description: | > + The Aspeed PWM controller supports up to 1 PWM outputs. This does not look right. > + > +allOf: > + - $ref: pwm.yaml# > + > +properties: > + compatible: > + enum: > + - aspeed,ast2600-pwm > + > + "#pwm-cells": > + const: 3 3 cells? For one PWM? What are they? > + > + clocks: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > +required: > + - compatible > + - clocks > + - resets > + > +additionalProperties: false Missing examples. All bindings need examples. Best regards, Krzysztof
On 08/06/2023 09:47, Billy Tsai wrote: > > >> + > >> +allOf: > >> + - $ref: pwm.yaml# > >> + > >> +properties: > >> + compatible: > >> + enum: > >> + - aspeed,ast2600-pwm > >> + > >> + "#pwm-cells": > >> + const: 3 > > > 3 cells? For one PWM? What are they? > > channel, period and polarity. Don't cut my responses. You wrote you have one PWM output, so only one channel. What do you put then in the channel? I will start NAKing such patches without DTS user. It's like reviewing fake code for some unknown solution and trying to get from you piece of answers one by one, because you do not want to share entire part. Best regards, Krzysztof
On 08/06/2023 10:21, Billy Tsai wrote: > On 08/06/2023 09:47, Billy Tsai wrote: > >> > >> >> + > >> >> +allOf: > >> >> + - $ref: pwm.yaml# > >> >> + > >> >> +properties: > >> >> + compatible: > >> >> + enum: > >> >> + - aspeed,ast2600-pwm > >> >> + > >> >> + "#pwm-cells": > >> >> + const: 3 > >> > >> > 3 cells? For one PWM? What are they? > >> > >> channel, period and polarity. > > > Don't cut my responses. You wrote you have one PWM output, so only one > > channel. What do you put then in the channel? > > You need to put 0 in the cell of the channel, the example of the dts usage will like following: If you always put 0 isn't this a proof that it's wrong? Best regards, Krzysztof
On 08/06/2023 10:21, Billy Tsai wrote: > On 08/06/2023 09:47, Billy Tsai wrote: > >> > >> >> + > >> >> +allOf: > >> >> + - $ref: pwm.yaml# > >> >> + > >> >> +properties: > >> >> + compatible: > >> >> + enum: > >> >> + - aspeed,ast2600-pwm > >> >> + > >> >> + "#pwm-cells": > >> >> + const: 3 > >> > >> > 3 cells? For one PWM? What are they? > >> > >> channel, period and polarity. > > > Don't cut my responses. You wrote you have one PWM output, so only one > > channel. What do you put then in the channel? > > You need to put 0 in the cell of the channel, the example of the dts usage will like following: > > pwm0: pwm0@1e610000 { > compatible = "aspeed,ast2600-pwm"; > reg = <0x1e610000 0x8>; > #pwm-cells = <3>; > #address-cells = <1>; > #size-cells = <0>; > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_pwm0_default>; > clocks = <&syscon ASPEED_CLK_AHB>; > resets = <&syscon ASPEED_RESET_PWM>; > status = "okay"; > }; > > pwm1: pwm1@1e610010 { > compatible = "aspeed,ast2600-pwm"; > reg = <0x1e610010 0x8>; > #pwm-cells = <3>; > #address-cells = <1>; > #size-cells = <0>; > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_pwm1_default>; > clocks = <&syscon ASPEED_CLK_AHB>; > resets = <&syscon ASPEED_RESET_PWM>; > status = "okay"; BTW, these are not two PWM devices but one. I don't understand why you changed previous design into something like this, but this is not representing your hardware. Best regards, Krzysztof
On 08/06/2023 10:57, Billy Tsai wrote: > On 08/06/2023 10:21, Billy Tsai wrote: > >> On 08/06/2023 09:47, Billy Tsai wrote: > >> >> > >> >> >> + > >> >> >> +allOf: > >> >> >> + - $ref: pwm.yaml# > >> >> >> + > >> >> >> +properties: > >> >> >> + compatible: > >> >> >> + enum: > >> >> >> + - aspeed,ast2600-pwm > >> >> >> + > >> >> >> + "#pwm-cells": > >> >> >> + const: 3 > >> >> > >> >> > 3 cells? For one PWM? What are they? > >> >> > >> >> channel, period and polarity. > >> > >> > Don't cut my responses. You wrote you have one PWM output, so only one > >> > channel. What do you put then in the channel? > >> > >> You need to put 0 in the cell of the channel, the example of the dts usage will like following: > > > If you always put 0 isn't this a proof that it's wrong? > > No, if your PWM controller only has one pwm output, then it should only be configured as 0. > This is the usage of the pwm-cells property. > https://github.com/torvalds/linux/blob/master/drivers/pwm/core.c#L129-L158 This is only when you use generic of_xlate. You do not have to use generic of_xlate if it does not suite you. Again you speak about the drivers, but we talk about bindings: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pwm/pwm.txt#L13 "controller specific" > https://github.com/torvalds/linux/blob/master/include/linux/pwm.h#LL299C20-L299C20 > All of the pwm driver with npwm = 1 will has the same usage. So it seems many simplified their drivers... Best regards, Krzysztof
On 08/06/2023 11:15, Billy Tsai wrote: > On 08/06/2023 10:21, Billy Tsai wrote: > >> On 08/06/2023 09:47, Billy Tsai wrote: > >> >> > >> >> >> + > >> >> >> +allOf: > >> >> >> + - $ref: pwm.yaml# > >> >> >> + > >> >> >> +properties: > >> >> >> + compatible: > >> >> >> + enum: > >> >> >> + - aspeed,ast2600-pwm > >> >> >> + > >> >> >> + "#pwm-cells": > >> >> >> + const: 3 > >> >> > >> >> > 3 cells? For one PWM? What are they? > >> >> > >> >> channel, period and polarity. > >> > >> > Don't cut my responses. You wrote you have one PWM output, so only one > >> > channel. What do you put then in the channel? > >> > >> You need to put 0 in the cell of the channel, the example of the dts usage will like following: > >> > >> pwm0: pwm0@1e610000 { > >> compatible = "aspeed,ast2600-pwm"; > >> reg = <0x1e610000 0x8>; > >> #pwm-cells = <3>; > >> #address-cells = <1>; > >> #size-cells = <0>; > >> pinctrl-names = "default"; > >> pinctrl-0 = <&pinctrl_pwm0_default>; > >> clocks = <&syscon ASPEED_CLK_AHB>; > >> resets = <&syscon ASPEED_RESET_PWM>; > >> status = "okay"; > >> }; > >> > >> pwm1: pwm1@1e610010 { > >> compatible = "aspeed,ast2600-pwm"; > >> reg = <0x1e610010 0x8>; > >> #pwm-cells = <3>; > >> #address-cells = <1>; > >> #size-cells = <0>; > >> pinctrl-names = "default"; > >> pinctrl-0 = <&pinctrl_pwm1_default>; > >> clocks = <&syscon ASPEED_CLK_AHB>; > >> resets = <&syscon ASPEED_RESET_PWM>; > >> status = "okay"; > > > BTW, these are not two PWM devices but one. I don't understand why you > > changed previous design into something like this, but this is not > > representing your hardware. > > The previous design of my patch treated our PWM controller as having 16 PWM channels. > However, from a hardware perspective, it consists of 16 individual PWM chips, each > with its own set of two 4-byte control registers. These chips operate independently > and are not affected by each other. They are affected by each other - you use the same clock and reset line. I really doubt you have 16 PWM controllers. Anyway, I cannot judge. Either your previous submissions were totally bogus or this one is. Best regards, Krzysztof
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..a9e040263578 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml @@ -0,0 +1,38 @@ +# 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 <billy_tsai@aspeedtech.com> + +description: | + The Aspeed PWM controller supports up to 1 PWM outputs. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + enum: + - aspeed,ast2600-pwm + + "#pwm-cells": + const: 3 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - clocks + - resets + +additionalProperties: false