Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp954902ybg; Wed, 3 Jun 2020 19:14:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeg0qTmNZqG+uLYPgXmLFPyxKWD/QxTa/HCj3097CDT4D6d/Gov4PcyGUk7PMNePvUq5aX X-Received: by 2002:a17:906:39b:: with SMTP id b27mr1868338eja.421.1591236894483; Wed, 03 Jun 2020 19:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591236894; cv=none; d=google.com; s=arc-20160816; b=F8yoGhZha43yrNxjWUTUd/HgKQIHs4PZi+s//oBiKo7IjYu0AsbdmX5H5RyQvLp34m O2oPN0O2K0nue0Xhj/9z7hIIib6i8VILBeQbXJoduR6C6iraU9FVdIAYFH4dELr5M1B3 7XP2hbhNIlz/w7CmAMclYTBWLC0x/+rItMuL8JG+8nbeRlpzGYVY9sHxgJgVj9FgU+NI 9SUVeQD/CjKEVlf++n2bl6NW+BZeRbmd9FY9sE5UepsceLaqUGkUrNcsFzJuneVj1BKe +8GT687M1K4zpw5aca9ijifu2/T2E4DGis8EskhTs+DS8F1sTuPvGaRgMkj7zVwSqOd4 /ozQ== 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=7zzVq43CAbWdtWHBydVdw54RomK8PCGpgwypQDHwGwk=; b=BAbvahXt0TkMiQ3gRsWEyi1Gz4Y1sQVs7OiexFszAi3BXrvqBPTOa1lab6lYou6FIO ebeBfNM9uwgVROTWf7IUkdyhEmfcgnCaCnAAaOYWwPYx/EcRCIXg7vh1TMAvF6dhrKYR h60ZeyJ1f5XlAQtlPHJ/+XnWG1iAHWaZkBewzc211LpjHD0mEY8ZhcSlmym+d2wPZKu3 N2A86jJgBW6XYqoIepfd/49d3xUKyQPnW13W7WQ86IR886ApW+wTG0ZyACv8sqvfxoT7 8TUWs3cps3vL6KeImyUg4Rt+c/l8t50GCwApaXi3UCDPgCP1irrP4BDUSX6QfNGiHWhb 9UXw== 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 z28si872088edi.287.2020.06.03.19.14.30; Wed, 03 Jun 2020 19:14:54 -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 S1726907AbgFDCGK (ORCPT + 99 others); Wed, 3 Jun 2020 22:06:10 -0400 Received: from inva021.nxp.com ([92.121.34.21]:53866 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbgFDCGI (ORCPT ); Wed, 3 Jun 2020 22:06:08 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A612520011E; Thu, 4 Jun 2020 04:06:05 +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 97C5020013B; Thu, 4 Jun 2020 04:06:00 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4EFFF402B0; Thu, 4 Jun 2020 10:05:54 +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 V2 3/3] dt-bindings: spi: Convert imx lpspi to json-schema Date: Thu, 4 Jun 2020 09:55:31 +0800 Message-Id: <1591235731-15673-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591235731-15673-1-git-send-email-Anson.Huang@nxp.com> References: <1591235731-15673-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 --- Changes since V1: - add "unevaluatedProperties: false". --- .../devicetree/bindings/spi/spi-fsl-lpspi.txt | 29 ---------- .../devicetree/bindings/spi/spi-fsl-lpspi.yaml | 62 ++++++++++++++++++++++ 2 files changed, 62 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..8ceb529 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml @@ -0,0 +1,62 @@ +# 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 + +unevaluatedProperties: false + +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