Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3191707ybk; Mon, 18 May 2020 21:08:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2Ld86CEIGCUb2X8RVRdSxC+HvC5N0vknZNxKCp3PzZ44ULC2K+pH5s33B8Qsj7KSHvInS X-Received: by 2002:a50:d65c:: with SMTP id c28mr15510117edj.21.1589861297535; Mon, 18 May 2020 21:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589861297; cv=none; d=google.com; s=arc-20160816; b=DAFP/4WY09mvXJ45ZY+FJ4t3n8reGlO+ckT+27Qvj1fC6HYoNNpM3ZtlWqnNhNB0bK tetzCWQPgJIlF35Hdc8jUU6z0CZjPxna7r/KaLknNpumeWZupS2ZKhUlm+UJd6vpzqsQ Lz8XENikwzYLoTCGrfjX6gPt3XTFV38rizjY0CwNQIZFlbSL8pmvqEG0PaaZoW2YaGnx PiP8COMr53obxxrxFfdi2B0T6kV9NG8qjrz59x3YDPdfXeKWLxkQS9kxruXHsZVYPlUf aikwmROAYw2gf2P50FzSW9fgas82aWKs5R65S+VauIUHM6N7UEFpjjIoBuhZXeagGJU6 R70w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=zTblBBFrR3DUgzhR63Z0ARfTUtNlJmbqUUlo1o23iDw=; b=wvmMoIN3qfq2hMNe3DgKKPIjwMSJVDVSyqeQkh3kVKc9ex/rgBuqB9JiEzOv6orMvR 2k60FGzasxfQ21q2LrznJwMkI+KvRfljjjGvki/RyjAON95+yt13K72Brvh3Fv4zv3vW j+9o9EFhfRCe1Lm3bHiTQY0HP8VG0Fc8xc6R7OeAkceBhVuNIMIGkn58SEy2x5eos/CZ MkbUGlCfp2zgmi5DHXzvzQi4T+HyxQCcLuv36tx2mMihj6Y+/FzQAZd3h/f3QuMf9esf GuB8AlhOGvo8oE9dA9cG5gQGHPwIUEGa1Q0f2Qa0iLt+hhb0sLr3eLk3KfFYvpICNmg1 pOcQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si2191283ejm.140.2020.05.18.21.07.54; Mon, 18 May 2020 21:08:17 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726905AbgESEFo (ORCPT + 99 others); Tue, 19 May 2020 00:05:44 -0400 Received: from inva020.nxp.com ([92.121.34.13]:38110 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbgESEFo (ORCPT ); Tue, 19 May 2020 00:05:44 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F8ED1A0067; Tue, 19 May 2020 06:05:42 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9F6661A00A9; Tue, 19 May 2020 06:05:36 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1A5FB402E7; Tue, 19 May 2020 12:05:24 +0800 (SGT) From: Anson Huang To: daniel.lezcano@linaro.org, tglx@linutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, ping.bai@nxp.com, aisheng.dong@nxp.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linux-imx@nxp.com Subject: [PATCH V2 2/3] dt-bindings: timer: Convert i.MX TPM to json-schema Date: Tue, 19 May 2020 11:55:46 +0800 Message-Id: <1589860547-3207-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589860547-3207-1-git-send-email-Anson.Huang@nxp.com> References: <1589860547-3207-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the i.MX TPM binding to DT schema format using json-schema. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng --- Changes since V1: - remove unnecessary maxItems for clocks/clock-names. --- .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 ---------- .../devicetree/bindings/timer/nxp,tpm-timer.yaml | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt create mode 100644 Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml diff --git a/Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt b/Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt deleted file mode 100644 index f82087b..0000000 --- a/Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt +++ /dev/null @@ -1,28 +0,0 @@ -NXP Low Power Timer/Pulse Width Modulation Module (TPM) - -The Timer/PWM Module (TPM) supports input capture, output compare, -and the generation of PWM signals to control electric motor and power -management applications. The counter, compare and capture registers -are clocked by an asynchronous clock that can remain enabled in low -power modes. TPM can support global counter bus where one TPM drives -the counter bus for the others, provided bit width is the same. - -Required properties: - -- compatible : should be "fsl,imx7ulp-tpm" -- reg : Specifies base physical address and size of the register sets - for the clock event device and clock source device. -- interrupts : Should be the clock event device interrupt. -- clocks : The clocks provided by the SoC to drive the timer, must contain - an entry for each entry in clock-names. -- clock-names : Must include the following entries: "ipg" and "per". - -Example: -tpm5: tpm@40260000 { - compatible = "fsl,imx7ulp-tpm"; - reg = <0x40260000 0x1000>; - interrupts = ; - clocks = <&clks IMX7ULP_CLK_NIC1_BUS_DIV>, - <&clks IMX7ULP_CLK_LPTPM5>; - clock-names = "ipg", "per"; -}; diff --git a/Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml b/Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml new file mode 100644 index 0000000..edd9585 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/nxp,tpm-timer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Low Power Timer/Pulse Width Modulation Module (TPM) + +maintainers: + - Dong Aisheng + +description: | + The Timer/PWM Module (TPM) supports input capture, output compare, + and the generation of PWM signals to control electric motor and power + management applications. The counter, compare and capture registers + are clocked by an asynchronous clock that can remain enabled in low + power modes. TPM can support global counter bus where one TPM drives + the counter bus for the others, provided bit width is the same. + +properties: + compatible: + const: fsl,imx7ulp-tpm + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: SoC TPM ipg clock + - description: SoC TPM per clock + + clock-names: + items: + - const: ipg + - const: per + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + + timer@40260000 { + compatible = "fsl,imx7ulp-tpm"; + reg = <0x40260000 0x1000>; + interrupts = ; + clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>, + <&pcc2 IMX7ULP_CLK_LPTPM5>; + clock-names = "ipg", "per"; + }; -- 2.7.4