Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3183077imm; Sun, 24 Jun 2018 13:42:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLUwm2/icYmgzB7IbYBDNFzD0gVsJ1dKk1NZ1zqJZF45TtCnlI6onuGNzjeXoV3TPnXkBA2 X-Received: by 2002:a62:4255:: with SMTP id p82-v6mr10349902pfa.227.1529872963681; Sun, 24 Jun 2018 13:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529872963; cv=none; d=google.com; s=arc-20160816; b=Sg+HNpcnyxGhbtThmzl+SDFxN3n24QSVuRnpRM4iY3bE0pv4WAhZGxfySzsohVmFwj H3R+Jc71jY8g7AEbEGkiTcX9fMBlFUx3CQuaGbyOeQae+4YTmNkC8x9HfPv1nThSEPtr iMwZdLeLdNWBhTQpWxX7SM1nYZSXM/vw5aqJBG9w6GPZuiWxc/KpfRhu+VXoHz2TVE6Y ly6BTWja5FVh6bzdyGXYNNQtoBuKI5HlY/VKGtEeqWMgJAMn+WWINfBxqjM2PGWx6Kne hgtOZgAFhZWTqf04VXjTmg90E6OV5b2a1o30hEIi9voU1voG6ACzuDcxun0FY93GbKC9 QDOg== 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 :arc-authentication-results; bh=8sFVPftS1Df7FwFbywIzOlO4hq9nKPp1ks0Ida7Vo04=; b=KhLk6yPwRLZ9SyYWHOdbfyQAsX485/ZrlCS2Im6c1KYXxH/+1VNja6DIQPrIE1P2hP UJd2qESU5p8/ADLIlPzt3ZiKl78PpzPUGpUacHA2BXGsR3bB55KkYGpkyghMT1pvKNwT xtetFFLqfJ2fR2L72O+UZ0ADidEBSplEXo9zR5ZpkRK7IbZVZgS78ul3Q8FWDu8h6yCO eOrDlq0rMuwxp8XURA6KdYvsjjZheF9ISj7SbFOQr7DJ+s1ABx3rC9ip+ESdMBR2ddzA ffBLbMca3es45lf0iXmQOr5f4U8fpS9AXjgcE3HX3NkcpvQ+2W8cyJ9X5hLQYEXus8mv eSxg== 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 a95-v6si12256601pla.401.2018.06.24.13.41.55; Sun, 24 Jun 2018 13:42:43 -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 S1751769AbeFXUkS (ORCPT + 99 others); Sun, 24 Jun 2018 16:40:18 -0400 Received: from mail.bootlin.com ([62.4.15.54]:58078 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbeFXUkQ (ORCPT ); Sun, 24 Jun 2018 16:40:16 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 72F3B2079C; Sun, 24 Jun 2018 22:40:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id F0419206A0; Sun, 24 Jun 2018 22:40:13 +0200 (CEST) Date: Sun, 24 Jun 2018 22:40:14 +0200 From: Boris Brezillon To: Naga Sureshkumar Relli Cc: , , , , , , , , , , , nagasureshkumarrelli@gmail.com, michals@xilinx.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [[LINUX PATCH v10] 1/4] Devicetree: Add pl353 smc controller devicetree binding information Message-ID: <20180624224014.125cf0bc@bbrezillon> In-Reply-To: <1529563351-2241-2-git-send-email-naga.sureshkumar.relli@xilinx.com> References: <1529563351-2241-1-git-send-email-naga.sureshkumar.relli@xilinx.com> <1529563351-2241-2-git-send-email-naga.sureshkumar.relli@xilinx.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; 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 Naga, Subject prefix should be "dt-bindings: memory: " not "Devicetree: ". On Thu, 21 Jun 2018 12:12:28 +0530 Naga Sureshkumar Relli wrote: > Add pl353 static memory controller devicetree binding information. > > Signed-off-by: Naga Sureshkumar Relli > --- > Changes in v10: > - Corrected the typos like "should be" to "Must be" and nand to NAND etc.. > - Removed padding to describe size-cells and address-cells > - Removed timing parameters from DT, and added ->setup_data_interface() hook > to the driver to read the SDR timings > - Modified label name from "pl353smcc_0: pl353smcc@e000e000" to > "smcc: memory-controller@e000e000" as suggested by Miquel > Changes in v9: > - Addressed below comments given by Randy Dunlap and Miquel Raynal > - Typos > - Added extra documentation that explains the HW ECC limitation with SMC > (Comments given to v8: https://lkml.org/lkml/2018/3/22/23) > Changes in v8: > - None > Changes in v7: > - Corrected clocks description > - prefixed '#' for address and size cells > Changes in v6: > - None > Changes in v5: > - Removed timing properties > Changes in v4: > - none > Changes in v3: > - none > Changes in v2: > - modified timing binding info as per onfi timing parameters > - add suffix nano second as timing unit > - modified the clock names as per the IP spec > --- > .../bindings/memory-controllers/pl353-smc.txt | 41 ++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > create mode 100644 Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > > diff --git a/Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt b/Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > new file mode 100644 > index 0000000..8b4c65e > --- /dev/null > +++ b/Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt > @@ -0,0 +1,41 @@ > +Device tree bindings for ARM PL353 static memory controller > + > +PL353 static memory controller supports two kinds of memory > +interfaces.i.e NAND and SRAM/NOR interfaces. > +The actual devices are instantiated from the child nodes of pl353 smc node. > + > +Required properties: > +- compatible : Must be "arm,pl353-smc-r2p1" > +- reg : Controller registers map and length. > +- clock-names : List of input clock names - "ref_clk", "aper_clk" > + (See clock bindings for details). > +- clocks : Clock phandles (see clock bindings for details). > +- address-cells : Must be 1. > +- size-cells : Must be 1. > + > +Child nodes: > + For NAND the "arm,pl353-nand-r2p1" and for NOR the "cfi-flash" drivers are > +supported as child nodes. > + > +for NAND partition information please refer the below file > +Documentation/devicetree/bindings/mtd/partition.txt > + > +Example: > + smcc: memory-controller@e000e000 > + compatible = "arm,pl353-smc-r2p1" > + clock-names = "memclk", "aclk"; > + clocks = <&clkc 11>, <&clkc 44>; > + reg = <0xe000e000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + nand_0: flash@e1000000 { > + compatible = "arm,pl353-nand-r2p1" > + reg = <0xe1000000 0x1000000>; > + (...) > + }; > + nor0: flash@e2000000 { > + compatible = "cfi-flash"; > + reg = <0xe2000000 0x2000000>; > + }; > + }; I had a look at the PL353 TRM, and the block diagram looks very similar to the atmel EBI/SMC one. AHB/AXI memory ranges that are used to interact with the memories are assigned CS ids, which can then be used to configure the timings (and other kind of stuff). I think you should have #address-cells = <2>, the first cell encoding the CS id, and the second one, the memory offset within the reserved range for this CS id. See the atmel,ebi binding [1]. Regards, Boris [1]https://elixir.bootlin.com/linux/v4.18-rc2/source/Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt