Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp487158ybl; Fri, 30 Aug 2019 02:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmm5E+KkngjRyFU4cvncHyi5NWe9cv5T2TQcX+dZ7Nla1IyefPb7J4obOTLvh/C5BjA/cp X-Received: by 2002:a63:c008:: with SMTP id h8mr12631599pgg.427.1567158546721; Fri, 30 Aug 2019 02:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567158546; cv=none; d=google.com; s=arc-20160816; b=K//hDb5pE4LddXZDvdhC+3rlfBXpd7ycACX5RDVoJjotdNFOh6aurj/73RUlHqkTsZ KyeCawHbpAqamgP/QhfjhkLZZv2bcjQk30EG9mZwc42gitbT2zBMfXC9qm0oeV4Su8tq h1mWjKkxglAM9AAc0XrIdhydA1NrsC5ANHAWXkIrcmyT+ciIthCM8QgfCEZjdSWlZP18 rBitA76hue98/ub7xXB+Wxe9H7BtMIdNfXP9QwOUBSulv76WAvF7kWIeoeJUVCOIgAyv E7fIxNJBRvDWcSqL/PJi+SjjZtxhHpL7ebe2PC0JDLQ+hHyYQheLbosGkrTAdpvG2aMN 9TfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=SkXdm4wOdkesoXgw2p8oqcUAOb4vZ6m0gOHqXh6QQvI=; b=FHyQJKHAgmZLDpATFVOHFcMcvXSskz4w90igfAixBIRLnZ3Gt88cC/D4j5X0fB8Ulf vKanHz9wzek4ixCzMVqL1eylxI2yV5wC3VpXY+DCR1RI2UB3A8EngATB/nORH9WFT2Ll zJSYfcTNav/Mbhaf8HjgPyZdGuyARw+wmz56o0PTDmlxiAzhWqI18ij2hPEmnlT+yKK3 AQg1KgR7qjRbYUNKdDM0YoCZJWEvS5Y4cjTFC4eBpLEIQQpyZY+SRBw3w0mB98MnQVWa kt63O7MsQRvk/yDxDwgCDdEoBuVY8oagBH6AsxqsXI9NCDxKja9R/u7GUnb6LAoqcAKq brGA== ARC-Authentication-Results: i=1; mx.google.com; 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 a27si1241069pfg.105.2019.08.30.02.48.50; Fri, 30 Aug 2019 02:49: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; 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 S1727718AbfH3Jqo convert rfc822-to-8bit (ORCPT + 99 others); Fri, 30 Aug 2019 05:46:44 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:60101 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfH3Jqn (ORCPT ); Fri, 30 Aug 2019 05:46:43 -0400 Received: from xps13 (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 6B671100003; Fri, 30 Aug 2019 09:46:40 +0000 (UTC) Date: Fri, 30 Aug 2019 11:46:38 +0200 From: Miquel Raynal To: Piotr Sroka Cc: , Mark Rutland , devicetree@vger.kernel.org, Boris Brezillon , Richard Weinberger , Marek Vasut , Rob Herring , linux-mtd@lists.infradead.org, BrianNorris , David Woodhouse , Kazuhiro Kasai Subject: Re: [v5 2/2] dt-bindings: mtd: Add Cadence NAND controller driver Message-ID: <20190830114638.33dc4eb2@xps13> In-Reply-To: <20190725145955.13951-1-piotrs@cadence.com> References: <20190725145804.8886-1-piotrs@cadence.com> <20190725145955.13951-1-piotrs@cadence.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Piotr, Piotr Sroka wrote on Thu, 25 Jul 2019 15:59:55 +0100: > Document the bindings used by Cadence NAND controller driver > > Signed-off-by: Piotr Sroka > --- > Changes for v5: > - replace "_" by "-" in all properties > - change compatible name from cdns,hpnfc to cdns,hp-nfc > Changes for v4: > - add commit message > Changes for v3: > - add unit suffix for board_delay > - move child description to proper place > - remove prefix cadence_ for reg and sdma fields > Changes for v2: > - remove chip dependends parameters from dts bindings > - add names for register ranges in dts bindings > - add generic bindings to describe NAND chip representation > --- > .../bindings/mtd/cadence-nand-controller.txt | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt > > diff --git a/Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt b/Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt > new file mode 100644 > index 000000000000..423547a3f993 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt > @@ -0,0 +1,50 @@ > +* Cadence NAND controller > + > +Required properties: > + - compatible : "cdns,hp-nfc" > + - reg : Contains two entries, each of which is a tuple consisting of a > + physical address and length. The first entry is the address and > + length of the controller register set. The second entry is the > + address and length of the Slave DMA data port. > + - reg-names: should contain "reg" and "sdma" > + - interrupts : The interrupt number. > + - clocks: phandle of the controller core clock (nf_clk). > + > +Optional properties: > + - dmas: shall reference DMA channel associated to the NAND controller > + - cdns,board-delay-ps : Estimated Board delay. The value includes the total > + round trip delay for the signals and is used for deciding on values > + associated with data read capture. The example formula for SDR mode is > + the following: > + board delay = RE#PAD delay + PCB trace to device + PCB trace from device > + + DQ PAD delay > + > +Child nodes represent the available NAND chips. > + > +Required properties of NAND chips: > + - reg: shall contain the native Chip Select ids from 0 to max supported by > + the cadence nand flash controller > + > + > +See Documentation/devicetree/bindings/mtd/nand.txt for more details on > +generic bindings. > + > +Example: > + > +nand_controller: nand-controller @60000000 { > + compatible = "cdns,hp-nfc"; > + reg = <0x60000000 0x10000>, <0x80000000 0x10000>; > + reg-names = "reg", "sdma"; > + clocks = <&nf_clk>; > + cdns,board-delay-ps = <4830>; Are you sure you want to export this to the user? Not sure it is easily understandable and tunable... I'm not against but I would have troubles tuning it myself, unless using the documented value. Maybe you should explain more how to derive it? The rest looks fine, let's see if Rob agrees. Maybe he will request a yaml schema; in this case you can check sunxi NAND bindings which already have been converted. > + interrupts = <2 0>; > + nand@0 { > + reg = <0>; > + label = "nand-1"; > + }; > + nand@1 { > + reg = <1>; > + label = "nand-2"; > + }; > + > +}; Thanks, Miquèl