Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4544584ybc; Fri, 15 Nov 2019 06:25:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxjlkBJdqhGMDMbKOvI4zSGf0sCjXgD1K8S7Uxwbe7MXyb1NFj2KqVlfiV7GsvLFhW9wScJ X-Received: by 2002:a7b:ca51:: with SMTP id m17mr14026983wml.110.1573827908780; Fri, 15 Nov 2019 06:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573827908; cv=none; d=google.com; s=arc-20160816; b=j+1MRPjaFCmQdd70ggZfQ5NGkPTg9mESOEJwjjdQDk48wfjVCskSb3RJ5wLrp8jQeI dy3k8xKG9fpO7u1hIz8kvHDG9YsGCZnw7kPPFFW0d9Do2wtmzLguiS5qZmiP0inOV7ib diq1rr9LMRMVBL1i3oLKUSx2tR8naEuhryAUy2H5VPfNVsNmfP5/T1A9q1U6oINih535 oxV4eOFaR71TwxKBi85mSELM+i6wYlzzsOVl7nqm+y3vph486mLMXHes6cVIkgxDCI3f fB8UmWSHwpVHJNdeYy1RSQy740rJyoPymxI23yv6kbO6qEDUqqT2/5wfjpRwWvuCHDVU BBVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=T9/nzrbSzNCSSlIAj0mf6EvFLY/5Hd6RIjHy97kGKZM=; b=sv9ChAgeoIcO25PT8fiAMEoQ8OOEVhmShdYcif3/TasViDSyvWQUvbsndeQ2MJR59y GOB8pfOo+J+au1VSOK6jPilQqvlStqAX2t6ZrlswGtHeKmT7kRs+0jHSilCqIV6Bkc8v UAlI+ZDXNkkMwdpZ2K1YnTO37hTRx3+NHZRcCUEW9iO/MDVh7pojufJgIq58Gii+vvhw ObCSzIxtKBbBCbmGE0EMxL46s4hXUDatGqqYXximN9Y51nYm6m88cDZh3UwV5UdEaODs m7/GRrWHiuA8UFZm3xUvahpSJ642SC76DPQAo5kGYDC1EFbrgOFo5kDJx6xtNxe172HZ IFCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=kd1P0HB6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si3452388edq.27.2019.11.15.06.24.43; Fri, 15 Nov 2019 06:25:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=kd1P0HB6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727539AbfKOOXd (ORCPT + 99 others); Fri, 15 Nov 2019 09:23:33 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:21076 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727380AbfKOOXd (ORCPT ); Fri, 15 Nov 2019 09:23:33 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAFEHMxo008650; Fri, 15 Nov 2019 15:23:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=T9/nzrbSzNCSSlIAj0mf6EvFLY/5Hd6RIjHy97kGKZM=; b=kd1P0HB6DnaONOLWJlRhCm9vzD9lGiDZBguHaM1gRDGLAd3nuzS25QA+iKR2WcEu9xRw AZXBRUyw/t/AkAGb2AchogBvd/NZ1NzTi+yzDEKkNeb50x6Hs3m0toFpkD5jqlmD+lbG ID7emAPLHY2JlbrCLVNJR92uGvaGTeIC01sPD2lFdUPuQXbmkzHiK/tytl+kPE+/zaZH HDuguw88w31NzzdNN/jy2KxzFq7GWX1m13F7NbONEL0tNmxKKU42Y4XACaX5IT+rWSNn flBWHsobQfn2KPH78RDpD9DTeNzPAYRrZS40OdfNokfZaOI7axTNmwIyhCj6ETv6kdi6 hQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2w7psfmrn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Nov 2019 15:23:21 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C3EBC10002A; Fri, 15 Nov 2019 15:23:20 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id AB8182BEC75; Fri, 15 Nov 2019 15:23:20 +0100 (CET) Received: from localhost (10.75.127.46) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 15 Nov 2019 15:23:19 +0100 From: Benjamin Gaignard To: , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH] dt-bindings: crypto: Convert stm32 QSPI bindings to json-schema Date: Fri, 15 Nov 2019 15:23:18 +0100 Message-ID: <20191115142318.2909-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-15_04:2019-11-15,2019-11-15 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the STM32 QSPI binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- .../devicetree/bindings/spi/spi-stm32-qspi.txt | 47 ----------- .../devicetree/bindings/spi/st,stm32-qspi.yaml | 91 ++++++++++++++++++++++ 2 files changed, 91 insertions(+), 47 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt create mode 100644 Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt b/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt deleted file mode 100644 index bfc038b9478d..000000000000 --- a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt +++ /dev/null @@ -1,47 +0,0 @@ -* STMicroelectronics Quad Serial Peripheral Interface(QSPI) - -Required properties: -- compatible: should be "st,stm32f469-qspi" -- reg: the first contains the register location and length. - the second contains the memory mapping address and length -- reg-names: should contain the reg names "qspi" "qspi_mm" -- interrupts: should contain the interrupt for the device -- clocks: the phandle of the clock needed by the QSPI controller -- A pinctrl must be defined to set pins in mode of operation for QSPI transfer - -Optional properties: -- resets: must contain the phandle to the reset controller. - -A spi flash (NOR/NAND) must be a child of spi node and could have some -properties. Also see jedec,spi-nor.txt. - -Required properties: -- reg: chip-Select number (QSPI controller may connect 2 flashes) -- spi-max-frequency: max frequency of spi bus - -Optional properties: -- spi-rx-bus-width: see ./spi-bus.txt for the description -- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, -Documentation/devicetree/bindings/dma/dma.txt. -- dma-names: DMA request names should include "tx" and "rx" if present. - -Example: - -qspi: spi@a0001000 { - compatible = "st,stm32f469-qspi"; - reg = <0xa0001000 0x1000>, <0x90000000 0x10000000>; - reg-names = "qspi", "qspi_mm"; - interrupts = <91>; - resets = <&rcc STM32F4_AHB3_RESET(QSPI)>; - clocks = <&rcc 0 STM32F4_AHB3_CLOCK(QSPI)>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_qspi0>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-rx-bus-width = <4>; - spi-max-frequency = <108000000>; - ... - }; -}; diff --git a/Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml b/Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml new file mode 100644 index 000000000000..955405d39966 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/st,stm32-qspi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Quad Serial Peripheral Interface (QSPI) bindings + +maintainers: + - Christophe Kerello + - Patrice Chotard + +allOf: + - $ref: "spi-controller.yaml#" + +properties: + compatible: + const: st,stm32f469-qspi + + reg: + items: + - description: registers + - description: memory mapping + minItems: 2 + maxItems: 2 + + reg-names: + items: + - const: qspi + - const: qspi_mm + minItems: 2 + maxItems: 2 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + + dmas: + items: + - description: tx DMA channel + - description: rx DMA channel + minItems: 2 + maxItems: 2 + + dma-names: + items: + - const: tx + - const: rx + minItems: 2 + maxItems: 2 + +required: + - compatible + - reg + - reg-names + - clocks + - interrupts + +examples: + - | + #include + #include + #include + spi@58003000 { + compatible = "st,stm32f469-qspi"; + reg = <0x58003000 0x1000>, <0x70000000 0x10000000>; + reg-names = "qspi", "qspi_mm"; + interrupts = ; + dmas = <&mdma1 22 0x10 0x100002 0x0 0x0>, + <&mdma1 22 0x10 0x100008 0x0 0x0>; + dma-names = "tx", "rx"; + clocks = <&rcc QSPI_K>; + resets = <&rcc QSPI_R>; + + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-rx-bus-width = <4>; + spi-max-frequency = <108000000>; + }; + }; + +... -- 2.15.0