Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2172608ybt; Mon, 15 Jun 2020 21:41:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT24RLk2zMz2ZzcGyWc/QgDT65cjNZ+aVpeFMxHOkqKe7IWT1jIQ0Xc7O+Mq9njQxNCKGo X-Received: by 2002:aa7:cdcb:: with SMTP id h11mr936085edw.218.1592282488362; Mon, 15 Jun 2020 21:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592282488; cv=none; d=google.com; s=arc-20160816; b=JI8GUGvHQpilA6Bu2CR5NA0NVQN0am608IfuUGE7RgNMhq6wq3OYL9s4eV8mCaZTgR 9XKvdY1RkNTKdppIpEXB5l0d0SUZB6uQGqzGQ89O2qd8i4W/CWOgnQI2jq99h04UX8ln ymhjkiRlOoz+SmSsn6IW+TgSRpzNpAfvLe6wgH5uWY94xTXwmTzchmn/9UAzPEdOR/WG Hh+/E4JE8EPR/Yk51LC5Wm506Ui3L/fEVYS6CH1cr6OrA+iUCtAGgY+P1QMH/p6uxZVX lktQPvwK6Cfel5VEptXDJSs5pnOUPxt+vnRrk8PYTRrTBO9E25SBtF2BxbTA3n2U6lwT M56w== 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=C8WYYza4ujS3wkt0tG5OpEB7ZDL1OdgI9NR7wFW0d7Y=; b=kRU04DAE9FiRUFPsodzXvgBKsmWocmWrWzUk2coqj4w4jcuR6HftGCda5uZ5uqnREo jxETzLx7X784RjPgmcKdSz7384C/wynRma5+BL3HlHUjLs8XTP185BBQhJarTBZtoFas H0wit/d2bV40LkioDad7iBROqIDDcSm/kTkOxcB2I3HL46MpE8gXpWi6PREFeG8V9da5 /r2akxaMQYQEUseLvKOU9vVDUSKhG2Y9IimyEMcXvoOVB0gqN2zUTznf8lwbQXKQpBLS 7PttuD0OTyAWV6dsaygvUfrLFJ3j2tKfswVrwlwcwSG5o5QNJ4t4hMDeIOHxq9cfiduA /duA== 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 p16si6077853eds.462.2020.06.15.21.41.06; Mon, 15 Jun 2020 21:41:28 -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 S1726906AbgFPEh3 (ORCPT + 99 others); Tue, 16 Jun 2020 00:37:29 -0400 Received: from inva021.nxp.com ([92.121.34.21]:47934 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726770AbgFPEh0 (ORCPT ); Tue, 16 Jun 2020 00:37:26 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E0D9D2003FE; Tue, 16 Jun 2020 06:37:24 +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 C5C2C200408; Tue, 16 Jun 2020 06:37:19 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 76FB7402F3; Tue, 16 Jun 2020 12:37:13 +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 V3 3/3] dt-bindings: spi: Convert imx lpspi to json-schema Date: Tue, 16 Jun 2020 12:26:15 +0800 Message-Id: <1592281575-32708-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592281575-32708-1-git-send-email-Anson.Huang@nxp.com> References: <1592281575-32708-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 V2: - remove redundant "maxItems" in "clocks" and "clock-names". --- .../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..143b94a --- /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 + + clock-names: + items: + - const: per + - const: ipg + +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