Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5490820pxb; Wed, 26 Jan 2022 13:16:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQOXXF7Uv9eustYTYGTUORYJwrceU1SgnAlbjJvwTQCQ+lr4UL/4/GE1sHxpzueleAN6bm X-Received: by 2002:a17:906:9743:: with SMTP id o3mr548434ejy.256.1643231810646; Wed, 26 Jan 2022 13:16:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643231810; cv=none; d=google.com; s=arc-20160816; b=eOOyPv2ZY96w/I2/H9rKXhWC+FVtY8f7AR5Rb0MlgxR9srGIPBL3Xni37kN2i/hVXg yftNwN1knVckxVaiI6YzNuqGqGMk29i/hZvQnHQSk9lJfMT+mS5ZT1tcsyssHNqbGQPA Te9nTz30yY/Qg7UrNk5xYvzWpjlauCT32xjcgvJjiRy9bCVY/v9GIcT7VQ5nWdzjHUP1 406BylnonCumyFdsNX1VZqdfOvaaJ6Ol+UHe7tKqyJ7s6s4DhKqk1S9+FjCkMfk+IOLH ILwSztD1Bts5/Y3IC0uH3W8Tj3JrfsOpFpAgbFVG4cvFyQ8ARFzxjtPmN/yXid1Wc7x3 MhNQ== 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=M2YMTUkG9L6YZB4e8xwRdDgcbfF6Hl+k2CHdxUKlyPU=; b=IR3dyFFahbFyVeZbClcySxIJ0EG7g/WqonRI/FfZv8XZKNRWtpTLz5LDo7ZRMKpnwO yB7PJ3Snyx4TD/H85LPJMT+Fs3s8uJEHnNQ8cWoDsn6ESDDNrJV2qtWrBOUi+TrW290F ilPKH2bv+EDgskCJTGpQW8/lTCMRekiHvy9ies6wfAVgxO2jAPZKYXmCLfdG0xbI/RxT hMoTwx8gTa789HymhM7bFH7UWQ0Y05cZXW39WaJZs22TKAb4KnWcl3Y7qNJfuBqGNgUK 0JtmnmaLWp1qe4u/ovV2cu9+KHJ2lNxcQRfB9OEhAjJtyB5q9WXnfDe0O8/DT414HTY2 O4lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=SIekuro3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si270518ede.419.2022.01.26.13.16.25; Wed, 26 Jan 2022 13:16:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=SIekuro3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241598AbiAZM7b (ORCPT + 99 others); Wed, 26 Jan 2022 07:59:31 -0500 Received: from box.trvn.ru ([194.87.146.52]:60139 "EHLO box.trvn.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231336AbiAZM7a (ORCPT ); Wed, 26 Jan 2022 07:59:30 -0500 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 E93954190B; Wed, 26 Jan 2022 17:59:16 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1643201957; bh=G71ArfVpNaJiU2mdnPLkKivWdWK1kkqUzewN9Q+lh/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIekuro3EB6cfyXeyMJtHmzCgwpUV2H5mGPA06TUSHeqvP2ZH0rMn8io8NWa35IYZ KoWSVYWl4zlTXBezrtqg/o5eKyplh6rX859DLc/eXG3zSdCKMwB2oy64ZgZkeT01jg L2jiJAORFuCFdRpPWURhmau4sBguiQR5bVKfHeHrH619+JMTLIj/yTsrfPTTNul3Yk R4pepu2OZJLgA1XpC1RbezlVaxHF+2OprubRFKS/57uAW/+lNJi+7/ZO+KE6ridRzz 0JRwqt3XPA9ABV4XFhbQIKE8FuPDjGAOOSdbO6A+NjYdZUXdp6ngveetgNcyd4lH7G yD+T3wY/1Ht+w== 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, sean.anderson@seco.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH v4 1/2] dt-bindings: pwm: Document clk based PWM controller Date: Wed, 26 Jan 2022 17:58:48 +0500 Message-Id: <20220126125849.75572-2-nikita@trvn.ru> In-Reply-To: <20220126125849.75572-1-nikita@trvn.ru> References: <20220126125849.75572-1-nikita@trvn.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add YAML devicetree binding for clk based PWM controller Signed-off-by: Nikita Travkin -- Changes in v2: - fix the file name. Changes in v4: - Use generic node name in the dt bindings example. --- .../devicetree/bindings/pwm/clk-pwm.yaml | 45 +++++++++++++++++++ 1 file changed, 45 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..d3416ba549b5 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/clk-pwm.yaml @@ -0,0 +1,45 @@ +# 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: + - clocks + +examples: + - | + pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + clocks = <&gcc 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_clk_flash_default>; + }; -- 2.34.1