From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3E26C47080 for ; Mon, 31 May 2021 11:31:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63C75610C8 for ; Mon, 31 May 2021 11:31:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63C75610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PZE//dIDVZ9w7bDoCfNluH2BWXJIxdoC82/LUIRRPRI=; b=ANsI8Z/yhSB0xG 9g/qc6wHoQURBXgPn/60smFGiGPPzDigjhrn7upuS+JruaP0lqBSjY82EWMtYcqU2vbhCPozhL2Dk jHh/8KEHG1+cvjndjRqRmqRS/VenZRDuKFpptp75kso5IqHiSu/0+U3HsU6Hd66YvkwOpmKYgIxVx V9HE5iiV65HQqc55EZoLZcVyUzn54S5I2gwAekV5iixkiL81kJpu7UsQdHkPN9tFsySDP2eNDwMqy BW40kEw537qT/L//4bJPVaxQ9D0aSwCGAOZzRvO/JoEU68wAzYg+Lodvs9q48g+vPs+dzmq1JsDl6 J8koqd1NTY8fGD4oh/Tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lng7P-00C0Cz-00; Mon, 31 May 2021 11:30:03 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lng7M-00C0Bv-4B for linux-mtd@lists.infradead.org; Mon, 31 May 2021 11:30:01 +0000 IronPort-SDR: 0/WbR2jsz7+K+PgJGENTJbwX2jP8YUd7ocUff+a6zmrnSH/8blU7FjkS8t7LcfMYv2PwUkYwla kPE3KvuZRE9g== X-IronPort-AV: E=McAfee;i="6200,9189,10000"; a="183022110" X-IronPort-AV: E=Sophos;i="5.83,237,1616482800"; d="scan'208";a="183022110" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2021 04:29:58 -0700 IronPort-SDR: PKaWed0PluNBvEuVgtNbJqkOgb+/nftxvtmF34myWchZAqtMN/SuwHkpr2Te+DSxq256hSBWX+ QzEN/xLa3Bhg== X-IronPort-AV: E=Sophos;i="5.83,237,1616482800"; d="scan'208";a="632543415" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2021 04:29:56 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 31 May 2021 14:27:41 +0300 Date: Mon, 31 May 2021 14:27:41 +0300 From: Mika Westerberg To: Michael Walle Cc: Pratyush Yadav , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Subject: Re: [PATCH] mtd: spi-nor: intel-spi: Add support for second flash chip Message-ID: References: <20210525160318.35802-1-mika.westerberg@linux.intel.com> <20210525191414.dc45h27rzqen4dce@ti.com> <20210526091250.GY291593@lahna.fi.intel.com> <20210526092417.GA291593@lahna.fi.intel.com> <20210526102810.GB291593@lahna.fi.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210526102810.GB291593@lahna.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_043000_195862_E3EC0E0C X-CRM114-Status: GOOD ( 28.60 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Hi guys, On Wed, May 26, 2021 at 01:28:16PM +0300, Mika Westerberg wrote: > Hi, > > On Wed, May 26, 2021 at 11:31:58AM +0200, Michael Walle wrote: > > > Oh, I see now this commit: > > > > > > a314f6367787 ("mtd: spi-nor: Convert cadence-quadspi to use spi-mem > > > framework") > > > > > > So "SPI MEM" means generic SPI subsystem for memory mapped devices. > > > Unfortunately Intel controller at least is not capable of running > > > generic SPI transactions. It only supports accessing SPI-NOR flashes and > > > for those there is small set of commands that supports. I don't think it > > > is even possible to convert the driver to generic SPI subsystem. > > > > AFAIK it stands for SPI memory device (memory mapped is not a requirement). > > Eg. spi-nxp-fspi doesn't support generic SPI devices either, but just SPI > > flashes. So I'd guess SPI MEM is exactly what you are looking for. > > OK, I see that there is ->mem_ops that can be used to implement > different higher level commands. What I'm not seeing is that how the > child SPI flash is created using this scheme? DeviceTree and ACPI are > supported fine but what about scanning? I mean the intel_spi driver has > this: > > spi_nor_scan(&ispi->nor, NULL, &hwcaps); > > But if the driver is to be moved under drivers/spi/* you can't really > call these functions anymore or can you? Or the point is to keep the > driver under controllers/ and just call spi_nor_scan(), and in addition > implement the new mem_ops? > > Thanks in advance and sorry about many questions but there does not seem > to be a conversion guide nor any (non-DT/ACPI) examples that I can take > a look. :-) Can you provide some guidance here? So in order to use the generic SPI subsystem with "SPI MEM" parts of it, I would need to be able to create the child SPI-NOR flash device without using ACPI or DT (as these systems do not have any ACPI/DT description), or use spi_nor_scan() but none of the driver under drivers/spi are calling it. Thanks! ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/