Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1106325ybk; Thu, 14 May 2020 00:05:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2L5AHRg7Vyp/4xQgPIOxnoIXMFR1CKTyQXIpj2SuBywPdIoRBnoYkISl+S9VId3wlZtfg X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr2742058edb.336.1589439937995; Thu, 14 May 2020 00:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589439937; cv=none; d=google.com; s=arc-20160816; b=kP/6Di5HxyE5jmPiiIOx7O2LcWPQE2s04941m2a6kXaBqUVGA53xbqla+DemUTuWaA D5fPL/23yr4Qw2WD0lrXV7xaHUo1FsHyKdSXxD69lVUlfQ5XjdBrltmWBZdgzOnJItw/ Gv/xxHl5ci8jyOMhBDZdfaXb+GbZI78ALVYyOvXaFTnXaeCYsstfgpuJGNU/oz/kaNaf RmkZN71xBvqkpA7yxtr8NQ65gY0onLbj/0X3IbVJvZhSn9m9zDStRMiA/pBuKS14g4En XWSq18Lanq0K6IX3AdZyd4SXA8FMVL/Ho/nxf8CUJI2UoeSfyj4qze1L9/MKjH1hG5/a JwRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Ca+vXWUGkObPg7FAO6JgIfrZ3bx5oyKlhp/yI4YTbfo=; b=LdwYNwNGttPSWyGUql24zI1cfgiBznCEIxQRpeALdOUDrqtMzH3fxzOajlIw2NN69w 8yt1NhNYVfdpyPnYCrTh7OkfX+qF3tB+Gz/hUxJaE9N+7hU0VFptcr7kJZEyAfMCp/rO qXUMyYJhGzjMfpFcgyN2TeMQWxbp1VG3rPKqAdtMl/1hLEvwvLmHLWEiFu6Qom6c3gPT XH6SAF4qwNqZRvOkby1YAg4SpIWR7pJ/ff9tPmrBvY42qIKwKGitNy0G7ooWfJ/kNHzM 0LRMcib7qarMoZNRcRgxu08eB9CfOaKomsWOxBGfuTKbSIU06xQlpQGVnyIpDyowWRfJ B7Hg== 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 bo6si1049978edb.586.2020.05.14.00.05.14; Thu, 14 May 2020 00:05:37 -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 S1726088AbgENHDy (ORCPT + 99 others); Thu, 14 May 2020 03:03:54 -0400 Received: from inva020.nxp.com ([92.121.34.13]:44246 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbgENHDy (ORCPT ); Thu, 14 May 2020 03:03:54 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DB4881A0148; Thu, 14 May 2020 09:03:51 +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 6C4481A0132; Thu, 14 May 2020 09:03:46 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id AE84F402B4; Thu, 14 May 2020 15:03:39 +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 1/2] dt-bindings: pwm: Convert imx pwm to json-schema Date: Thu, 14 May 2020 14:54:18 +0800 Message-Id: <1589439259-28510-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 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 pwm binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 27 --------- Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.txt create mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt b/Documentation/devicetree/bindings/pwm/imx-pwm.txt deleted file mode 100644 index 22f1c3d..0000000 --- a/Documentation/devicetree/bindings/pwm/imx-pwm.txt +++ /dev/null @@ -1,27 +0,0 @@ -Freescale i.MX PWM controller - -Required properties: -- compatible : should be "fsl,-pwm" and one of the following - compatible strings: - - "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1 - - "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27 -- reg: physical base address and length of the controller's registers -- #pwm-cells: 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml - in this directory for a description of the cells format. -- clocks : Clock specifiers for both ipg and per clocks. -- clock-names : Clock names should include both "ipg" and "per" -See the clock consumer binding, - Documentation/devicetree/bindings/clock/clock-bindings.txt -- interrupts: The interrupt for the pwm controller - -Example: - -pwm1: pwm@53fb4000 { - #pwm-cells = <3>; - compatible = "fsl,imx53-pwm", "fsl,imx27-pwm"; - reg = <0x53fb4000 0x4000>; - clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>, - <&clks IMX5_CLK_PWM1_HF_GATE>; - clock-names = "ipg", "per"; - interrupts = <61>; -}; diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml new file mode 100644 index 0000000..4b62af2 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/imx-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX PWM controller + +maintainers: + - Philipp Zabel + +properties: + "#pwm-cells": + description: | + Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml + in this directory for a description of the cells format. + enum: + - 2 + - 3 + + compatible: + enum: + - fsl,imx1-pwm + - fsl,imx27-pwm + + reg: + maxItems: 1 + + clocks: + items: + - description: SoC PWM ipg clock + - description: SoC PWM per clock + maxItems: 2 + + clock-names: + items: + - const: ipg + - const: per + maxItems: 2 + + interrupts: + maxItems: 1 + +required: + - "#pwm-cells" + - compatible + - reg + - clocks + - clock-names + - interrupts + +additionalProperties: false + +examples: + - | + #include + + pwm@53fb4000 { + #pwm-cells = <3>; + compatible = "fsl,imx27-pwm"; + reg = <0x53fb4000 0x4000>; + clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>, + <&clks IMX5_CLK_PWM1_HF_GATE>; + clock-names = "ipg", "per"; + interrupts = <61>; + }; -- 2.7.4