Message ID | 20231129092732.43387-2-william.qiu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp219060vqn; Wed, 29 Nov 2023 01:27:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWudwTmrloynzmMTQyiNFdMZzTLOExf+es2MWH4lmW4TxY3VAVLtbj0glDUQpds6q/r3el X-Received: by 2002:a17:903:2585:b0:1cc:45d0:470b with SMTP id jb5-20020a170903258500b001cc45d0470bmr19214851plb.7.1701250074227; Wed, 29 Nov 2023 01:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701250074; cv=none; d=google.com; s=arc-20160816; b=AhJp4ioJBQxD7MAqRp1HH9+Mi7oF3zqIHl2gQOoemj/oWnAA6E6q279p1D8Zox/Zp7 GrotfMMOrO23BAsuY4ZtYF8g5wZhYAgzt3T/yYNBopQ1gYfNhxXZzon+LW6NXSduDClS 9yQRlYB5rOrPEovFxGT6dfkDiEIhJGooRc1GdjJ685v/UGrDoGH4EtviQo5vdT0tUr/0 D8RqDTDgz61Sn/ZVOpN7v1MHGh4kL/AHKvRqOVdGDRVYGrF9TbheGBUJXMvh5BdeBA1U NVDrIzGUJE35sE1d3VYpQz+gci8prboSD/7d1wVo1QXyw0aUCqkYy6xhZuWHK68uFJn+ dBgg== 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; bh=Q01kL7q/pf4jfrmJjOUn5eBseDYnynjHGzTbX75ul9o=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=qRbeqoX9y6+XMUc4M7eoxjEAO5slTxOgtoV6LRk9QbXKaJ80XCY/Egym4UsU/aWLQT +OkAkZddUkklSoTN/JtrVy2gtZGZTq7HpsyYideLd2SPFyApF1XFiN6Xs4nWAnw/umOw X9jexA/rsE5h11iGZr3RXBr8Df6RSBtyZ99Pk33FrVECXYKInjXtyntXcmKyKGtjuHaz s8wAbz+nMtVjcrZHSayp7iR2dkK784VuCFa/nec72pNc8hgmwID5jQu3cuWCCbw0HS2T gVzo6SbAqHz1F0yzPAi59vzZTDGVAYDlj8r4YRBiinp1wIKJb4ccFXfQQTu+d2f7npmW dSlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 21-20020a170902c11500b001cc282684c6si1843663pli.278.2023.11.29.01.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:27:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 845C180A97A2; Wed, 29 Nov 2023 01:27:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbjK2J1k convert rfc822-to-8bit (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 29 Nov 2023 04:27:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjK2J1j (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 04:27:39 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EE25120; Wed, 29 Nov 2023 01:27:37 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 19EBF24E2D8; Wed, 29 Nov 2023 17:27:35 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 29 Nov 2023 17:27:34 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 29 Nov 2023 17:27:33 +0800 From: William Qiu <william.qiu@starfivetech.com> To: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>, <linux-pwm@vger.kernel.org> CC: Emil Renner Berthing <kernel@esmil.dk>, Rob Herring <robh+dt@kernel.org>, Thierry Reding <thierry.reding@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, "Hal Feng" <hal.feng@starfivetech.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, William Qiu <william.qiu@starfivetech.com> Subject: [PATCH v8 1/4] dt-bindings: pwm: Add bindings for OpenCores PWM Controller Date: Wed, 29 Nov 2023 17:27:29 +0800 Message-ID: <20231129092732.43387-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231129092732.43387-1-william.qiu@starfivetech.com> References: <20231129092732.43387-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:27:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783889998195892392 X-GMAIL-MSGID: 1783889998195892392 |
Series |
StarFive's Pulse Width Modulation driver support
|
|
Commit Message
William Qiu
Nov. 29, 2023, 9:27 a.m. UTC
Add bindings for OpenCores PWM Controller. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> --- .../bindings/pwm/opencores,pwm.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml
Comments
On Wed, Nov 29, 2023 at 05:27:29PM +0800, William Qiu wrote: > Add bindings for OpenCores PWM Controller. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > Reviewed-by: Hal Feng <hal.feng@starfivetech.com> > --- > .../bindings/pwm/opencores,pwm.yaml | 56 +++++++++++++++++++ > 1 file changed, 56 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml > > diff --git a/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml > new file mode 100644 > index 000000000000..133f2cd417f0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml > @@ -0,0 +1,56 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/opencores,pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: OpenCores PWM controller > + > +maintainers: > + - William Qiu <william.qiu@starfivetech.com> > + > +description: > + OpenCores PTC ip core contains a PWM controller. When operating in PWM mode, nit: "The OpenCores PTC IP core" > + the PTC core generates binary signal with user-programmable low and high > + periods. All PTC counters and registers are 32-bit. > + > +allOf: > + - $ref: pwm.yaml# > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - starfive,jh7100-pwm > + - starfive,jh7110-pwm > + - const: opencores,pwm-v1 properties: compatible: items: - enum: - starfive,jh7100-pwm - starfive,jh7110-pwm - const: opencores,pwm-v1 Please use this form here instead. Otherwise, this looks good to me now. > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + "#pwm-cells": > + const: 3 > + > +required: > + - compatible > + - reg > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + pwm@12490000 { > + compatible = "starfive,jh7110-pwm", "opencores,pwm-v1"; > + reg = <0x12490000 0x10000>; > + clocks = <&clkgen 181>; > + resets = <&rstgen 109>; > + #pwm-cells = <3>; > + }; > -- > 2.34.1 > >
On 2023/11/29 22:33, Conor Dooley wrote: > On Wed, Nov 29, 2023 at 05:27:29PM +0800, William Qiu wrote: >> Add bindings for OpenCores PWM Controller. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> >> --- >> .../bindings/pwm/opencores,pwm.yaml | 56 +++++++++++++++++++ >> 1 file changed, 56 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml >> >> diff --git a/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml >> new file mode 100644 >> index 000000000000..133f2cd417f0 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml >> @@ -0,0 +1,56 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/pwm/opencores,pwm.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: OpenCores PWM controller >> + >> +maintainers: >> + - William Qiu <william.qiu@starfivetech.com> >> + >> +description: >> + OpenCores PTC ip core contains a PWM controller. When operating in PWM mode, > > nit: "The OpenCores PTC IP core" > Will update. >> + the PTC core generates binary signal with user-programmable low and high >> + periods. All PTC counters and registers are 32-bit. >> + >> +allOf: >> + - $ref: pwm.yaml# >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: >> + - enum: >> + - starfive,jh7100-pwm >> + - starfive,jh7110-pwm >> + - const: opencores,pwm-v1 > > properties: > compatible: > items: > - enum: > - starfive,jh7100-pwm > - starfive,jh7110-pwm > - const: opencores,pwm-v1 > > Please use this form here instead. > > Otherwise, this looks good to me now. > I see. I'll update it. Thanks for spending time to review this patchset. Best Regards, William >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + resets: >> + maxItems: 1 >> + >> + "#pwm-cells": >> + const: 3 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + pwm@12490000 { >> + compatible = "starfive,jh7110-pwm", "opencores,pwm-v1"; >> + reg = <0x12490000 0x10000>; >> + clocks = <&clkgen 181>; >> + resets = <&rstgen 109>; >> + #pwm-cells = <3>; >> + }; >> -- >> 2.34.1 >> >>
diff --git a/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml new file mode 100644 index 000000000000..133f2cd417f0 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/opencores,pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: OpenCores PWM controller + +maintainers: + - William Qiu <william.qiu@starfivetech.com> + +description: + OpenCores PTC ip core contains a PWM controller. When operating in PWM mode, + the PTC core generates binary signal with user-programmable low and high + periods. All PTC counters and registers are 32-bit. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - starfive,jh7100-pwm + - starfive,jh7110-pwm + - const: opencores,pwm-v1 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells": + const: 3 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pwm@12490000 { + compatible = "starfive,jh7110-pwm", "opencores,pwm-v1"; + reg = <0x12490000 0x10000>; + clocks = <&clkgen 181>; + resets = <&rstgen 109>; + #pwm-cells = <3>; + };