From patchwork Tue Nov 14 08:27:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 164751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1720817vqg; Tue, 14 Nov 2023 00:27:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWhQMz3UjyPg6Wx7uk5YWeJaMnB0GpDjn+4n1GgPBzu7gTUN3ex6kuRzqx6ySj0B2uJJ3A X-Received: by 2002:a17:903:24d:b0:1cc:4a83:d839 with SMTP id j13-20020a170903024d00b001cc4a83d839mr2465643plh.17.1699950478961; Tue, 14 Nov 2023 00:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699950478; cv=none; d=google.com; s=arc-20160816; b=Zbo7eG4EBkbt+KP/Y5HK3ugzP8EXuLso5I/vPeL16wVpgdjFGWTwqZqcjaNuKDbST6 cmi9idtABDXLKUZJCwKTFfka99/cYJi22c47rH9OYGGR7mh+Bbg7LlpB6BCxUg9fXExu /ron1jTQjdIne+wmuzGRSDvc12zRX9A7rhcG3k7JLvMUI2x1a/iMDUlf5cljy0p92jZq 5L1Tup1VOShc0LCBDCQ/b3YweXNb3v31ko9nhfNkRA5WBj3gn5UjDIKah69m2kpavECC JjBgGAvc2plcJe8fVeDEnNNTDT1+oZScLpqaE5a1GmBCOJ3MafB/i30m4COH5vX6UYMm SlGw== 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 :message-id:date:subject:cc:to:from; bh=MlzLlQwQ7g2jYCTB7eYmdukYETKK2AZT1+ssbEi2o/4=; fh=kERgAsKFUUc1Tr7VTF5u3B5R3B1GB/rSoXQcbiurOqk=; b=mIQ/uYARqgN76VOYSTEJVj9q0N0UlRdchtFNlS21MHZLW/1WUVrnJvAtt3NpqFaXBH 6Z/j3rqFRF5Uto1v7H4c7JJ1Oztpi+rB/a3nv+COi8U2y85SQtOzuPNKkCItfbBM0+Rm fXFQm1CeVqSs1CEUW6rq2X0HjT9PXyJSvl8weJDrDyvVe8WjBrLApah3bg3CzSrnGK2l ENR6xDbc8ugqnai/SfcbNshqF3BuBCRbWb+yYtFiPzEkkJj9Y8RYooFqcHm2XQ5K8Ul0 NvjUPVNm2lwfQU0DeN7mtyT5F+hnkEaTSyFQOUis27PiQdJ4/9UBIjrU51J9f6XIOW4j 4WTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c14-20020a170903234e00b001c0cb378f04si8103805plh.335.2023.11.14.00.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 00:27:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 2B52B8051B42; Tue, 14 Nov 2023 00:27:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232227AbjKNI1g (ORCPT + 30 others); Tue, 14 Nov 2023 03:27:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjKNI1e (ORCPT ); Tue, 14 Nov 2023 03:27:34 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1D5BB1A8; Tue, 14 Nov 2023 00:27:29 -0800 (PST) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id CDC2180CE; Tue, 14 Nov 2023 08:27:26 +0000 (UTC) From: Tony Lindgren To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-pwm@vger.kernel.org, Nishanth Menon , Vignesh Raghavendra , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/1] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml Date: Tue, 14 Nov 2023 10:27:06 +0200 Message-ID: <20231114082709.54138-1-tony@atomide.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 14 Nov 2023 00:27:56 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782527273693789924 X-GMAIL-MSGID: 1782527273693789924 Update for yaml and remove the old txt binding. As we can replace most of the custom timer API with standard Linux frameworks such as clock framework, let's tag the properties for ti,prescaler and ti,clock-source as deprecated. Cc: linux-pwm@vger.kernel.org Cc: Nishanth Menon Cc: Thierry Reding Cc: Uwe Kleine-König Cc: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren Reviewed-by: Uwe Kleine-König --- Changes since v3: - No changes, reposted without patch 1/2. The pwm.yaml related issues got fixed by commit 05b743db9d8c ("dt-bindings: pwm: restrict node name suffixes") Changes since v2: - Reviewed-by collected from Krzysztof, no changes Changes since v1: - Fix issues noticed by Krzysztof --- .../bindings/pwm/pwm-omap-dmtimer.txt | 22 ------- .../bindings/pwm/ti,omap-dmtimer-pwm.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt create mode 100644 Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt b/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt deleted file mode 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt +++ /dev/null @@ -1,22 +0,0 @@ -* OMAP PWM for dual-mode timers - -Required properties: -- compatible: Shall contain "ti,omap-dmtimer-pwm". -- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer-dm.yaml for info - about these timers. -- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of - the cells format. - -Optional properties: -- ti,prescaler: Should be a value between 0 and 7, see the timers datasheet -- ti,clock-source: Set dmtimer parent clock, values between 0 and 2: - - 0x00 - high-frequency system clock (timer_sys_ck) - - 0x01 - 32-kHz always-on clock (timer_32k_ck) - - 0x02 - external clock (timer_ext_ck, OMAP2 only) - -Example: - pwm9: dmtimer-pwm@9 { - compatible = "ti,omap-dmtimer-pwm"; - ti,timers = <&timer9>; - #pwm-cells = <3>; - }; diff --git a/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file mode 100644 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/ti,omap-dmtimer-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI dual mode timer PWM controller + +maintainers: + - Tony Lindgren + +description: + TI dual mode timer instances have an IO pin for PWM capability + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: ti,omap-dmtimer-pwm + + "#pwm-cells": + const: 3 + + ti,timers: + description: Timer instance phandle for the PWM + $ref: /schemas/types.yaml#/definitions/phandle + + ti,prescaler: + description: | + Legacy clock prescaler for timer. The timer counter is prescaled + with 2^n where n is the prescaler. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] + deprecated: true + + ti,clock-source: + description: | + Legacy clock for timer, please use assigned-clocks instead. + 0x00 - high-frequency system clock (timer_sys_ck) + 0x01 - 32-kHz always-on clock (timer_32k_ck) + 0x02 - external clock (timer_ext_ck, OMAP2 only) + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ] + deprecated: true + +required: + - compatible + - ti,timers + +unevaluatedProperties: false + +examples: + - | + pwm9: pwm { + compatible = "ti,omap-dmtimer-pwm"; + ti,timers = <&timer9>; + #pwm-cells = <3>; + };