Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1605374ybh; Fri, 13 Mar 2020 04:18:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs0RhVKqWSD6EYfiApfBHVlFXwbUUsT7uFIq2XIe/oA8+XTwPdbDe/5/2WQp4cB8fCjIsGR X-Received: by 2002:a9d:1a4:: with SMTP id e33mr10185518ote.343.1584098286476; Fri, 13 Mar 2020 04:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584098286; cv=none; d=google.com; s=arc-20160816; b=K9dd1ap5l52epW6T50Ya4zd8Vsxtk5+UEKkJEq6nLh+RXCs0qaMxGneZL+S9i+/Zzc gT0otzEsMQIsnk6v/b+4bSTc1YNmaUcPQbSCP+uY7MNe6sEEe6UMUuY/0ss1dS30PMlh vgBmttilyHx72z+fiFEWYb1mBwvpmZZlAM6dU5thYjrNfoPxmyi6hiqAeXwmZSkE+NYr /sNFygPzKFvLsLcT99vluz7iEERtGvvjhiUoIlGLg2odv1LQElBLdA3Fk7ZetkVHEI+a ic7egUkEJNU9377tCWKFjngZKY5ULZmAe18TAldukfDMHDOrnr0PULo2nE2UXhsYFcHx Ysxw== 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=SliNNIM2Hq0YN1xUZrARYugFT51wfRKserGd09WjZ9s=; b=DlYeR/xVa42ib8YVrTUTP9hhCNRvsChj3QFdw0P3sdQgwyCx31Ouk9X4TfU0/jxoqp L7ihtAra6S8Eji79fgC5/V+ZBsg84EO45KSY7HPcJLMjiSi1lb/x5OQjXHFDt2rXU76R lj8tLroWZoiLInHnonFWN22fR05PWT/dx6mlIw/N+Sb3m54RJ+mWnYn9zkUP/qVl7yKx 1mfrPiBb1rasAvx1R141vWdV/OyzB58mSbanZqb9nTBWAarIfWFw5Ozos4aooYCXNoSP XXwUGYlVLCe8LtRskzNmU3IXE6HvC7IslfQaP+1d87Es555Kbu/R8RlTbDz97fjz05Sk fLCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ursSaaCg; 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 u14si4376280otg.10.2020.03.13.04.17.53; Fri, 13 Mar 2020 04:18:06 -0700 (PDT) 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=ursSaaCg; 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 S1726621AbgCMLP5 (ORCPT + 99 others); Fri, 13 Mar 2020 07:15:57 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:41298 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbgCMLP5 (ORCPT ); Fri, 13 Mar 2020 07:15:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1584098156; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=SliNNIM2Hq0YN1xUZrARYugFT51wfRKserGd09WjZ9s=; b=ursSaaCgoth2e1q16D1CqdFo4pDSWixywSF5kMsgIyRNnfRrZLBHq6YCtaqp1vtGFX1hOtRi yY/bHG5frncLl4Y7bmpg1xJnHhKGpfkGHIw73HX1iFiPNKIoYAtDAIv9FAJHVmBxGaC0fGqa 9LZ9voAAbR76gJsxO+Pp5wo34Gc= 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 5e6b6b5c.7fd9cd9ef490-smtp-out-n01; Fri, 13 Mar 2020 11:15:40 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 14E3CC433D2; Fri, 13 Mar 2020 11:15:40 +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 2403EC433CB; Fri, 13 Mar 2020 11:15:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2403EC433CB 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, Akash Asthana Subject: [PATCH V2 1/2] dt-bindings: spi: Convert QSPI bindings to YAML Date: Fri, 13 Mar 2020 16:45:20 +0530 Message-Id: <1584098121-18075-2-git-send-email-akashast@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584098121-18075-1-git-send-email-akashast@codeaurora.org> References: <1584098121-18075-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 --- Changes in V2: - As per Stephen's comment, dropped properties "#address-cells" & "#size-cells" from QSPI node as it's already defined in $ref: /spi/spi-controller.yaml#. - As per Stephen's comment, dropped description for reg property and answered few Nitpicks. .../devicetree/bindings/spi/qcom,spi-qcom-qspi.txt | 36 ---------- .../bindings/spi/qcom,spi-qcom-qspi.yaml | 79 ++++++++++++++++++++++ 2 files changed, 79 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..9582d37 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml @@ -0,0 +1,79 @@ +# 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: + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-names: + items: + - const: iface + - const: core + + clocks: + items: + - description: AHB clock + - description: QSPI core clock + +required: + - compatible + - reg + - interrupts + - clock-names + - clocks + +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