Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp427245ybi; Wed, 19 Jun 2019 01:50:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYNwuW2nosvh19pOiKHWecZyIDRSZbdVonrT3CUT8u5eDFs/B5sSF3hR61G+CFD/k7vx8l X-Received: by 2002:a65:6241:: with SMTP id q1mr6626308pgv.24.1560934257844; Wed, 19 Jun 2019 01:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560934257; cv=none; d=google.com; s=arc-20160816; b=CffAGzhTQ19LR0VoHkzqGkIR0v4WAfJSL11uPCq5ozrqOLl4EtzlhCMSBeUDGBaPLH hqrKG5b9AuKwA4fdS1B0RlkFdrXLVV93LcTlzDOx4TJFjGPdv7e8r9h/s1bgHgasSX+J y0rOqgUFnuPakb/gGrSyxOhK9UKff/USzHaeKx2zkJdjFCeto+j0uSOm9b7V8XTao8oV DKjyaIXymu5eu5jc12xBDQjTEiLwxNaq8oihax5pVMlWzLQfXBzFOdspKg0k4dkpHtI7 oNgmqD3f/uNRHItSlb6iBcHEluy9TnJeWwqdLL3clFeVQPIKgXxeOHtxhi9ze7oe54vS o1mQ== 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:date:from :message-id:mime-version:subject:cc:to:references:in-reply-to; bh=jY9+3JdXI1rO/XCttA2VjKj6ALU1+oiLdrstsNBEkfc=; b=PzO5m7jai90K2ybT9dnJpIJInPf7YpNDKT4QbS0Wgd3MCLoAFiuakbaaMwClCfkuXG 8bUD6+Uciq11GSaNOQXPxjcTP1pAWfOJpL4L1p7AEwX9Yui5jQPe1tPaQsoO+2oVYvny 6lc4iZyQbulSCly4TceCS3MaMEQbkb8LBx5c/fhycXKoEeZ8rw6ckhV8+p/82MFRYH6G PzKAs3sRcSVkav7Dta7AxznsOnJmjvJKRUCfs3ivbCbgrQ5xbGkCJpn9K3AGnYJcTAUv iBZitT7tVrQP036f6jQcJgrmFpUcGHUcgLfoT3Jo2DIMc7Y9wZnsaxRIUEBicH9l0aYB 3AOA== 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 i3si784943pld.357.2019.06.19.01.50.41; Wed, 19 Jun 2019 01:50:57 -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 S1731329AbfFSIsu convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Jun 2019 04:48:50 -0400 Received: from twhmllg3.macronix.com ([122.147.135.201]:11116 "EHLO TWHMLLG3.macronix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730418AbfFSIsu (ORCPT ); Wed, 19 Jun 2019 04:48:50 -0400 Received: from twhfmlp1.macronix.com (twhfm1p1.macronix.com [172.17.20.91]) by TWHMLLG3.macronix.com with ESMTP id x5J8mg1Q004932; Wed, 19 Jun 2019 16:48:42 +0800 (GMT-8) (envelope-from masonccyang@mxic.com.tw) Received: from MXML06C.mxic.com.tw (mxml06c.macronix.com [172.17.14.55]) by Forcepoint Email with ESMTP id 6458BBF1EB3AC5549737; Wed, 19 Jun 2019 16:48:43 +0800 (CST) In-Reply-To: <20190619100904.6b759377@xps13> References: <1555320234-15802-1-git-send-email-masonccyang@mxic.com.tw> <1555320234-15802-3-git-send-email-masonccyang@mxic.com.tw> <20190512151820.4f2dd9da@xps13> <20190520142333.390091d5@xps13> <20190527144250.71908bd9@xps13> <20190617143510.4ded5728@xps13> <20190618081436.5d488320@collabora.com> <20190618092901.3bdd9f61@collabora.com> <20190619100904.6b759377@xps13> To: "Miquel Raynal" Cc: bbrezillon@kernel.org, "Boris Brezillon" , broonie@kernel.org, christophe.kerello@st.com, computersforpeace@gmail.com, devicetree@vger.kernel.org, dwmw2@infradead.org, geert@linux-m68k.org, juliensu@mxic.com.tw, lee.jones@linaro.org, liang.yang@amlogic.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, marcel.ziswiler@toradex.com, marek.vasut@gmail.com, mark.rutland@arm.com, paul.burton@mips.com, richard@nod.at, robh+dt@kernel.org, stefan@agner.ch, zhengxunli@mxic.com.tw Subject: Re: [PATCH v3 2/4] mtd: rawnand: Add Macronix MX25F0A NAND controller MIME-Version: 1.0 X-KeepSent: ACBC7B27:1732CFB6-4825841E:0030075C; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3FP4 SHF90 June 10, 2013 Message-ID: From: masonccyang@mxic.com.tw Date: Wed, 19 Jun 2019 16:48:44 +0800 X-MIMETrack: Serialize by Router on MXML06C/TAIWAN/MXIC(Release 9.0.1FP10 HF265|July 25, 2018) at 2019/06/19 PM 04:48:43, Serialize complete at 2019/06/19 PM 04:48:43 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT X-MAIL: TWHMLLG3.macronix.com x5J8mg1Q004932 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, > > > > > > Re: [PATCH v3 2/4] mtd: rawnand: Add Macronix MX25F0A NAND controller > > > > > > On Tue, 18 Jun 2019 08:14:36 +0200 > > > Boris Brezillon wrote: > > > > > > > > > > > > > > > > > > > > > How to make all #CS keep high for NAND to enter > > > > > > > > > low-power standby mode if driver don't use > > "legacy.select_chip()" > > > > > ? > > > > > > > > > > > > > > > > See commit 02b4a52604a4 ("mtd: rawnand: Make ->select_chip() > > > > > optional > > > > > > > > when ->exec_op() is implemented") which states: > > > > > > > > > > > > > > > > "When [->select_chip() is] not implemented, the core > > is > > > > > assuming > > > > > > > > the CS line is automatically asserted/deasserted by the > > driver > > > > > > > > ->exec_op() implementation." > > > > > > > > > > > > > > > > Of course, the above is right only when the controller driver > > > > > > > supports > > > > > > > > the ->exec_op() interface. > > > > > > > > > > > > > > Currently, it seems that we will get the incorrect data and > > error > > > > > > > operation due to CS in error toggling if CS line is controlled > > in > > > > > > > ->exec_op(). > > > > > > Oh, and please provide the modifications you added on top of this patch. > > > Right now we're speculating on what you've done which is definitely not > > > an efficient way to debug this sort of issues. > > > > We really need to see the datasheet of the NAND chip which has a > problem and how this LPM mode is advertized to understand what the > chip expects and eventually how to work-around it. okay, got it and thanks. > > > The patch is to add in beginning of ->exec_op() to control CS# low and > > before return from ->exec_op() to control CS# High. > > i.e,. > > static in mxic_nand_exec_op( ) > > { > > cs_to_low(); > > > > > > > > cs_to_high(); > > return; > > } > > > > But for nand_onfi_detect(), > > it calls nand_read_param_page_op() and then nand_read_data_op(). > > mxic_nand_exec_op() be called twice for nand_onfi_detect() > > Yes, this is expected and usually chips don't care. got it and I will try to fix it on my NFC driver. > > > and > > driver will get incorrect ONFI parameter table data from > > nand_read_data_op(). > > > > Thanks, > Miqu?l best regards, Mason CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation. Macronix International Co., Ltd. ===================================================================== ============================================================================ CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation. Macronix International Co., Ltd. =====================================================================