Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3697208imw; Mon, 11 Jul 2022 13:56:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhYgpz00V6tLmQ/2ZTGavybD3ndGcnlh0n8g2oqKHCIkXNSDD6R0hGsLlNwCyggNaXY7bQ X-Received: by 2002:a17:902:da83:b0:16b:fea2:c84f with SMTP id j3-20020a170902da8300b0016bfea2c84fmr20469324plx.28.1657573010283; Mon, 11 Jul 2022 13:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657573010; cv=none; d=google.com; s=arc-20160816; b=saH+vLyCdL6hSQKX4E1EKkwPMV3Dy3uGyRoiO+ZeNVm3Crl3+dlohPTDEWCp6mDmBq A/TIQNpe55sJVOa0uon4a+cTJ2ZvEMRtFInNs7fkQS07T9BoKUOneG5xqo7MIhqhS6Oz 44mdEvYqokjSfjz3G7M7x/9ewdKrdsnFSEnwHf5KPbvCwO047BHACCfgamkaLecRgRuY 4RKUGod2XnfOGpeCqSP5lhlyYUX+ZEjiqvjCDSVfA2mV7VKDIfZadQqJUC5iDxQ7XpB+ Lwk5FoAY5BuvYgd7RrQyTkHNVzPSOCAMLZU2EQxnuJr0U4mb+q/LCdQfMyNwiAnjqOxp n5PQ== 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=DZu3m5VpZ6dqignxJhKsACDxs7hESchXhP79UACEt40=; b=AXnyEbXaaoHXrDCdgmx7Anl54XGJBKBmm5FOWbYTK1F+PyE9tBw34AR4BrJw7PFYdq ceghEHxUFM1TnV7ShPx9xRi9UEPWVkj+JmNPDdWgJuyoF+UPuUwyoHdGoIq8auypCXS/ HJXrP8UyuWLz6+A7qNPAceMUI5Qfb5nrSDfWrnWj66wP4bv557f0wYUo/ksHVM2pLXnS VpvzPaKinJI/MebZMvR5WQPaYi0e7/qtxunj/gbVmUDH1cgcqU1lV2MhzHsxM09ipbUK 0zF+gL7oQjsu4XbNOJ7jLRVFDIb2vfjqlw948gG77Y14/d+CQKcm6Ey8i3JvKUjZU7/o Loew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=hUyN2ykO; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gp1-20020a17090adf0100b001df4ea7a026si9419338pjb.34.2022.07.11.13.56.38; Mon, 11 Jul 2022 13:56:50 -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=@trvn.ru header.s=mail header.b=hUyN2ykO; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231361AbiGKUeD (ORCPT + 99 others); Mon, 11 Jul 2022 16:34:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbiGKUd5 (ORCPT ); Mon, 11 Jul 2022 16:33:57 -0400 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B6C4D171; Mon, 11 Jul 2022 13:33:56 -0700 (PDT) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id ACBFA4185A; Tue, 12 Jul 2022 01:33:50 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1657571631; bh=MaueoK+Vek+754sVEgpdzODSHjawfPvA50v4dhfN/Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hUyN2ykOv//CKv/tJeOSENlK89XZ7w6gIiozDhGnYV0lANmrH71OAaDBEouff89a3 OEQEQk/j8KCqXLvEZcewNpkvCuI6tlkfuHuPk3j96rP3ZQ0UkjPPokWlfR/iCrJacX 3H5HmgUiHArB3ktdg6qz5qQ3yju1zvj6fiRvlqGnu+mKzEzPgONgdK6ttTx0BZxBga LLmbtSfxzI6whgbjSkevVcGkuhyXqeCxdBRKkSRsqk50Jx+DfQxZnVJUL3/Vgpaw9t jRYNbbuJKsFHAcjpYq67RLsQm7E3vPFWg/ykfXRIORgHX/ZBojaJmoKjCt5ZunTz6A nYAb/EN11BkPA== From: Nikita Travkin To: thierry.reding@gmail.com, lee.jones@linaro.org Cc: u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, sboyd@kernel.org, krzk@kernel.org, linus.walleij@linaro.org, masneyb@onstation.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v9 1/2] dt-bindings: pwm: Document clk based PWM controller Date: Tue, 12 Jul 2022 01:33:39 +0500 Message-Id: <20220711203340.648007-2-nikita@trvn.ru> In-Reply-To: <20220711203340.648007-1-nikita@trvn.ru> References: <20220711203340.648007-1-nikita@trvn.ru> 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,SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org Add YAML devicetree binding for clk based PWM controller Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Nikita Travkin --- Changes in v2: - fix the file name. Changes in v4: - Use generic node name in the dt bindings example. Changes in v5: - make compatible required --- .../devicetree/bindings/pwm/clk-pwm.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/clk-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/clk-pwm.yaml b/Documentation/devicetree/bindings/pwm/clk-pwm.yaml new file mode 100644 index 000000000000..ec1768291503 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/clk-pwm.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/clk-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Clock based PWM controller + +maintainers: + - Nikita Travkin + +description: | + Some systems have clocks that can be exposed to external devices. + (e.g. by muxing them to GPIO pins) + It's often possible to control duty-cycle of such clocks which makes them + suitable for generating PWM signal. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: clk-pwm + + clocks: + description: Clock used to generate the signal. + maxItems: 1 + + "#pwm-cells": + const: 2 + +unevaluatedProperties: false + +required: + - compatible + - clocks + +examples: + - | + pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + clocks = <&gcc 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_clk_flash_default>; + }; -- 2.35.3