Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1106345ybk; Thu, 14 May 2020 00:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfvmxUBFiGzRzmIWQy103BwbhIOPm37z9sdQxBULGvayQqsHgMHd2Jxl1iv57ykMrayhxN X-Received: by 2002:a50:9603:: with SMTP id y3mr2823100eda.80.1589439941839; Thu, 14 May 2020 00:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589439941; cv=none; d=google.com; s=arc-20160816; b=KpA9TsWntcJant9xQPOyvULGZs5DWLuJ7/b7Rtj4hua1XpV0mRHMdw/LEFRQKPowVI /DBqZtNVYn++20Rty8NH6zllom2AEdgpGGJuF3z1ed4wjuv+KCYvvJWR7M1qjBwu2Dre J56VhfbcTD2FhyapBh+cGbTsUPvzoifmow/fSKcXxZdB+zrKE1vFMrdnIALxNb7Q9jGa rWxMooWHLtkavgUej4CjFy76FmDcNU6dhPzweldyYETUjz00BP1+te3SLiiZ3ONSQzGo ysP2KSec9rQ/v3rtc0J8itOdqYNyLOkuX4+Yaon8LWEVFkEcB9g++5iq70tXGH8RX11B ODcw== 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=m7cqqwJj3m/marPVbCLCi2+5j8jt1CpSW9PyaKn+PKk=; b=nY+9ce9CF3vbBPE/7lvBndZCQkRIvpzBMn9SWHySAb/bTeYZZsPZ/p2xZLk6GWYAxU SSm+chm18CM/1yngluU6WvLmoPnOCentoF4x0EQfYZGff8pfbNEtnLne/WDtFnF4Qse8 HN4zfXN2Ipr+GqZ8NTcKn5WEZ4zX3a9SwuJV4fj2R1y61doEDh7mGgU1LlCdVYVBQeLO OGVJUywCEqeqCkKG+JDmOfffqBAjUWlWhBCU9XHanXyorZL1Kjbh648uHXFT3hsy1pjG afZqQ/LdbALN01AsrWSTyAuFm3VHtFP/RjCkilIXUuLl56shl+XqBXwu3UyceJsY92kU VIvg== 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 a25si1061337edb.112.2020.05.14.00.05.19; Thu, 14 May 2020 00:05:41 -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 S1726116AbgENHD5 (ORCPT + 99 others); Thu, 14 May 2020 03:03:57 -0400 Received: from inva021.nxp.com ([92.121.34.21]:33332 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbgENHDz (ORCPT ); Thu, 14 May 2020 03:03:55 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E0DAA2016FC; Thu, 14 May 2020 09:03:52 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A651520178E; Thu, 14 May 2020 09:03:47 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E883B402BB; Thu, 14 May 2020 15:03:40 +0800 (SGT) From: Anson Huang To: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, p.zabel@pengutronix.de, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 2/2] dt-bindings: pwm: Convert imx tpm pwm to json-schema Date: Thu, 14 May 2020 14:54:19 +0800 Message-Id: <1589439259-28510-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589439259-28510-1-git-send-email-Anson.Huang@nxp.com> References: <1589439259-28510-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 imx tpm pwm binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- .../devicetree/bindings/pwm/imx-tpm-pwm.txt | 22 --------- .../devicetree/bindings/pwm/imx-tpm-pwm.yaml | 55 ++++++++++++++++++++++ 2 files changed, 55 insertions(+), 22 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt create mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt deleted file mode 100644 index 5bf2095..0000000 --- a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt +++ /dev/null @@ -1,22 +0,0 @@ -Freescale i.MX TPM PWM controller - -Required properties: -- compatible : Should be "fsl,imx7ulp-pwm". -- reg: Physical base address and length of the controller's registers. -- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of the cells format. -- clocks : The clock provided by the SoC to drive the PWM. -- interrupts: The interrupt for the PWM controller. - -Note: The TPM counter and period counter are shared between multiple channels, so all channels -should use same period setting. - -Example: - -tpm4: pwm@40250000 { - compatible = "fsl,imx7ulp-pwm"; - reg = <0x40250000 0x1000>; - assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>; - assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>; - clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>; - #pwm-cells = <3>; -}; diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml new file mode 100644 index 0000000..fe9ef42 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/imx-tpm-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX TPM PWM controller + +maintainers: + - Anson Huang + +description: | + The TPM counter and period counter are shared between multiple + channels, so all channels should use same period setting. + +properties: + "#pwm-cells": + const: 3 + + compatible: + enum: + - fsl,imx7ulp-pwm + + reg: + maxItems: 1 + + assigned-clocks: + maxItems: 1 + + assigned-clock-parents: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - "#pwm-cells" + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + #include + + pwm@40250000 { + compatible = "fsl,imx7ulp-pwm"; + reg = <0x40250000 0x1000>; + assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>; + assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>; + clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>; + #pwm-cells = <3>; + }; -- 2.7.4