Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1341737ybf; Thu, 27 Feb 2020 09:08:28 -0800 (PST) X-Google-Smtp-Source: APXvYqz3m/lAWeJbCjFkPjhwc9ZJVM2aIavllhzF76Q1N5bm0tw4rQZUh1bmVn8/F95CavhLRmb3 X-Received: by 2002:a54:4816:: with SMTP id j22mr19939oij.162.1582823307664; Thu, 27 Feb 2020 09:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582823307; cv=none; d=google.com; s=arc-20160816; b=nvNUM0Ievjs8VrhMiEMpEYBY4iA+m8GAtBBJIN6/Y1ep74/WqKdMhTxnN9dXmfKu25 6pmdMoJFNbvBR8M2oGyuXL0xuYaVH6DewlvvdFyctHNpyi8B5aCGoqRIqsWm60yPFoCX HFAUUWDJcdM/IoXxUqNr01M81FdHXvk5ZFRF4CUXrJ7Ybw0G+pprntPteLDwWqQZIahP CAXvXrlyVHnhxhv9jvMzEcB4YlH4DPsfk6m+hwqkexIn3dD9o3uKn25zKQBtFMBJPfnM lLovQ1oiBdGxJAtkA9Cu50OGeDgILJWhRwS2zrlmUnCrBq8pcStvzvap+TwIxsejaTEe biUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=m2HriIUlm3TZIkJkv/RPl+DKNldOk8b7n5Ww4iRuLeo=; b=FegSG8kvmULjZW1VbjCt2u4irZCXoQhDI2pO9YWrPwETx1bIpPg99Ac6KqPjzhYALC ud0PlKq1XbACtCt05B3K8QnSQQsLuTVpS7SHHfwJzNkyVL/SUJ2kIX4m06Ve+mljrC4D I6oGJRMchYXEtV/NrgOMYzj44mHzGrRMR4qX5nGdMQjHXcQao+YT0bKD25kIEY+H6rt+ efNcKIaZFIxUqzBBK2MM/4t/vh3LrQXR1T9BD5HUzHgPh+5UtGoJ955tByLc8UoH5hhj UurIBEfV1y6eIdo1t7KSt9sivYG2znnVMWceL4lnt2B2T4in9S9WI0oqoS+PInnMn4sU FEbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KssC0RY0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3si166223oia.236.2020.02.27.09.08.16; Thu, 27 Feb 2020 09:08:27 -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=@kernel.org header.s=default header.b=KssC0RY0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729678AbgB0RHx (ORCPT + 99 others); Thu, 27 Feb 2020 12:07:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:40566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729274AbgB0RHw (ORCPT ); Thu, 27 Feb 2020 12:07:52 -0500 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 08947246A5; Thu, 27 Feb 2020 17:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582823271; bh=DNqh6L9QvC79SAvYrsHQjJHxar3H8RKUkOoW0usqUyQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KssC0RY0wDcFK4NJrupa76eISYl81dF/3XcEksDI38Kgi1TODcqCH89Ql9XI5alZl tej9/O3aty3romAaVdCxyYBXk1CI80GaO/fBAkusNAiAqTSKfas0wLp/BrQiRHYFyy 0eQU1mvgvhtwMVdM2oHbrIRWTlYCZgrmPm59qJVc= Received: by mail-qk1-f169.google.com with SMTP id 11so63785qkd.1; Thu, 27 Feb 2020 09:07:50 -0800 (PST) X-Gm-Message-State: APjAAAVw2n5+uYL5CbwZ2CKbrsiYLejNvpnR2WKtbu33WETDe6AjHnNH hJGlspDM5JqQipzXCwEluJMcSxmMbvjZnSzFMA== X-Received: by 2002:a05:620a:1237:: with SMTP id v23mr184684qkj.223.1582823270046; Thu, 27 Feb 2020 09:07:50 -0800 (PST) MIME-Version: 1.0 References: <20200227062708.21544-1-vadivel.muruganx.ramuthevar@linux.intel.com> <20200227062708.21544-2-vadivel.muruganx.ramuthevar@linux.intel.com> In-Reply-To: <20200227062708.21544-2-vadivel.muruganx.ramuthevar@linux.intel.com> From: Rob Herring Date: Thu, 27 Feb 2020 11:07:39 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 1/2] dt-bindings: spi: Add schema for Cadence QSPI Controller driver To: "Ramuthevar,Vadivel MuruganX" Cc: "linux-kernel@vger.kernel.org" , linux-spi , Mark Brown , Vignesh R , devicetree@vger.kernel.org, simon.k.r.goldschmidt@gmail.com, Dinh Nguyen , tien.fong.chee@intel.com, =?UTF-8?B?TWFyZWsgVmHFoXV0?= , Mark Rutland , MTD Maling List , David Woodhouse , Richard Weinberger , Brian Norris , Boris BREZILLON , Cyrille Pitchen , david.oberhollenzer@sigma-star.at, =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , tudor.ambarus@gmail.com, cheol.yong.kim@intel.com, qi-ming.wu@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 12:27 AM Ramuthevar,Vadivel MuruganX wrote: > > From: Ramuthevar Vadivel Murugan > > Add dt-bindings documentation for Cadence-QSPI controller to support > spi based flash memories. You need to run 'make dt_binding_check' because this doesn't pass. > > Signed-off-by: Ramuthevar Vadivel Murugan > --- > .../devicetree/bindings/mtd/cadence-quadspi.txt | 67 ---------- > .../devicetree/bindings/spi/cdns,qspi-nor.yaml | 142 +++++++++++++++++++++ > 2 files changed, 142 insertions(+), 67 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mtd/cadence-quadspi.txt > create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > new file mode 100644 > index 000000000000..3ad2850c412e > --- /dev/null > +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > @@ -0,0 +1,142 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Cadence QSPI Flash Controller support > + > +maintainers: > + - Ramuthevar Vadivel Murugan > + > +allOf: > + - $ref: "spi-controller.yaml#" > + > +description: | > + Binding Documentation for Cadence QSPI controller,This controller is > + present in the Intel LGM, Altera SoCFPGA and TI SoCs and this driver > + has been tested On Intel's LGM SoC. > + > + - compatible : should be one of the following: > + Generic default - "cdns,qspi-nor". > + For TI 66AK2G SoC - "ti,k2g-qspi", "cdns,qspi-nor". > + For TI AM654 SoC - "ti,am654-ospi", "cdns,qspi-nor". > + For Intel LGM SoC - "intel,lgm-qspi", "cdns,qspi-nor". The schema below says all this, so drop this part. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - ti,k2g-qspi > + - const: cdns,qspi-nor > + > + - items: > + - enum: > + - ti,am654-ospi > + - const: cdns,qspi-nor > + > + - items: > + - enum: > + - intel,lgm-qspi > + - const: cdns,qspi-nor These 3 items can be 1 entry (combine the enums). > + > + - items: > + - const: cdns,qspi-nor > + > + reg: > + maxItems: 2 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + cdns,fifo-depth: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + 128 or 256 bytes size of the data FIFO in words. Sounds like constraints. Make them a schema. > + > + cdns,fifo-width: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + 4 byte bus width of the data FIFO in bytes. That's not very clear. It should be schema constraints anyways: enum: [ 4, 8, 12, 16, ...??? ] or: multipleOf: 4 minimum: 4 maximum: ? > + > + cdns,trigger-address: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + 32-bit indirect AHB trigger address. > + > + cdns,rclk-en: > + $ref: /schemas/types.yaml#/definitions/uint32 Wrong type if this is a 'flag' aka boolean. > + description: | > + Flag to indicate that QSPI return clock is used to latch the read data > + rather than the QSPI clock. Make sure that QSPI return clock is populated > + on the board before using this property. > + > +# subnode's properties > +patternProperties: > + "^.*@[0-9a-fA-F]+$": > + type: object > + description: > + flash device uses the subnodes below defined properties. > + > + cdns,read-delay: > + description: > + Delay in 4 microseconds, read capture logic, in clock cycles. Huh? Is it in time or clocks? No unit suffix here, so this needs a type ref. That's what 'make dt_binding_check' fails on. > + > + cdns,tshsl-ns: > + description: | > + Delay in 50 nanoseconds, for the length that the master mode chip select > + outputs are de-asserted between transactions. multipleOf: 50 And so on for the rest. > + > + cdns,tsd2d-ns: > + description: | > + Delay in 50 nanoseconds, between one chip select being de-activated > + and the activation of another. > + > + cdns,tchsh-ns: > + description: | > + Delay in 4 nanoseconds, between last bit of current transaction and > + deasserting the device chip select (qspi_n_ss_out). > + > + cdns,tslch-ns: > + description: | > + Delay in 4 nanoseconds, between setting qspi_n_ss_out low and > + first bit transfer. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - cdns,fifo-depth > + - cdns,fifo-width > + - cdns,trigger-address > + > +examples: > + - | > + qspi: spi@ff705000 { > + compatible = "cdns,qspi-nor"; > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0xff705000 0x1000>, > + <0xffa00000 0x1000>; > + interrupts = <0 151 4>; > + clocks = <&qspi_clk>; > + cdns,fifo-depth = <128>; > + cdns,fifo-width = <4>; > + cdns,trigger-address = <0x00000000>; > + > + flash0: n25q00@0 { > + compatible = "jedec,spi-nor"; > + reg = <0x0>; > + cdns,read-delay = <4>; > + cdns,tshsl-ns = <50>; > + cdns,tsd2d-ns = <50>; > + cdns,tchsh-ns = <4>; > + cdns,tslch-ns = <4>; > + }; > + }; > + > -- > 2.11.0 >