Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp398248ybb; Thu, 28 Mar 2019 04:58:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz5MTL/Gosr5C73fq17Wa4isMai84zBX12dneclXHHdrKbIrMHstuUWEuHe0f5STa/kD3l X-Received: by 2002:aa7:8ac8:: with SMTP id b8mr39492694pfd.87.1553774314477; Thu, 28 Mar 2019 04:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553774314; cv=none; d=google.com; s=arc-20160816; b=PKvJGv6C6ZdJcXAgqT+fvlU7ic8uRz9TyvWr0iTbbiNSiOOB8MQkYtU8TGDtpKTo3M LXN/UxXHpjpMMT/wnin7g4k4tLqPCCydehLSFYKKeOnh6yFtG402tdgxuIOM7soWtr5S rc2Ybe07k20r/h1Rr3KSVuPWq59PKHNWXO9Z5mUTlE5arXiJEf0LxMXWkB48V/186Ord eOlZgtCtsaxnVFz68PAOwH96Pi6isK/5aXwsGXE6glhXlENXlu5FnLf4hQRAkdp+yaPZ wmF5FNYJEF6Y6m0NKlh/nnNeJc3NaK7MUbvh3cNS7ezO0c6vq2OGDIDL2pa7i+oxJC7O KcCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oSY35PUiHXMZ1roga5ESZj/qIxX6nAtZzDR9iWObKTo=; b=JGa1YLysUOpkKozVUFFq+JmGgTN89K5K3ehYxf6UEF1AjmTtevZrH2qIHjis1jQa5s 1Rl9/AliOY9rT0gK1CwSAmk9ohKt/vV05Lxv9QB3uM+1dW+zEmY6heEpM0UHt1GntYjG t9O3re1YbC5LP8zOHD2D/6nvXFCNsbJDCwINOZSYHV9tq05p91ojyrmZkLa7UdoVDY/q yta5ca8DI+4XIrVbrTBqRLi5gaNRsPQwZiXMP9DInn7Nka3p8v80eTcEeISY4u5tNEIj jlBDblnJdN6Fzh8GYcwdvf2vQvrNsF9wJZyFgjfkjXNcTKoO+XHVoJJXmkg9kLWqloiO lI/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intenta.de header.s=dkim1 header.b=joGi4rAt; 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=intenta.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63si13233272pfc.183.2019.03.28.04.58.18; Thu, 28 Mar 2019 04:58:34 -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=pass header.i=@intenta.de header.s=dkim1 header.b=joGi4rAt; 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=intenta.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfC1L5C (ORCPT + 99 others); Thu, 28 Mar 2019 07:57:02 -0400 Received: from mail.intenta.de ([178.249.25.132]:25512 "EHLO mail.intenta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfC1L5B (ORCPT ); Thu, 28 Mar 2019 07:57:01 -0400 X-Greylist: delayed 339 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 Mar 2019 07:57:01 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=intenta.de; s=dkim1; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:CC:To:From:Date; bh=oSY35PUiHXMZ1roga5ESZj/qIxX6nAtZzDR9iWObKTo=; b=joGi4rAtclASx7OvKLBXmp6yjSLcP3HWOEDunjrjeP+J27NwLLTWYrxMMOjRou2aPnWZQpZdfxHAgRs62fMzfRxVzQ8T+AHTrRGZuM26khkvSKlfIMouT6yewjos1jUHmaE1dA6kUW0sHLILFUTHPU05uZl4MVVQO+hAnjgizw6Kblg3GtvIhUjuNGXUumuLvcj2VGe9swbfI4plEcb8WPGRssQ8Tc97AGQYRwxhxHO9SxBj1Srbk7c0Xyap/nZULsYRDUEho91R1KRZUbakdwdeVxpeJYjgquX08v43RzcscRWkcJRw3QKQ9TUqkax/yuEKr5xzz3BGSA9xwzOy7Q==; X-CTCH-RefID: str=0001.0A0C0203.5C9CB52C.00BE,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Date: Thu, 28 Mar 2019 12:51:06 +0100 From: Helmut Grohne To: Naga Sureshkumar Relli CC: "bbrezillon@kernel.org" , "miquel.raynal@bootlin.com" , "richard@nod.at" , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "marek.vasut@gmail.com" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Michal Simek , "nagasureshkumarrelli@gmail.com" Subject: Re: [LINUX PATCH v13] rawnand: pl353: Add basic driver for arm pl353 smc nand interface Message-ID: <20190328115106.i7ytk2uqno7i4h4u@laureti-dev> References: <1549694247-24625-1-git-send-email-naga.sureshkumar.relli@xilinx.com> <20190326132721.52e7ktnptgwvzeor@laureti-dev> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-ClientProxiedBy: ICSMA002.intenta.de (10.10.16.48) To ICSMA002.intenta.de (10.10.16.48) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Naga, On Wed, Mar 27, 2019 at 09:13:59AM +0000, Naga Sureshkumar Relli wrote: > It's a on-die ECC capable device. Did u mentioned nand-ecc-mode = "on-die" in dts. > The same part I tested by mentioning "on-die" property in dts and it worked for me. > Please share the dts entries for NAND. > Also if it is x8 bus then please mention nand-bus-width = <8>; > If it is x16 mention nand-bus-width = <16>; Thank you for pointing at the relevant properties. Indeed, these were missing in my previous tests. I am now using the following dt (generated from multiple fragments, giving the decompiled dt here): | memory-controller@e000e000 { | #address-cells = <0x2>; | #size-cells = <0x1>; | status = "okay"; | clock-names = "memclk", "apb_pclk"; | clocks = <0x1 0xb 0x1 0x2c>; | compatible = "arm,pl353-smc-r2p1", "arm,primecell"; | interrupt-parent = <0x4>; | interrupts = <0x0 0x12 0x4>; | ranges = <0x0 0x0 0xe1000000 0x1000000>; | reg = <0xe000e000 0x1000>; | | flash@e1000000 { | status = "okay"; | compatible = "arm,pl353-nand-r2p1"; | reg = <0x0 0x0 0x1000000>; | #address-cells = <0x1>; | #size-cells = <0x1>; | nand-ecc-mode = "on-die"; | nand-ecc-algo = "hamming"; | nand-bus-width = <0x8>; | }; | }; With this dt, the device is successfully initialized and the data read is mostly intact. When using it with jffs2, I get loads of ECC errors though (offsets and lengths vary): | jffs2: mtd->read(0x800 bytes from 0xb60000) returned ECC error Reverting back to the out-of-tree driver (4.14), it works normally, so a hardware defect seems unlikely. I compared a register dump of the smc between those drivers and the only difference I could find was NAND timings (at 0xE000E180), which are much lower with the new drivers as it does not consume the arm,nand-cycle-* properties that the old driver consumed. I tried hard coding the previous timings, but the ECC errors persist. This leads me to conclude that timings are not the cause for what I am seeing. Is there anything else I can try to diagnose it? Helmut