Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2791074ybk; Mon, 18 May 2020 08:02:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAxJWdiS/wmRrobVLfEWg9s7YiwSQZ78RY/fHMMYuSdoPHz20/jBkymGg3K8qEiowXawt3 X-Received: by 2002:a05:6402:555:: with SMTP id i21mr5023285edx.119.1589814124424; Mon, 18 May 2020 08:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589814124; cv=none; d=google.com; s=arc-20160816; b=nKD2vyNWIlrKa5A0vR9f4M8AjKDApjqF/Evp/5SkvNHK4DxK7V/GMfytBxKT16OSFA JaYpYz3D1d575mJwS77jy8+W+jfUpBbyfT6OcomPGiCcAuWGQlaA5aiOVTZh1w5MRorc RLaaA4+wE9pnUQDkErQ3i+51o5acwgonaZJsteBbNAQTl9NbdiutLxNv+1XFEKiFsFaA p0uM4JdTsOpVvDYfLMn9zMBMm6ELuc+r6KYHzkX/KBwm43ths5aZDUNTo22JV9SoSk/J NyAdHocPEt99/+E+YZMX1/aZvpPj5pzlCEB0blXYd78K++1uHuEqqbgDJ+HTPUDtGj7l /0Zg== 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=JHf83nLK68O6QTTOeran2jXqwOyO2sqKoCYWQalXDsg=; b=w9lsltICHM3cr6aLyoRFrK/ChGo65JFCWF6F9eh4Qfb4LW3k0ZPKUPbLr0rcKj8V2k Bjhw70n29WZ7DLbbQIZeBmJ1uxzmOeb2P5DLOCtiNijodRovKNj4XOI7xOT5faNCwocg Wd0uWjWv7KssoAfO9qJlbUwT2F8ISrcJfVCcW6rhmYGfH19GOdE6bIQ5jACQPWaMZn23 ChGFrOPt5eBW6E2ySxeo+Gfzq/GPVq5iwUdI+WH5JZSBV8RJyUaKYOUl17PZAGylpClL IX0myEI7f+jRpg1WKsGVEpHUTrqrtlOiMDeCP5pz4eOpfGlU/7hkXZDQsOaWneNqL7ca lguw== 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 z16si4164697edi.116.2020.05.18.08.01.39; Mon, 18 May 2020 08:02:04 -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 S1728187AbgERO5i (ORCPT + 99 others); Mon, 18 May 2020 10:57:38 -0400 Received: from inva020.nxp.com ([92.121.34.13]:56316 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbgERO53 (ORCPT ); Mon, 18 May 2020 10:57:29 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0AF6D1A0B12; Mon, 18 May 2020 16:57:28 +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 8F17E1A0B14; Mon, 18 May 2020 16:57:22 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D0E09402AF; Mon, 18 May 2020 22:57:15 +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 2/3] dt-bindings: timer: Convert i.MX TPM to json-schema Date: Mon, 18 May 2020 22:47:39 +0800 Message-Id: <1589813260-20036-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589813260-20036-1-git-send-email-Anson.Huang@nxp.com> References: <1589813260-20036-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 --- .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 ---------- .../devicetree/bindings/timer/nxp,tpm-timer.yaml | 63 ++++++++++++++++++++++ 2 files changed, 63 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..0d34610 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml @@ -0,0 +1,63 @@ +# 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 + maxItems: 2 + + clock-names: + items: + - const: ipg + - const: per + maxItems: 2 + +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