Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp259413ybg; Tue, 2 Jun 2020 23:28:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx15o8P3antM9wFvt8sr1+gtFZpRoGSa2WUsKtkbNqPgDkcgDXqEhDnn6NurZvof7zRic0y X-Received: by 2002:a17:906:a44:: with SMTP id x4mr16190065ejf.237.1591165736419; Tue, 02 Jun 2020 23:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591165736; cv=none; d=google.com; s=arc-20160816; b=qpmIl7j8beAgpMoGtW7ER/rSF1IJ0mKcz0iVzMPn0rK20/h5yBCBCU4degXRQzE2mq vDqUBba29dkSvWwqvsnfaGjipV5s3YbqLS8e5QnkZ6yno3fgliVxHZxiPIphtzhDNjHP ffDKQaejyjKAxAHF0gH6j/51OloH1o/FbTnkFRCU5qd6C4ru9WUBSoqSYbMiiSO6cGLX C1wJDrTrIoOEOhK0GTvoZUcyQpUHvuxTI6UJ9W4pxSD11Ye2OUFsbP/vxq0ycZSLIwXZ cS8SXfcSH5OsTbIB5q8XIll7rX3JkntZadl3tkxvv+6Uehoa7BQqjPgjE3LleJh+pW26 tNbQ== 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=URce+dgkHo2RIw6WdYVB7Jc9O4jV804oUfEIsGRIbks=; b=0kTA4TLbqfZfTRAExROorietfwuQAw8+F+kQU/2D3GQhL/Io1XolHgSNi6/CCcVxu0 ZrP90D0zLPxnv7RccdG2tJlO7izi/fDSGTy9PjwHnfCVM9eC5Wf+VxjF/Cz1kg2qibiV 6L+/3lgmKiEgyOTrk22upZ4cpYh5kvcxxSYW1IHSPDaSSHr6Dc5Y0BI+r8oDtRCIZrH5 1QxrmOp8huq1WUo9Bml1y1Jo2gFP3nGJVc7UCmFEPjYM7AfT2t8owxNH88bMd4zi5mJB knG/W3uayHaA/dshcDYDJCK62t2eKPh7+DtLccfn4M4jIB5FU61dnWPLBeDdkuNCaH7G bJdw== 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 hh23si610244ejb.665.2020.06.02.23.28.33; Tue, 02 Jun 2020 23:28:56 -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 S1726054AbgFCGYL (ORCPT + 99 others); Wed, 3 Jun 2020 02:24:11 -0400 Received: from inva020.nxp.com ([92.121.34.13]:54202 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgFCGYE (ORCPT ); Wed, 3 Jun 2020 02:24:04 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 14A571A0F6F; Wed, 3 Jun 2020 08:24:02 +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 02B271A00B2; Wed, 3 Jun 2020 08:23:57 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A8D28402E8; Wed, 3 Jun 2020 14:23:50 +0800 (SGT) From: Anson Huang To: broonie@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, marex@denx.de, linux-spi@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 3/3] dt-bindings: spi: Convert imx lpspi to json-schema Date: Wed, 3 Jun 2020 14:13:29 +0800 Message-Id: <1591164809-13964-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591164809-13964-1-git-send-email-Anson.Huang@nxp.com> References: <1591164809-13964-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 LPSPI binding to DT schema format using json-schema Signed-off-by: Anson Huang --- .../devicetree/bindings/spi/spi-fsl-lpspi.txt | 29 ----------- .../devicetree/bindings/spi/spi-fsl-lpspi.yaml | 60 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt create mode 100644 Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt deleted file mode 100644 index e71b81a..0000000 --- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt +++ /dev/null @@ -1,29 +0,0 @@ -* Freescale Low Power SPI (LPSPI) for i.MX - -Required properties: -- compatible : - - "fsl,imx7ulp-spi" for LPSPI compatible with the one integrated on i.MX7ULP soc - - "fsl,imx8qxp-spi" for LPSPI compatible with the one integrated on i.MX8QXP soc -- reg : address and length of the lpspi master registers -- interrupt-parent : core interrupt controller -- interrupts : lpspi interrupt -- clocks : lpspi clock specifier. Its number and order need to correspond to the - value in clock-names. -- clock-names : Corresponding to per clock and ipg clock in "clocks" - respectively. In i.MX7ULP, it only has per clk, so use CLK_DUMMY - to fill the "ipg" blank. -- spi-slave : spi slave mode support. In slave mode, add this attribute without - value. In master mode, remove it. - -Examples: - -lpspi2: lpspi@40290000 { - compatible = "fsl,imx7ulp-spi"; - reg = <0x40290000 0x10000>; - interrupt-parent = <&intc>; - interrupts = ; - clocks = <&clks IMX7ULP_CLK_LPSPI2>, - <&clks IMX7ULP_CLK_DUMMY>; - clock-names = "per", "ipg"; - spi-slave; -}; diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml new file mode 100644 index 0000000..d18e2b0f --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spi-fsl-lpspi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Low Power SPI (LPSPI) for i.MX + +maintainers: + - Anson Huang + +allOf: + - $ref: "/schemas/spi/spi-controller.yaml#" + +properties: + compatible: + enum: + - fsl,imx7ulp-spi + - fsl,imx8qxp-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: SoC SPI per clock + - description: SoC SPI ipg clock + maxItems: 2 + + clock-names: + items: + - const: per + - const: ipg + maxItems: 2 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +examples: + - | + #include + #include + + spi@40290000 { + compatible = "fsl,imx7ulp-spi"; + reg = <0x40290000 0x10000>; + interrupt-parent = <&intc>; + interrupts = ; + clocks = <&clks IMX7ULP_CLK_LPSPI2>, + <&clks IMX7ULP_CLK_DUMMY>; + clock-names = "per", "ipg"; + spi-slave; + }; -- 2.7.4