Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp832613pja; Wed, 1 Apr 2020 09:31:14 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3V9mTRRvpkb2Tt30v0Am2Z0TPEInPd3uwvRVyRptAK6ebSPmYc7xy8vCtoYdFUQm/LBkv X-Received: by 2002:aca:4046:: with SMTP id n67mr3557482oia.156.1585758674230; Wed, 01 Apr 2020 09:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585758674; cv=none; d=google.com; s=arc-20160816; b=xe+tSnjJIyCtvV+tRLA4+GpC3NTnSWAPUNSeJTrNT/FJx4Vl9lrn42Pboikr4RZFq0 adT9pAmuLLC+jfbIbCn/I2iLnRiausRKxFC3sTNeTt06pA9Hop0LHr7rx6RjuLQZDUGN 0X2pY38H2XKCUow7AVAf1ZcxbmKv9tkS9xeJxru96UUuMts++cc0AQn98q7xTR+b15Hx +C/hbyfMuluHDJFjgRNYbj+FGVmereBK3mNm73SL3Ci51KAXUpbxcPgHz4V2kcZX7kpO S3Mj7sTbCBRYHomvNbQ48Y1xClHuZN6+2MjcmKn2biIXStlvSP5tA3oGhjhGiuQU4MWs M6ng== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0CLaEhzpIzbQ2mU5WjFQB4hd+w0ZVzokpSeohQHPCLk=; b=CRFJ0uXaVuLs0KQPn6kfiMWpm62w+jOkQlKMmTWTeEJWtkj58ccYkbgCnW2HNNqZkO mU8HXIFMGuUi9TCDT4YQhQaaQAgC6QeRKrWgwaArtPcdVvI4V/38kO9ZoLi8D3DjKV6I TuXdewlHvSc7qAA1pxybrRi5A8Ag+eD4/BjyhLilvKgv9S7riINwFh0aXH2Fo/gX+o+n wbkZNLvkoJQFsZvWgK/0LbJUud3S9y0sikFj5VNJ4LaVBMHI/gskodHHAFmhywM2AE74 ZSv+R/cI7BrXFSdgUcHj7PszhRKhdEjyAmFI3ohLhjJdT0d6yc+rd0X+50rnynPm02/r H+Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aHw8idb9; 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 e53si1032311ote.156.2020.04.01.09.31.00; Wed, 01 Apr 2020 09:31:14 -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=@kernel.org header.s=default header.b=aHw8idb9; 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 S2387841AbgDAQ2q (ORCPT + 99 others); Wed, 1 Apr 2020 12:28:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:54166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387659AbgDAQ2p (ORCPT ); Wed, 1 Apr 2020 12:28:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 B9D782137B; Wed, 1 Apr 2020 16:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758524; bh=5JqrpdjqLIuWIOjEGpjTuL1YlPVL+BNI/ZpNl79kbkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aHw8idb90JtFRWkRqfXHRgw4qMN/WLsBpTHflHW3W/IZ0aIUMS90MU6lTTOGihHT+ 8HsULRNnauHk9esA31Jr9VWY/Hl0PgmNTLU/x5ULYvetR0xLaiV0Zt1Wl+653o0DIS 2hJs//cyVSrXbQJkhiUDsjkAfJ6rnpAp7BzQh74w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arthur Demchenkov , Merlijn Wajer , Roger Quadros , Tony Lindgren Subject: [PATCH 4.19 114/116] ARM: dts: N900: fix onenand timings Date: Wed, 1 Apr 2020 18:18:10 +0200 Message-Id: <20200401161556.667067117@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161542.669484650@linuxfoundation.org> References: <20200401161542.669484650@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Arthur Demchenkov commit 0c5220a3c1242c7a2451570ed5f5af69620aac75 upstream. Commit a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") started using DT specified timings for GPMC, and as a result the OneNAND stopped working on N900 as we had wrong values in the DT. Fix by updating the values to bootloader timings that have been tested to be working on Nokia N900 with OneNAND manufacturers: Samsung, Numonyx. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: Arthur Demchenkov Tested-by: Merlijn Wajer Reviewed-by: Roger Quadros Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/omap3-n900.dts | 44 ++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 16 deletions(-) --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -852,34 +852,46 @@ compatible = "ti,omap2-onenand"; reg = <0 0 0x20000>; /* CS0, offset 0, IO size 128K */ + /* + * These timings are based on CONFIG_OMAP_GPMC_DEBUG=y reported + * bootloader set values when booted with v5.1 + * (OneNAND Manufacturer: Samsung): + * + * cs0 GPMC_CS_CONFIG1: 0xfb001202 + * cs0 GPMC_CS_CONFIG2: 0x00111100 + * cs0 GPMC_CS_CONFIG3: 0x00020200 + * cs0 GPMC_CS_CONFIG4: 0x11001102 + * cs0 GPMC_CS_CONFIG5: 0x03101616 + * cs0 GPMC_CS_CONFIG6: 0x90060000 + */ gpmc,sync-read; gpmc,sync-write; gpmc,burst-length = <16>; gpmc,burst-read; gpmc,burst-wrap; gpmc,burst-write; - gpmc,device-width = <2>; /* GPMC_DEVWIDTH_16BIT */ - gpmc,mux-add-data = <2>; /* GPMC_MUX_AD */ + gpmc,device-width = <2>; + gpmc,mux-add-data = <2>; gpmc,cs-on-ns = <0>; - gpmc,cs-rd-off-ns = <87>; - gpmc,cs-wr-off-ns = <87>; + gpmc,cs-rd-off-ns = <102>; + gpmc,cs-wr-off-ns = <102>; gpmc,adv-on-ns = <0>; - gpmc,adv-rd-off-ns = <10>; - gpmc,adv-wr-off-ns = <10>; - gpmc,oe-on-ns = <15>; - gpmc,oe-off-ns = <87>; + gpmc,adv-rd-off-ns = <12>; + gpmc,adv-wr-off-ns = <12>; + gpmc,oe-on-ns = <12>; + gpmc,oe-off-ns = <102>; gpmc,we-on-ns = <0>; - gpmc,we-off-ns = <87>; - gpmc,rd-cycle-ns = <112>; - gpmc,wr-cycle-ns = <112>; - gpmc,access-ns = <81>; - gpmc,page-burst-access-ns = <15>; + gpmc,we-off-ns = <102>; + gpmc,rd-cycle-ns = <132>; + gpmc,wr-cycle-ns = <132>; + gpmc,access-ns = <96>; + gpmc,page-burst-access-ns = <18>; gpmc,bus-turnaround-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>; gpmc,wait-monitoring-ns = <0>; - gpmc,clk-activation-ns = <5>; - gpmc,wr-data-mux-bus-ns = <30>; - gpmc,wr-access-ns = <81>; + gpmc,clk-activation-ns = <6>; + gpmc,wr-data-mux-bus-ns = <36>; + gpmc,wr-access-ns = <96>; gpmc,sync-clk-ps = <15000>; /*