Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4901991imu; Tue, 29 Jan 2019 09:21:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN55pLlId27gb1MirOvEDUI2SC39jC/4UkdN6F3LMxHwTnMxfM/J/64cDSdXXr+KNrSincdR X-Received: by 2002:a63:dc0c:: with SMTP id s12mr24721500pgg.398.1548782508094; Tue, 29 Jan 2019 09:21:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548782508; cv=none; d=google.com; s=arc-20160816; b=vCXtp8HJft8cxBv92iWm3nTuvHoK8TWynHQ9LLq9J/c+oqPIynyX3T4iJhQcmkPIvZ TZ+so3rfFj3BGQkbKZIo0dCyPT7up3DIKAVMlDAPkwqmNGzFKUGMgtIPULga/au17yw3 nl1qRUIavUf5aTdyBwtS6Vz+5ZuHCaho+UavCCwT3zcvq+p+2pnda+6R9Hqh+VG/8l4V ks02QCNnzJ6gkQDs+DTIlAxCXThJx1NHAd3Nsi1egA2KsHqYFvTU+3kVrhlGnONdFEJ+ iXW3JD5D6RW8nvVGwrTwqNUa14n+vlkm1t52mWBDOLvknFXjR0bwIU1FjPGAydvLc05y e7Yw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qmttVOUWeYOZErwlbqhjuR7Odz/u7ola4NRRY2eIyGU=; b=lZeOsXhUk6JYDfUM3LNFpoSRs6tpZF2rsWzyQWdbFtOX2iV+KiB8oRnPgN8JxQje/+ 9j4B9E6xutpGtDXnduQbOVn1KZ23AILdvNZJmOKMtpZp7ZvaYv0umJ55NpA5DmtffMmm vjcfag/jOCC9fh8tqOruUByL7hIUsmz7QSDd+wVlCoQoA6a2HtLneNjxoYa/meKDF7aU DtJs1DYiMHf3ez0ZF3EXkfx8Sjyg+bf34dLzyyXh6TbXsJvJ8T2Po4n3Ya516tcCOlHb Z7CdWThey2g+VLLxAMhoyfLdhAGNzSj4jVkZEwPDQKDwDsbW1plSViAywJVSWfNTJ8oD S2ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TKYbqiFI; 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 q4si37279260pfq.56.2019.01.29.09.21.22; Tue, 29 Jan 2019 09:21:48 -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=TKYbqiFI; 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 S1728719AbfA2RVM (ORCPT + 99 others); Tue, 29 Jan 2019 12:21:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:35738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbfA2RVM (ORCPT ); Tue, 29 Jan 2019 12:21:12 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 27A402087E; Tue, 29 Jan 2019 17:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548782471; bh=PyKtQ7qC0wxh867jSDYtEOMZFEMPUvSYGi3ho30F6nw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TKYbqiFIxy6BaIUEB492tU9Zc1c3Kt5rbDZYPNfIRtowMevK7x2MVXWJl9Dg9/cm4 xqqDWu09wDkgzwpMxUQ6aphNy6jdbMlIg4CPwovsqjAL2DnLQM0lUCADN7P1iZvKE8 Qr1Iw35jjnmyo7Fe+zHnTvwIwfFHNnjan5pSrp10= Date: Tue, 29 Jan 2019 18:21:00 +0100 From: Boris Brezillon To: Piotr Sroka Cc: , David Woodhouse , BrianNorris , "Marek Vasut" , Richard Weinberger , "Rob Herring" , Mark Rutland , , Subject: Re: [PATCH 2/2] dt-bindings: nand: Add Cadence NAND controller driver Message-ID: <20190129182100.2fcb4e9f@bbrezillon> In-Reply-To: <20190129161040.20299-1-piotrs@cadence.com> References: <20190129160337.24350-1-piotrs@cadence.com> <20190129161040.20299-1-piotrs@cadence.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Piotr, On Tue, 29 Jan 2019 16:10:40 +0000 Piotr Sroka wrote: > Signed-off-by: Piotr Sroka > --- > .../devicetree/bindings/mtd/cadence-nand.txt | 35 ++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/cadence-nand.txt > > diff --git a/Documentation/devicetree/bindings/mtd/cadence-nand.txt b/Documentation/devicetree/bindings/mtd/cadence-nand.txt > new file mode 100644 > index 000000000000..82afa34d5652 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/cadence-nand.txt > @@ -0,0 +1,35 @@ > +* Cadence NAND controller > + > +Required properties: > + - compatible : "cdns,hpnfc-nand" "nfc" already means nand flash controller, no need to suffix it with -nand, "cdns,hpnfc" should be enough. > + - 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. Please name the register ranges. > + - interrupts : The interrupt number. > + - clocks: phandle of the controller core clock (nf_clk). > + > +Optional properties: > +Driver calculates controller timings base on NAND flash memory timings and > +the following delays in picoseconds. > + - cdns,if-skew : Skew value of the output signals of the NAND Flash interface > + - cdns,nand2-delay : Delay value of one NAND2 gate from which > + the delay element is build > + - cdns,board-delay : 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 The unit of those props is not defined, and if possible I'd like to avoid specifying custom timing adjustment values in the DT. Looks like some of these values are SoC specific (depends on the integration of this IP in a SoC) and others are board specific. For SoC specific values, this should be attached to the SoC specific compatible at the driver level. For board-specific values, I'd prefer to have a generic way to describe boards constraints. Please point to the generic bindings to describe NAND chip representation under the NAND controller node. > + > +Example > + > +nand: nand@60000000 { nand_controller: nand-controller@60000000 { > + compatible = "cdns,hpnfc-nand"; > + reg = <0x60000000 0x10000>, <0x80000000 0x10000>; > + clocks = <&nf_clk>; > + cdns,if-skew = <50>; > + cdns,nand2-delay = <37>; > + cdns,board-delay = <4830>; > + interrupts = <2 0>; Add a NAND chip in the example. > +}; Regards, Boris