Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp951910ybg; Wed, 3 Jun 2020 19:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO/EbYfvNJjezkuF8XY77x5Cn2PLkNHOUtmyP1TWdJMezcVotgLrnJny9WusOxuobFSbwz X-Received: by 2002:aa7:dad6:: with SMTP id x22mr2201601eds.265.1591236493007; Wed, 03 Jun 2020 19:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591236493; cv=none; d=google.com; s=arc-20160816; b=eXq1PRKFvwlH4WoHnp48tebLvJKhISykLFFvkVqBhC3sX1S4euT7Z5YEhfql49a0w/ /tOtyA8QQ3rv5wWTMKJoqOs8pznqR/dTp8SwLnelvpFiFCf0UcXqasWfYvTnNiRPyjxd FBg2qNBs/ZLpNHdkiMyRgVCDx6yXBuZcPgubHXPRyh4Mv10c3KY/NPTkUe1Zv5ppKCEA ouuEhVIl/9DnMNMtEXU22eFu1C3W2vh50mMqtxrN7a+QCtCoYy9SoHK1NC4J/KQjKCi1 ggrxCsgMQLkhDlcBYODcmzyA4VcBueIQblrhVhm8sJ1tOPp/G8yHdFBb8+tXYN54VYlO Hpfw== 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=lPMJcyyURL4ovN2Kk+SZqWXBRV0k2NR/oWwv/Vz8iNc=; b=TA7fUHBEWOg5CpYjMb8aNgC33bEarxEKM2Kdq6y+/gAfJoLbMelkc2D66vXmQvaO4J R9duruMiwV54k94IXTsygN+lzIx5tr93+mKVeN3oOmx8T1MGyhtnuHQ/6w8PQiM/8U0c vwj2J7jJ6UttFuJnrP/RmuLy9IQQqLN0gaVxg/nKvtDAUDmW6AdDZvTR/3UNypacG3py TYGKt0RH1oj2TCSaRaML+iLgAXD3ObrS5jLp9CsugqIiDtCRNzR/PHPN7DpG7dCbNXQr K5WFC1aCC/wlIe0GQu6Dl8Rc6xrjj7YR/qBLdpi/aVAbnLcQoy1Aos43zTMV81BVzyCc Fbyg== 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 r26si761155eja.652.2020.06.03.19.07.50; Wed, 03 Jun 2020 19:08:12 -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 S1726592AbgFDCGG (ORCPT + 99 others); Wed, 3 Jun 2020 22:06:06 -0400 Received: from inva021.nxp.com ([92.121.34.21]:53810 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbgFDCGF (ORCPT ); Wed, 3 Jun 2020 22:06:05 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 438FA200135; Thu, 4 Jun 2020 04:06:03 +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 4B0B220011E; Thu, 4 Jun 2020 04:05:58 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 02379402A5; Thu, 4 Jun 2020 10:05:51 +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 1/3] dt-bindings: spi: Convert mxs spi to json-schema Date: Thu, 4 Jun 2020 09:55:29 +0800 Message-Id: <1591235731-15673-2-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 MXS SPI binding to DT schema format using json-schema Signed-off-by: Anson Huang --- Changes since V1: - add "unevaluatedProperties: false". --- Documentation/devicetree/bindings/spi/mxs-spi.txt | 26 ---------- Documentation/devicetree/bindings/spi/mxs-spi.yaml | 57 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/mxs-spi.txt create mode 100644 Documentation/devicetree/bindings/spi/mxs-spi.yaml diff --git a/Documentation/devicetree/bindings/spi/mxs-spi.txt b/Documentation/devicetree/bindings/spi/mxs-spi.txt deleted file mode 100644 index 3499b73..0000000 --- a/Documentation/devicetree/bindings/spi/mxs-spi.txt +++ /dev/null @@ -1,26 +0,0 @@ -* Freescale MX233/MX28 SSP/SPI - -Required properties: -- compatible: Should be "fsl,-spi", where soc is "imx23" or "imx28" -- reg: Offset and length of the register set for the device -- interrupts: Should contain SSP ERROR interrupt -- dmas: DMA specifier, consisting of a phandle to DMA controller node - and SSP DMA channel ID. - Refer to dma.txt and fsl-mxs-dma.txt for details. -- dma-names: Must be "rx-tx". - -Optional properties: -- clock-frequency : Input clock frequency to the SPI block in Hz. - Default is 160000000 Hz. - -Example: - -ssp0: ssp@80010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx28-spi"; - reg = <0x80010000 0x2000>; - interrupts = <96>; - dmas = <&dma_apbh 0>; - dma-names = "rx-tx"; -}; diff --git a/Documentation/devicetree/bindings/spi/mxs-spi.yaml b/Documentation/devicetree/bindings/spi/mxs-spi.yaml new file mode 100644 index 0000000..68c5d6d --- /dev/null +++ b/Documentation/devicetree/bindings/spi/mxs-spi.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/mxs-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MX233/MX28 SSP/SPI + +maintainers: + - Marek Vasut + +allOf: + - $ref: "/schemas/spi/spi-controller.yaml#" + +properties: + compatible: + enum: + - fsl,imx23-spi + - fsl,imx28-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dmas: + maxItems: 1 + + dma-names: + const: rx-tx + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: input clock frequency to the SPI block in Hz. + default: 160000000 + +required: + - compatible + - reg + - interrupts + - dmas + - dma-names + +unevaluatedProperties: false + +examples: + - | + spi@80010000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx28-spi"; + reg = <0x80010000 0x2000>; + interrupts = <96>; + dmas = <&dma_apbh 0>; + dma-names = "rx-tx"; + }; -- 2.7.4