Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4580446ybv; Mon, 17 Feb 2020 01:50:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzVxmN+6Hc+uhwJxRmeXyJQjXZ0DE2VB9Mu49mil71b8L68TOWP2FU6F7usZJ7hsbsGZWrB X-Received: by 2002:aca:814:: with SMTP id 20mr9564276oii.159.1581933044990; Mon, 17 Feb 2020 01:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581933044; cv=none; d=google.com; s=arc-20160816; b=SH0WK2BJWit4AN0fM0a76RV3Urq79kJjf6udsQ8wwXxp1BRemkEFGWh6ysHmkQdOCk BpMyejYMarcOWCSkHYbVSZguzqrUI5HrteMFG7Wji8hh8ZtrfZR/y4uyvNexWmep5/JO GZ+Ew6O21SH1CACATmpDB+IYz90mqpfDFtPpYqMKJEW8WS3ubRNd+IUJ5YJgRfvFV9ng tYXEKOZ22dXG+MTUUv5/WaJkb9Ti47ct569vRj4nepvcamFHhAZ52uCUXCGBYyN5NHYY WkDSVr2Q7Rean+zZuRmoTzLMCI9fY+VDXJvuxNrqaZPglZp1LqXQBvL3+9uNuqP6hooo PvWw== 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:dmarc-filter:dkim-signature; bh=Lsidu8FELVi8a6NsOyVTuf6+rfQ9wx+zb1HtCaHLJhI=; b=cXu27PEkb4ArAOxP5oSpo/X8Tft8sbOIj/y78iDeJO1wz1quU7/ET895mKuwk5X+0X 6ucN81VqOfsVpmZjDdN+U4N9LcMSaEuh8qGKMazpVLj9PZv4HJS9Gz/XF1N+9puCtb+W MY/xj5Ky2RmXP1EpQR+GhocWYrT5V7ES3aGFHWhpwambZo0yMN1DRuSDF+2nuu57bM6z /Zb8kACRMoHmdTuh++B09EBr5DDcheh+8oLbIizTb3KMXI6dwBs506PrDV+6OTEqFOAV XISQWmS1ehAbjf64Mwwc1QCMovCmGfNfaWTTcDUAE0G1Z8kFGbz9K8ffKSZaDmo0tn1Q iqEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=j1XtmPns; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si7171735oti.152.2020.02.17.01.50.33; Mon, 17 Feb 2020 01:50:44 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=j1XtmPns; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729041AbgBQJuT (ORCPT + 99 others); Mon, 17 Feb 2020 04:50:19 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:37451 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729031AbgBQJuS (ORCPT ); Mon, 17 Feb 2020 04:50:18 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1581933018; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=Lsidu8FELVi8a6NsOyVTuf6+rfQ9wx+zb1HtCaHLJhI=; b=j1XtmPnsySiDobt7t+JDTt+CgaKCo78qsTTnp27NBVWMZaaQpS8fjGl61YEhOfGFlwYExFhy L+wd6HI+DdW9EGioYwYQjyFPs1dTqSznGV5rXwm+7+xcGjlyXvi/3UQ2WT76MCdafLUWYqHe rTia9noy6xr37NZz22ifwicnKRI= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e4a61cb.7f8e92d6f8b8-smtp-out-n03; Mon, 17 Feb 2020 09:50:03 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 0F5CBC43383; Mon, 17 Feb 2020 09:50:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from akashast-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akashast) by smtp.codeaurora.org (Postfix) with ESMTPSA id CD7A7C4479F; Mon, 17 Feb 2020 09:49:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CD7A7C4479F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=akashast@codeaurora.org From: Akash Asthana To: robh+dt@kernel.org, agross@kernel.org, mark.rutland@arm.com Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mgautam@codeaurora.org, rojay@codeaurora.org, skakit@codeaurora.org, swboyd@chromium.org, Akash Asthana Subject: [PATCH 1/2] dt-bindings: spi: Convert QSPI bindings to YAML Date: Mon, 17 Feb 2020 15:19:33 +0530 Message-Id: <1581932974-21654-2-git-send-email-akashast@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581932974-21654-1-git-send-email-akashast@codeaurora.org> References: <1581932974-21654-1-git-send-email-akashast@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert QSPI bindings to DT schema format using json-schema. Signed-off-by: Akash Asthana --- .../devicetree/bindings/spi/qcom,spi-qcom-qspi.txt | 36 --------- .../bindings/spi/qcom,spi-qcom-qspi.yaml | 89 ++++++++++++++++++++++ 2 files changed, 89 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt create mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt deleted file mode 100644 index 1d64b61..0000000 --- a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt +++ /dev/null @@ -1,36 +0,0 @@ -Qualcomm Quad Serial Peripheral Interface (QSPI) - -The QSPI controller allows SPI protocol communication in single, dual, or quad -wire transmission modes for read/write access to slaves such as NOR flash. - -Required properties: -- compatible: An SoC specific identifier followed by "qcom,qspi-v1", such as - "qcom,sdm845-qspi", "qcom,qspi-v1" -- reg: Should contain the base register location and length. -- interrupts: Interrupt number used by the controller. -- clocks: Should contain the core and AHB clock. -- clock-names: Should be "core" for core clock and "iface" for AHB clock. - -SPI slave nodes must be children of the SPI master node and can contain -properties described in Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: - - qspi: spi@88df000 { - compatible = "qcom,sdm845-qspi", "qcom,qspi-v1"; - reg = <0x88df000 0x600>; - #address-cells = <1>; - #size-cells = <0>; - interrupts = ; - clock-names = "iface", "core"; - clocks = <&gcc GCC_QSPI_CNOC_PERIPH_AHB_CLK>, - <&gcc GCC_QSPI_CORE_CLK>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - spi-tx-bus-width = <2>; - spi-rx-bus-width = <2>; - }; - }; diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml new file mode 100644 index 0000000..977070a --- /dev/null +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/spi/qcom,spi-qcom-qspi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Quad Serial Peripheral Interface (QSPI) + +maintainers: + - Mukesh Savaliya + - Akash Asthana + +description: | + The QSPI controller allows SPI protocol communication in single, dual, or quad + wire transmission modes for read/write access to slaves such as NOR flash. + +allOf: + - $ref: /spi/spi-controller.yaml# + +properties: + compatible: + items: + - const: qcom,sdm845-qspi + - const: qcom,qspi-v1 + + reg: + description: Base register location and length. + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-names: + items: + - const: iface + - const: core + + clocks: + items: + - description: AHB clock + - description: QSPI core clock. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - clock-names + - clocks + - "#address-cells" + - "#size-cells" + + +examples: + - | + #include + #include + + soc: soc@0 { + #address-cells = <2>; + #size-cells = <2>; + + qspi: spi@88df000 { + compatible = "qcom,sdm845-qspi", "qcom,qspi-v1"; + reg = <0 0x88df000 0 0x600>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = ; + clock-names = "iface", "core"; + clocks = <&gcc GCC_QSPI_CNOC_PERIPH_AHB_CLK>, + <&gcc GCC_QSPI_CORE_CLK>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + spi-tx-bus-width = <2>; + spi-rx-bus-width = <2>; + }; + }; + }; + +... -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project