Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3608594pxb; Fri, 11 Feb 2022 03:57:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxksEQu0m22GJRv0MWHESmsRN8GM851KdoPl8d2dvCF4GLYUyF3IrIZ+nn0s9r9ppY5ZA9C X-Received: by 2002:a05:6402:4305:: with SMTP id m5mr1501324edc.342.1644580663402; Fri, 11 Feb 2022 03:57:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644580663; cv=none; d=google.com; s=arc-20160816; b=eDUfmaFhdupkMTdf6n+bQ5A3rrhaY6mWt3mJGDwc3EBDsR2ueJXNOWK8Gs8yO3MKqy gZWQn/hdoWH8lUUy/WHaKowCNikRNzXNdA6It94CDokLUCiGFq852FnenDwshMUVBQKd JNTGKHvsO4klN100P15mH4IfxHtAqH+gZtSEX34K/2PXmvVtYFllQjFd4DWHr9D24NgH H6ujODm09NevyZka4E32VFjLWyDmlzqwdtHETIk+Ue1Yjlz0XfyRteMpaNdKhzW6Qqn/ rWSj37jgItjeFNyA6yvS+SVCo824dHQaKI6mewxT5K5MwfPxnzS4u+E4woCg1WQe+mTf ff9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=uA2i1mughdRhhDjbb2ENH21e2dlT+e2Pom7qGofKmI8=; b=n315E94d014RdUTxm6w7nN/WECQzedH4qYz1IuxrioFVN1+PzU88faEu2a2u1IY7HO tuf7mCmZ9TJS7n0QGKzQYqHEt4LwrDFO1gp6nFj6xz/cwBmsXYj4sQmrmJDoajdkHVLr k6uN5lqCxl74lNh1wJQxq5e68LMLIHTKsRTxI8kqexTvW434jgkmfl9EeT/MWm+sg5B9 Yf/+IzbZ534/7gJhknseq9+22h9b/XTdE+pCqRkUZyGfgkmTM4sMLVAUCbCUcu/dWZxu BIQvMaQGaztIIQqbyCcEzYB0JnBdKE5QcU18wlYYWss5RcyW/D6WOx+o44qtBvQxtORi Apzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=qD7Z1Yzk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm17si6087480ejc.620.2022.02.11.03.57.16; Fri, 11 Feb 2022 03:57:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=qD7Z1Yzk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346928AbiBKJWy (ORCPT + 99 others); Fri, 11 Feb 2022 04:22:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234323AbiBKJWv (ORCPT ); Fri, 11 Feb 2022 04:22:51 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6382DB96 for ; Fri, 11 Feb 2022 01:22:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644571371; x=1676107371; h=from:to:cc:subject:date:message-id; bh=uA2i1mughdRhhDjbb2ENH21e2dlT+e2Pom7qGofKmI8=; b=qD7Z1YzkDqN4N8QXvdgYyRJjkxsA/984UhSLIfPClqmwtLv4xSfJLhGs LVLvfDEvvJJpPqU6/jQ7FnLo2WdK37I0Nl3Mdtm8d9tPgyXB1QeHe0a/M aszv84mEopDpKHKrHQltAIEsyNJUSPnJ1gRlFS0GK4f68ZFGq1oeTe0hJ c=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 11 Feb 2022 01:22:51 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 11 Feb 2022 01:22:51 -0800 X-QCInternal: smtphost Received: from c-sbhanu-linux.qualcomm.com ([10.242.50.201]) by ironmsg02-blr.qualcomm.com with ESMTP; 11 Feb 2022 14:52:31 +0530 Received: by c-sbhanu-linux.qualcomm.com (Postfix, from userid 2344807) id B0CB756EE; Fri, 11 Feb 2022 14:52:30 +0530 (IST) From: Shaik Sajida Bhanu To: dianders@chromium.org, tudor.ambarus@microchip.com, michael@walle.cc, p.yadav@ti.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: quic_stummala@quicinc.com, quic_vbadigan@quicinc.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sartgarg@quicinc.com, Shaik Sajida Bhanu Subject: [PATCH V6] mtd: spi-nor: winbond: Add support for winbond chip Date: Fri, 11 Feb 2022 14:52:29 +0530 Message-Id: <1644571349-29649-1-git-send-email-quic_c_sbhanu@quicinc.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for winbond W25Q512NW-IM chip. Signed-off-by: Shaik Sajida Bhanu Reviewed-by: Doug Anderson --- localhost / # cat /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/ spi16.0/spi-nor/jedec_id ef8020 localhost / # cat /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/ spi16.0/spi-nor/manufacturer winbond localhost / # cat /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/ spi16.0/spi-nor/partname w25q512nwm localhost / # hexdump /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/sp i16/spi16.0/spi-nor/sfdp 0000000 4653 5044 0106 ff01 0600 1001 0080 ff00 0000010 0084 0201 00d0 ff00 ffff ffff ffff ffff 0000020 6800 6c65 6f6c 7720 726f 646c ffff ffff 0000030 ffff ffff ffff ffff ffff ffff ffff ffff * 0000080 20e5 fffb ffff 1fff eb44 6b08 3b08 bb42 0000090 fffe ffff ffff 0000 ffff eb40 200c 520f 00000a0 d810 0000 0233 00a6 e781 d914 63e9 3376 00000b0 757a 757a bdf7 5cd5 f719 ff5d 70e9 a5f9 00000c0 ffff ffff ffff ffff ffff ffff ffff ffff 00000d0 0aff fff0 ff21 ffdc 00000d8 Changes since V1: - Added space before name of the flash part as suggested by Doug. Changes since V2: - Updated chip name as w25q512nwm as suggested by Doug. Changes since V3: - Updated flash_info flags passing according to below patch. Changes since V4: - Added OTP support for SPI card as suggested by Michael Walle. - Updated SFDP flags passing as suggested by Pratyush Yadav. Changes since V5: - Reordered flags passing info for spi nor as suggested by Michael Walle. - Added SFDP dump info in commit as suggested by Michael Walle. --- drivers/mtd/spi-nor/winbond.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index 675f32c..315b9f6 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -124,6 +124,10 @@ static const struct flash_info winbond_parts[] = { { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024) NO_SFDP_FLAGS(SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) }, + { "w25q512nwm", INFO(0xef8020, 0, 64 * 1024, 1024) + FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) + PARSE_SFDP + OTP_INFO(256, 3, 0x1000, 0x1000) }, { "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024) NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation