Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp287293ybm; Thu, 28 May 2020 23:34:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/2iZBOOCk6eIz5cYdoYAz6JnIT0gX0QkMABfjsSQ8Mr9bfVhLz/AiYU1urQ1LvjIOlNN1 X-Received: by 2002:a17:906:198d:: with SMTP id g13mr6156152ejd.281.1590734062636; Thu, 28 May 2020 23:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590734062; cv=none; d=google.com; s=arc-20160816; b=gh24OhXgqW8s9VwqwRpQjgtKwGX5yYmZdi+KoQPdK0JaR7p7NqrRMM2Rtm/C1o4HJA 7KVfyL/6OfUb5yScsJ++rLQKf9d7Q1xQDZ7vfui2r0pf6x7JVU1C01vuNuEUjqYJVJef RrJsEGVv1Am06oAhPyxKo4ZD3lESzuTcfbMx4o8riAGSnwCoZv6Pu2I86RRwN0ucmKAj 2VdQnsvGyAf/B10TgFwjT9T46O39G6PoP5GfeszowvKzFay0VNt3uxGirhLgZjSMEscD 3s2AYVV0OYdwAW3H3eJ9F/RRkUY2A5eHiE2Dvzdry3fjULXg/JaIPT82CcDk979nPAdC Jv8Q== 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=ZBivmGSVpdaqFWAtxNCrIfaoGVjX0wCC2qk3lt9VlkA=; b=0uSSNFqBCumzM4ftGTzr5vACV+Pt6tBFrcFitbXEcr8c2VPYkxIHJeHd4cjEWn2/9J 30CQXENtuoVV/94vBHRE6dLekvBDq7wZ0Usocs2LQwJjLcl5KIUSLPOPiepHrL2iWMVy 61tuJPN8jvoxRuBjiiBWR4KoOGwVNB7hBOosS9Y5lGuKiO6TGLe6sz+qZiffWnfAi2JI WJQdH5b5GDMxEdVNu9skOTxyZcK7rL8X7753+gXPHo8+zCDTVKZI48mjsvY2vJjmm3AT OCW4idHIf8oqJnRGEqVHGrKZzys4wbIzpCOD9KMTbzfS+mHQwMzaphfbValHKpRcO6q6 wo3Q== 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 b17si4871526eja.150.2020.05.28.23.33.59; Thu, 28 May 2020 23:34:22 -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 S1726039AbgE2Gb6 (ORCPT + 99 others); Fri, 29 May 2020 02:31:58 -0400 Received: from inva021.nxp.com ([92.121.34.21]:43250 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbgE2Gb5 (ORCPT ); Fri, 29 May 2020 02:31:57 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 19940200087; Fri, 29 May 2020 08:31:55 +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 985C9200DAC; Fri, 29 May 2020 08:31:49 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id DBC31402A7; Fri, 29 May 2020 14:31:42 +0800 (SGT) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, aisheng.dong@nxp.com, linux-clk@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] dt-bindings: clock: Convert i.MX8QXP LPCG to json-schema Date: Fri, 29 May 2020 14:21:39 +0800 Message-Id: <1590733299-12051-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 i.MX8QXP LPCG binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- .../devicetree/bindings/clock/imx8qxp-lpcg.txt | 51 --------------- .../devicetree/bindings/clock/imx8qxp-lpcg.yaml | 72 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 51 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/imx8qxp-lpcg.txt create mode 100644 Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml diff --git a/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.txt b/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.txt deleted file mode 100644 index 965cfa4..0000000 --- a/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.txt +++ /dev/null @@ -1,51 +0,0 @@ -* NXP i.MX8QXP LPCG (Low-Power Clock Gating) Clock bindings - -The Low-Power Clock Gate (LPCG) modules contain a local programming -model to control the clock gates for the peripherals. An LPCG module -is used to locally gate the clocks for the associated peripheral. - -Note: -This level of clock gating is provided after the clocks are generated -by the SCU resources and clock controls. Thus even if the clock is -enabled by these control bits, it might still not be running based -on the base resource. - -Required properties: -- compatible: Should be one of: - "fsl,imx8qxp-lpcg-adma", - "fsl,imx8qxp-lpcg-conn", - "fsl,imx8qxp-lpcg-dc", - "fsl,imx8qxp-lpcg-dsp", - "fsl,imx8qxp-lpcg-gpu", - "fsl,imx8qxp-lpcg-hsio", - "fsl,imx8qxp-lpcg-img", - "fsl,imx8qxp-lpcg-lsio", - "fsl,imx8qxp-lpcg-vpu" -- reg: Address and length of the register set -- #clock-cells: Should be <1> - -The clock consumer should specify the desired clock by having the clock -ID in its "clocks" phandle cell. -See the full list of clock IDs from: -include/dt-bindings/clock/imx8qxp-clock.h - -Examples: - -#include - -conn_lpcg: clock-controller@5b200000 { - compatible = "fsl,imx8qxp-lpcg-conn"; - reg = <0x5b200000 0xb0000>; - #clock-cells = <1>; -}; - -usdhc1: mmc@5b010000 { - compatible = "fsl,imx8qxp-usdhc", "fsl,imx7d-usdhc"; - interrupt-parent = <&gic>; - interrupts = ; - reg = <0x5b010000 0x10000>; - clocks = <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_IPG_CLK>, - <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_PER_CLK>, - <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_HCLK>; - clock-names = "ipg", "per", "ahb"; -}; diff --git a/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml b/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml new file mode 100644 index 0000000..d5b6825 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/imx8qxp-lpcg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8QXP LPCG (Low-Power Clock Gating) Clock bindings + +maintainers: + - Aisheng Dong + +description: | + The Low-Power Clock Gate (LPCG) modules contain a local programming + model to control the clock gates for the peripherals. An LPCG module + is used to locally gate the clocks for the associated peripheral. + + This level of clock gating is provided after the clocks are generated + by the SCU resources and clock controls. Thus even if the clock is + enabled by these control bits, it might still not be running based + on the base resource. + + The clock consumer should specify the desired clock by having the clock + ID in its "clocks" phandle cell. See the full list of clock IDs from: + include/dt-bindings/clock/imx8-clock.h + +properties: + compatible: + enum: + - fsl,imx8qxp-lpcg-adma + - fsl,imx8qxp-lpcg-conn + - fsl,imx8qxp-lpcg-dc + - fsl,imx8qxp-lpcg-dsp + - fsl,imx8qxp-lpcg-gpu + - fsl,imx8qxp-lpcg-hsio + - fsl,imx8qxp-lpcg-img + - fsl,imx8qxp-lpcg-lsio + - fsl,imx8qxp-lpcg-vpu + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +examples: + - | + #include + #include + #include + + clock-controller@5b200000 { + compatible = "fsl,imx8qxp-lpcg-conn"; + reg = <0x5b200000 0xb0000>; + #clock-cells = <1>; + }; + + mmc@5b010000 { + compatible = "fsl,imx8qxp-usdhc", "fsl,imx7d-usdhc"; + interrupts = ; + reg = <0x5b010000 0x10000>; + clocks = <&conn_lpcg IMX_CONN_LPCG_SDHC0_IPG_CLK>, + <&conn_lpcg IMX_CONN_LPCG_SDHC0_PER_CLK>, + <&conn_lpcg IMX_CONN_LPCG_SDHC0_HCLK>; + clock-names = "ipg", "per", "ahb"; + power-domains = <&pd IMX_SC_R_SDHC_0>; + status = "disabled"; + }; -- 2.7.4