Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4235895imu; Mon, 28 Jan 2019 20:45:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zw/5P4wQt5DFNQ3D0UUzlSvypYiYbuweqtIAGt9V8WOTuJRDYhbcdPruyvQmk8ak7A4UP X-Received: by 2002:a17:902:d697:: with SMTP id v23mr13121570ply.261.1548737157750; Mon, 28 Jan 2019 20:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548737157; cv=none; d=google.com; s=arc-20160816; b=I3gPD2obqBQElxAK+0UOpmf100roWPLNXBYbbGX11KFlvL+oMm3ZPnSh5d0eoL480k pnszkVkOZ0WJaHjjPZuwAAR3xWeoc1NwxcGfrviXK1SCzeN8YsBmE/DN2+kruDpm4XnZ /bCJ1YQjaghz7jH8ZXdAwBqVA8vL9Wtj8vFQ/RHw7x8Cbs85dRrP7dAHSFocQ8c85ZnD yQPC45fj6c36MNAM98oLaGozdgACQycUvZ9fdcvI/2+u5cHBmgcZsycgj7mymnE+jJ+8 JbXWtAS+GDCmNwkA8ddL4X2MMk3pWoEwATA8aPlXSehPs+7Agc8cdIlBgWq7d47ioLzG 0/6w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=SsxW6fkD/qctw2NjLA6cTEcv/F0TugHn3GC22YwBKRA=; b=A4nt7PRy0fBaUrv1S7cOr8AWmoLdBt8wQhWINki/qe5hiCdOlbRWaCxMcJY0zd/fei LNfYhuCbYHyekmXGW7ZFpZcAJ7LSn5RA6O7V3x2NyOAEWdh8yDDKL8H1N3rieykAMgCh /bZAEIXlKTCH6HoWNuUFSL4K7ECJXJcE1T9MDx2MTSQsGpB5XYdWRvMeLnFPJSpysaXL ilzecVP+BiDEqFOkEJRdGUdJXbA++Ni83LcaH08AL89cf6/GLYylkK6l7RMjjDGvBKWY H9N1lXW1ZlOl4gVoa84HVQ2A/bKjWDtv4nYMnoawx/V2JTe7/xY68yCF53JUx4vIKVaU UPgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=idoY4koW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si17315085plm.393.2019.01.28.20.45.38; Mon, 28 Jan 2019 20:45:57 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=idoY4koW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbfA2Epg (ORCPT + 99 others); Mon, 28 Jan 2019 23:45:36 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53586 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfA2Epg (ORCPT ); Mon, 28 Jan 2019 23:45:36 -0500 Received: by mail-wm1-f67.google.com with SMTP id d15so16307588wmb.3; Mon, 28 Jan 2019 20:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SsxW6fkD/qctw2NjLA6cTEcv/F0TugHn3GC22YwBKRA=; b=idoY4koW7bAqvnGdAxBJt5sQlgRcAtq7t61pz+ZCeHixXiNxDYqwPbAzAO4fuvWZ08 0GhaW1VYrtMRRkiktxr5rDGUpmqzBt4x19Q4GVmxUd9+cEuxXqQWsHzlNPnJVH6qlHQ2 k4dQcME7ozOEOSFZFjJ9V/WBtCBewgc43OkN8GpFyeeN8MFaXzuYU5xS/Fk3Rvs7fbsN iFuoh/P3L1rlE6gowusIzphxbmygfqrzVKmN/MSE6mDXNo1XowxXJbaueIVSCSW1ejnp vmZWdATpIaeduP8C01CqxEcq+QzY1/F8XLYkBCnhbml4Uyo586pFzgXT80Ty+p8btv1k 03dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SsxW6fkD/qctw2NjLA6cTEcv/F0TugHn3GC22YwBKRA=; b=BQwd5on/aT0JqRhN9uvbpMPKBtJK5zYfuKVuIvaIluTT5engRFuqHmHsqQIJWjlfG9 0DwXf/JNAZJMKJcBkZO7nwgiJmdwl9Pl+Htq9iycKdBVVIl3tkfimOCuCjLomoeMuo72 2szpvuGFqJ1LpsHR3aJDpkx/kLySDsxudVV1ZbYpCZr1Q5zWISUm3E9zaln+i4wKRdv6 JZq2h3/zfwLHXV/PWOeeCeycBeigwb3TxVML9drkArpAy3Nr8/BwLRHa4lToUanp+279 Eg5MMsAtHnfjquDXgZsTglSPkLMYezOBta0+i5geDJKJMnC6WaDB5cjvM2Faz8qtMaYH ni2g== X-Gm-Message-State: AJcUukflZ213vJeH8pPSQkH84Qf4L0OlSsF9P/r6EkiJWUJ8zfnSBDEa Mmrv0RpZbgitD4erLoaK6vA= X-Received: by 2002:a1c:c70f:: with SMTP id x15mr19388076wmf.130.1548737132688; Mon, 28 Jan 2019 20:45:32 -0800 (PST) Received: from [192.168.1.4] (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id t199sm2760278wmt.1.2019.01.28.20.45.31 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 20:45:31 -0800 (PST) Subject: Re: [PATCH v7 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver To: masonccyang@mxic.com.tw Cc: bbrezillon@kernel.org, broonie@kernel.org, Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, sergei.shtylyov@cogentembedded.com, zhengxunli@mxic.com.tw References: <1548227352-14910-1-git-send-email-masonccyang@mxic.com.tw> <1548227352-14910-2-git-send-email-masonccyang@mxic.com.tw> <67fa5f94-886b-f09c-c93d-832e427ffec8@gmail.com> <0b3ea94f-a4f3-0780-301b-f88ff2ad2fb1@gmail.com> <2d762c16-d714-9171-9450-b6adf1a6509c@gmail.com> From: Marek Vasut Openpgp: preference=signencrypt Message-ID: Date: Tue, 29 Jan 2019 05:43:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/29/19 3:26 AM, masonccyang@mxic.com.tw wrote: > Hi Marek, Hi, >> >> "Marek Vasut" >> >> >> >> > +module_platform_driver(rpc_spi_driver); >> >> >> >> >> >> >> >> RPC is not a SPI controller, it's a SPI and HF controller. >> >> >> >> >> >> >> >> Also, how difficult will it be to add the HF support ? >> >> >> > >> >> >> > One of my customers needs RPC SPI driver for our company's >> >> >> > Octal-Flash,MX25UW51245G. >> >> >> > We don't have HF product and hope you could understanding. >> >> >> >> >> >> I am worried that when we need to add RPC HF support (which is > what all >> >> >> boards but the D3 Draak use), we will have to rewrite the entire > driver >> >> >> and/or convert it to MFD and that would be a tremendous >> > undertaking. I'd >> >> >> prefer to have the driver ready for the HF addition before it's >> > accepted >> >> >> upstream. >> >> >> >> >> > >> >> > I think maybe your concerned would be happened only if HF driver >> > goes with >> >> > spi-mem layer. >> >> > >> >> > A comment for HF from Daniel Fishman. FYR. >> >> > >> >> > https://www.quora.com/What-is-a-hyper-flash-memory-and-how-is-it- >> >> different-from-normal-flash-memory >> >> >> >> I have a decent idea what HF and SPI NOR are, since I wrote the RPC >> >> driver for both HF and SPI mode for U-Boot (as I mentioned earlier). >> >> >> >> The HF in Linux would use the CFI NOR part of MTD framework. My concern >> >> is that when we need to add HF support into this driver, this driver >> >> will have to be basically rewritten, since the architecture won't allow >> >> for that. I'd like to avoid that, since the majority of Gen3 boards, >> >> expect for the D3 Draak, use RPC in HF mode. >> > >> > FYI~ >> > >> > MX25UW51245g(64MByte Octa) ? ? ? ? ? ? ? ? ? ? ?S26KL512S(64MByte HF) >> > ? ?8 IO ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?8 IO >> > 200MHz DDR@1.8v ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 166MHz DDR@1.8v >> > >> > support Read-while-write ? ? ? ? ? ? ? ? ? ? ? Not support >> > good for OTA,etc >> > powerful application >> >> What does that mean ? > > I have no idea why would you say "since the majority of Gen3 boards use > RPC in HF mode" ? Well, the H3/M3W/M3N S-X(S) and the H3/M3 ULCB and E3 Ebisu all boot from HF. Only the D3 Draak uses QSPI NOR. > So far as I know that HF is provided by Cypress only and > any mass production product use the component which is provided by only > one provider > will be a big risk. > > Compare to HF, there are more provider of SPI/Octa could support the > mass production product > as their second provider. > > In addition, from the technical points of view, mx25uw51245g is more > powerful than HF and > good for complicate user application, i.e., OTA and so on. Did you consider protocol overhead too ? I don't think you can compare them just by raw numbers of pins and bus frequency. Note that over-the-air update (if that's what you mean by OTA) is completely separate from the underlying storage device. > I think customer have more choice for their flash memory component. Note that none of this is really relevant to my concerns above regarding HF support. This driver should be implemented as MFD driver and the SPI part should use the MFD core part , just like the future HF part. -- Best regards, Marek Vasut