Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7164423ybp; Wed, 16 Oct 2019 04:53:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyncRE1KmZiOLaUZFk92fa63VpICoYKfpHhvbIOv3/ePKxnLIXnUq4rwioh7WahKqyiMKKw X-Received: by 2002:a17:906:2410:: with SMTP id z16mr39778230eja.120.1571226799262; Wed, 16 Oct 2019 04:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571226799; cv=none; d=google.com; s=arc-20160816; b=njV4SBxF7qUtW2L2thaJdxKhHin9b6C85rAqqdBA4+0kHWnmbGj6Cr0V44h6sCpXTX /ZZff07Oxbv2EZnfS6rlfHZsmnrnEmdqFoth1HCJFFMOEKEovfInnMPzLieCL7RgISKC OTaRTkgtiuS9zvN/EoYbNVA2Ly5BIQjOpJBq7Xk3RwWBj42e+qQ+NrhTdo1WDoNGmGZX KTu45qgJMLp5b8O1QNLGoiO6mXN4xrEgQTTj4H+wPIuZKwoTfGIpZx4cRjtYsTMMHxJc pQ4FAdqEcElb02gC6etzdJM6QaU5AneiSU3Ah1OVYcwILffCSDtd0IC67mi1QYSvr9Lz ehxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:from:message-id:mime-version:subject :cc:to:references:in-reply-to; bh=5qwf67mPKc27P9vE644fUwrYGkC7ZCEl0vGaawSaoWg=; b=aCVOSiQIVahZIypZ/chtxCJNHEw3HIW1bEyXCXyUQeI4fupMAGi64sqrNlFpXQQ5Gl vD7jLOwbXeR7kyfx+rfM0CgZl/mNbDIroPi0q6MSzhEvbk30YBI4SY/qikEuIMw9nuZW KL2SETWHsJOfAyfSMnknVRybjpOFbTX8SGydTwoJO1regq+xcYTseS0Bn1y7LS+QI8jW 0iiQLbeEDZEJsGBGVxFnsJkdIRJfeXlzYInfSSjy/SAsgbr1KgfGPY4qn6LrmudUKbiT xw9Lts06OXSYPdjsDaWq/xwy8HnyCyDv/emZkUaFvwxhZV8LP9TbD+p3CEPqkbUao6Z/ 7F1A== 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 p38si5439271edc.449.2019.10.16.04.52.56; Wed, 16 Oct 2019 04:53:19 -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 S1732539AbfJPG4A (ORCPT + 99 others); Wed, 16 Oct 2019 02:56:00 -0400 Received: from twhmllg3.macronix.com ([211.75.127.131]:50462 "EHLO TWHMLLG3.macronix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbfJPG4A (ORCPT ); Wed, 16 Oct 2019 02:56:00 -0400 Received: from twhfmlp1.macronix.com (twhfm1p1.macronix.com [172.17.20.91]) by TWHMLLG3.macronix.com with ESMTP id x9G6trgN044342; Wed, 16 Oct 2019 14:55:53 +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 0FAB2E5F2E903446FFBA; Wed, 16 Oct 2019 14:55:53 +0800 (CST) In-Reply-To: <20191015095637.142e6db7@xps13> References: <1568793387-25199-1-git-send-email-masonccyang@mxic.com.tw> <1568793387-25199-3-git-send-email-masonccyang@mxic.com.tw> <20191007104501.1b4ed8ed@xps13> <20191008092832.54492696@dhcp-172-31-174-146.wireless.concordia.ca> <20191015095637.142e6db7@xps13> To: "Miquel Raynal" Cc: bbrezillon@kernel.org, "Boris Brezillon" , computersforpeace@gmail.com, dwmw2@infradead.org, frieder.schrempf@kontron.de, gregkh@linuxfoundation.org, juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, marcel.ziswiler@toradex.com, marek.vasut@gmail.com, richard@nod.at, tglx@linutronix.de, vigneshr@ti.com Subject: Re: [PATCH RFC 3/3] mtd: rawnand: Add support Macronix power down mode MIME-Version: 1.0 X-KeepSent: 7A229151:50591C54-48258495:00249AAF; 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, 16 Oct 2019 14:55:52 +0800 X-MIMETrack: Serialize by Router on MXML06C/TAIWAN/MXIC(Release 9.0.1FP10 HF265|July 25, 2018) at 2019/10/16 PM 02:55:53, Serialize complete at 2019/10/16 PM 02:55:53 Content-Type: text/plain; charset="US-ASCII" X-MAIL: TWHMLLG3.macronix.com x9G6trgN044342 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, > > > > > > > > + nand_select_target(chip, 0); > > > > > > > > > > On several NAND controllers there is no way to act on the CS line > > > > > without actually writing bytes to the NAND chip. So basically this > > > > > is very likely to not work. > > > > > > > > any other way to make it work ? GPIO ? > > > > or just have some comments description here. > > > > i.e,. > > > > > > > > /* The NAND chip will exit the deep power down mode with #CS toggling, > > > > > > * please refer to datasheet for the timing requirement of tCRDP and > > tRDP. > > > > */ > > > > > > > > > > Good luck with that. As Miquel said, on most NAND controllers > > > select_target() is a dummy operation that just assigns nand_chip->target > > > to the specified value but doesn't assert the CS line. You could send a > > > dummy command here, like a READ_ID, but I guess you need CS to be > > > asserted for at least 20ns before asserting any other signals (CLE/ALE) > > > which might be an issue. > > > > okay, got it. > > But if possible, I think adding CS line control in nand_select_target() > > is a simple and generic way for MTD and all raw NAND controllers. > > The problem is not that we do not want to; the problem is that > controllers are not capable of doing it reliably if no byte is sent > over the NAND bus. okay, it's kind of pity even though our raw NAND controller is capable of doing it with no byte is sent over the NAND bus. As you mentioned that other controllers are not capable of doing it reliably if no byte is sent over the NAND bus. if so, does it work by adding a NAND_OP_DUMMY_INSTR ? (as Boris's comments) thanks for your time & comments. 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. =====================================================================