From patchwork Tue Oct 11 16:29:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 614367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E4C8C433F5 for ; Tue, 11 Oct 2022 16:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbiJKQ3t (ORCPT ); Tue, 11 Oct 2022 12:29:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbiJKQ3s (ORCPT ); Tue, 11 Oct 2022 12:29:48 -0400 Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89112F036; Tue, 11 Oct 2022 09:29:46 -0700 (PDT) Received: by mail-oo1-f49.google.com with SMTP id u19-20020a4a9e93000000b004757198549cso10445061ook.0; Tue, 11 Oct 2022 09:29:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hqpo7N9AbT0RGrhImIieGDVa4hsFpKgESHXQ8QIN+fQ=; b=InbK4D29gg7j3EpPYyVlxhqDEKbpzzGpR2RSzXyThQrkvIK08o4QYEElZ7ZGjI1Mvr 3KLIPtbIU7Y9bzEsdGyEfdR7O7c3FzrJarzRFbTWY2zTqCR4Zc61UNbKa9QNsrIHKP4j zcDFJOlbSCzVDUvI+bDLJs01MyzG9agvOWrqhZ+SQz79JRIo2cdNMF95VlbjuwqyfAoz sJy5og7QwCLnjMkalJUmFr7vPnu97r5AbCjF1Lut8/Ict6IdDtJWGKngbvf3uq9XRklO AMbU3jReQ/49NvlVMByn/iDSCCcUl9nRADyuerR5p0tZSLGDkSXeSl4yfHKluthcuKjS DNAg== X-Gm-Message-State: ACrzQf2sX+eqcOoDoczBGZEVY6T/YY3XWl4/i3y4HgzoIx7T8BUnyH2d AeDMwRCSNm5zSZ6n2I8B9v86zL3aHA== X-Google-Smtp-Source: AMsMyM6j8/ozSofZ+EmWAZmg/pPilAn8Mcf/AbHws7NpbRGd8HSMGgaSKjybBjzmHihtdG6gy2hEIg== X-Received: by 2002:a05:6830:922:b0:659:ef01:7e29 with SMTP id v34-20020a056830092200b00659ef017e29mr11190531ott.209.1665505784712; Tue, 11 Oct 2022 09:29:44 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s63-20020acac242000000b0035173c2fddasm5591834oif.51.2022.10.11.09.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 09:29:43 -0700 (PDT) Received: (nullmailer pid 3025544 invoked by uid 1000); Tue, 11 Oct 2022 16:29:45 -0000 From: Rob Herring To: Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: clock: Convert pwm-clock to DT schema Date: Tue, 11 Oct 2022 11:29:18 -0500 Message-Id: <20221011162919.3025038-1-robh@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the pwm-clock binding to DT schema format. A straight-forward conversion. Signed-off-by: Rob Herring --- .../devicetree/bindings/clock/pwm-clock.txt | 26 ----------- .../devicetree/bindings/clock/pwm-clock.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/pwm-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/pwm-clock.yaml diff --git a/Documentation/devicetree/bindings/clock/pwm-clock.txt b/Documentation/devicetree/bindings/clock/pwm-clock.txt deleted file mode 100644 index 83db876b3b90..000000000000 --- a/Documentation/devicetree/bindings/clock/pwm-clock.txt +++ /dev/null @@ -1,26 +0,0 @@ -Binding for an external clock signal driven by a PWM pin. - -This binding uses the common clock binding[1] and the common PWM binding[2]. - -[1] Documentation/devicetree/bindings/clock/clock-bindings.txt -[2] Documentation/devicetree/bindings/pwm/pwm.txt - -Required properties: -- compatible : shall be "pwm-clock". -- #clock-cells : from common clock binding; shall be set to 0. -- pwms : from common PWM binding; this determines the clock frequency - via the period given in the PWM specifier. - -Optional properties: -- clock-output-names : From common clock binding. -- clock-frequency : Exact output frequency, in case the PWM period - is not exact but was rounded to nanoseconds. - -Example: - clock { - compatible = "pwm-clock"; - #clock-cells = <0>; - clock-frequency = <25000000>; - clock-output-names = "mipi_mclk"; - pwms = <&pwm2 0 40>; /* 1 / 40 ns = 25 MHz */ - }; diff --git a/Documentation/devicetree/bindings/clock/pwm-clock.yaml b/Documentation/devicetree/bindings/clock/pwm-clock.yaml new file mode 100644 index 000000000000..f88ecb2995e0 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/pwm-clock.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/pwm-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: An external clock signal driven by a PWM pin. + +maintainers: + - Philipp Zabel + +properties: + compatible: + const: pwm-clock + + '#clock-cells': + const: 0 + + clock-frequency: + description: Exact output frequency, in case the PWM period is not exact + but was rounded to nanoseconds. + + clock-output-names: + maxItems: 1 + + pwms: + maxItems: 1 + +required: + - compatible + - '#clock-cells' + - pwms + +additionalProperties: false + +examples: + - | + clock { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + clock-output-names = "mipi_mclk"; + pwms = <&pwm2 0 40>; /* 1 / 40 ns = 25 MHz */ + }; +...