Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp587398rwi; Mon, 10 Oct 2022 04:50:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4i5hngP6O3CNogtgoTAgltbfkx0Buun/KEuFmaC0DhGhUjG8+FZMi8vpIwp9am5wOVPYn9 X-Received: by 2002:a17:907:3da2:b0:78d:45df:b4f with SMTP id he34-20020a1709073da200b0078d45df0b4fmr14322799ejc.651.1665402625293; Mon, 10 Oct 2022 04:50:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665402625; cv=pass; d=google.com; s=arc-20160816; b=nFrFdQUA9DeSLSF6wRIm3kluJObukASdIJG1QaL7MofglgizqbWBYG3RMqDjmCFmPf VKFqjyfK5HdMOogBOO312JUpJQE34CMBDXZ2xI6NrnPqqLP7FR3KT+srBaaCyGb8my+o 3999WoWuhXHSAeOwE86vIdYc8PrADb33/mWKOijFoxzADHvNCjsknC078jaKiP15KZcM 0UzJwItBf/NmsRsr7QTzusvSzfzvf4wB1k16u7TI7vkdA4HcvBV+VvJgR7dWABggSyOd PuT40pN0sbisLb2TtrkLOTPEeipBCD+pNaPd6ZteySwTcuyfEZMj/Mtnv0EvazfoRQty /AWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=3w2wsR8YAxzRtF2q+Ct4+YYFtFleWgM4fnyK/YaNEIs=; b=jqdaLLiSUL0zqP0Dnl4Dqoi6txHdSPVR7x8IZ1thNd98lZZZL0A5uw+Pw6VtH17FTw h71JQFLqln5D9rYE1m2o4V5tvxPv2exmSMcMGKs9z4AgJ560c4fLXnVHcID9vzWqNCMJ v7uYfBi+HFOFndUTYP/iz+PRNM03zxuzQYjPy6NGpGSm2jQOLjk6J/6Bz/BxL+5jygwV CMv9qoOTSxNQ4DPnjkTHW9A/Ws2IGFdfJQJxqht+Ha3YU8+WsgrHZNbTDD9Og0Nb1kNq 4B/Dgm1AaaZgrJgBOLxjK6dPBlyIPek8Qcw3l7xfutU4Pj0QqrLY89xZULa38IQWwxYN E18A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iopsys.eu header.s=selector1 header.b=LwQAybg+; arc=pass (i=1 spf=pass spfdomain=iopsys.eu dkim=pass dkdomain=iopsys.eu dmarc=pass fromdomain=iopsys.eu); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iopsys.eu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a170906470d00b007835897050esi9638641ejq.404.2022.10.10.04.49.59; Mon, 10 Oct 2022 04:50:25 -0700 (PDT) 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=@iopsys.eu header.s=selector1 header.b=LwQAybg+; arc=pass (i=1 spf=pass spfdomain=iopsys.eu dkim=pass dkdomain=iopsys.eu dmarc=pass fromdomain=iopsys.eu); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iopsys.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbiJJKv0 (ORCPT + 99 others); Mon, 10 Oct 2022 06:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231817AbiJJKvX (ORCPT ); Mon, 10 Oct 2022 06:51:23 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150070.outbound.protection.outlook.com [40.107.15.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CCE26CD39 for ; Mon, 10 Oct 2022 03:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAKhHeYc8AxG2jxkjeuG9PS3I19PBjUkTrXuw3G/hFQck1mD2693XzFoanuBM905saEpaihr5bZQ6bcbjYgh6EIw4eByXgAbOrds+Jl11A5v5lvV5BfAZIfdaJ39U4sw9xLiYUoucFWnPHA+pMgGAe5MP43WQquNe+iaenrH28UR64VDx2ifUvLFzpkkKBbb3YRtCS63hLCx2SZUTxv3OBwnNxerEmER8/06mCOjNU+oT5npdlcm40cBKktmznLA7bNueYrBZOxEDieyugctVSrf4QQiM9NoABmEKq7UUo5W+frLBxFCu0AsfF6ytczHv61qIsOi2Q/pE/JkF/DxuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3w2wsR8YAxzRtF2q+Ct4+YYFtFleWgM4fnyK/YaNEIs=; b=aOwQrnSNb23Zf4vdUax7SuNj7qCfvkfoeuxiN2vOcbAtfJeKIL3339lOVH2BpsENLUZ2GZ4LaFYG7nYf+ToEspQ0b/ozGfeh9Aaf/6O5591RQaGgyF59idLkRL2V1lRpoCQeDkEgtnJP/HUjQosSKiLru2HatgBQgYkRxx0/l1sd1Vbs/Z51bpmal1qy1evycZfoCITN6HQPeTTaNzDSbJi9RzoE7XrC7NzIqipHU3+kPc6uAuRZiM78VLHWsVaoGO3Dj4m3liY+W8r3LeQuGdVN8sudSDFNXDhKujBuN+4A/SIMo26BfFcG7UM5fiR91rZ1fE6DrSG/WcFk+vhTrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=iopsys.eu; dmarc=pass action=none header.from=iopsys.eu; dkim=pass header.d=iopsys.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iopsys.eu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3w2wsR8YAxzRtF2q+Ct4+YYFtFleWgM4fnyK/YaNEIs=; b=LwQAybg+2f/82Zq2h6vh/c66e0JhsI8m3RZFPFIWPOjhuMFINLYtX/rM//ZIhwpvvUhn1/dOCEjG/hxIuoaejRO7jU1ZYMZP7Kv6Jf8HZLAjlIneHauuoQe/X5juh84CfEK1npD9dtmiJEPkQ+ty/H14T9z27W163ZflEFe3mP0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=iopsys.eu; Received: from PAXPR08MB6494.eurprd08.prod.outlook.com (2603:10a6:102:154::16) by DBAPR08MB5751.eurprd08.prod.outlook.com (2603:10a6:10:1a0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Mon, 10 Oct 2022 10:51:18 +0000 Received: from PAXPR08MB6494.eurprd08.prod.outlook.com ([fe80::3c25:b934:e13d:d6bd]) by PAXPR08MB6494.eurprd08.prod.outlook.com ([fe80::3c25:b934:e13d:d6bd%5]) with mapi id 15.20.5676.040; Mon, 10 Oct 2022 10:51:18 +0000 From: mikhail.kshevetskiy@iopsys.eu To: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Cc: Mikhail Kshevetskiy , Vignesh Raghavendra , Richard Weinberger , Miquel Raynal , Frieder Schrempf Subject: [PATCH v3 1/2] mtd: spinand: winbond: fix flash identification Date: Mon, 10 Oct 2022 13:51:09 +0300 Message-Id: <20221010105110.446674-1-mikhail.kshevetskiy@iopsys.eu> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: GV3P280CA0118.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:8::31) To PAXPR08MB6494.eurprd08.prod.outlook.com (2603:10a6:102:154::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6494:EE_|DBAPR08MB5751:EE_ X-MS-Office365-Filtering-Correlation-Id: d72ebe77-45e1-4d36-f0fe-08daaaad5c70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lt48biilAVxzBbDfxHTADZo5G9KcC8Ke+tzehI0O5BSYAN+c3soibGGqon3Emu9d8ou6hXTQOlKh2QopLwMCpuQw/YKQQFx+2HupyrBWHb6YpZeRk85mMzGiA7dA9gqWlWJ4yki/1KfOSZj5IxVEHG14H8kBldyS0HAATjfdVSVxkD6aulvctNd5fsW3lzMyF9WRBZUKQcy01a5i//FbA2/HdU9uR13NxZcz8gy0s3J0FHYX5xwdyTtIhj9Nm1MabpzeuS44WKDhN1HnjNrqtCvjQ16j7hEbZmu9ik99Ft7qnhLVZvQLLrLlAX5bNeOaOdyZWHXExwD0DRiOxjFh3Gb1vNmmyTl0xgcBc4RZ6sUWFXhisHnF+PaQ+Hmwy71opowT2cqZ+Gj+W4QOXitdP0HCiCi5jV60wFiRtgRNTLgd6BUnYw0IY3WCroVRQjY6AsFRECUzyxH571FuQW44RfrHZ29tBd9gkWKLjujLqIgS+RgKObSYv/JmCRFIZLvrcnDi1ET4Z/0cwXmrggxFYzIClub5muJ80CjIqMNaRo+olnVQx/wRIq0A//smiQ2M3bsrrUUTL61g4xVJSRohpwdkHzTkiAQSsTQC0KF6UHjBiiOwAF4wSBsjQytyVHeU+dKDWdXstU4Z7hDfdguuYP/UmSvDr2w0ChSnhertjpH+pIuLlYR0vmk0oBG8PQ+K5UmjSO/j8aIkUZie63EE8iBI/829w/ZXOQbv4k/ugmE87gSGH+fG8OZkacbWy53hsS3cCf0WLaRnc8HCCUYVOw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6494.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(366004)(136003)(39830400003)(376002)(451199015)(52116002)(6506007)(86362001)(66946007)(66556008)(316002)(4326008)(54906003)(8676002)(38100700002)(38350700002)(478600001)(36756003)(1076003)(186003)(66476007)(6666004)(8936002)(6512007)(9686003)(6486002)(83380400001)(26005)(41300700001)(2906002)(2616005)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pK0T+fDwhAkWYCyijoK4aG2cRheJElsg1Xq27E/6VC25Dj3Ms4sDVNgV6CIL?= =?us-ascii?Q?oorJEzcOJUyYCvQKri9pRfmlUesH36xrDTxf7vlNUlo94+dzE+WJj3Wa84lb?= =?us-ascii?Q?Ne3KnNjen+p3IxDVW4csB+3gTz+xBYL3pQdoDbmzTuCdP6IyDegGXxT6vXPl?= =?us-ascii?Q?zCeCa2Y9dD1kIsUY/WjF9GpRvf1tue9LtLQ1MMAl3ZyVHAVTJi5L4YOM4Cau?= =?us-ascii?Q?TVL18G4RHYW1H2b5bPGqQVyryZxeFyOIYiwg/CHd12ZhnfU2HPpESfEWYxvG?= =?us-ascii?Q?mkma2Ml3nHccRUgJcfUepr/KQiQy6gF/i67myznCVPIGyfUk7DVhXLE4NZ2X?= =?us-ascii?Q?bM+5XDYPfWfu6wQ8fr4tkiGvSN17MGlXNR/Y5S7YF89sLWsJ2GaWzbG7/GgO?= =?us-ascii?Q?c+2ip4eJD4B24sxgje4fwY7IjLsodyuI7HU+JuzHOmpdYDHvoVCysHhy/xhc?= =?us-ascii?Q?XA0kWkJ2+ZhQS3lyimNb/+xlfeYEo2CD6hm7GJeQqbG3ShJrJgf74allJICK?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l0oOsTUPgFI9H1D6bSfFoLzmWaJBJSqjVCFC2?= =?us-ascii?Q?3QUYtOnk/GQIlGXTYGG1IIBZraUymWcRAZwKvjRcAJho46to1Icyc7wkN+gs?= =?us-ascii?Q?2fjGF2znm8OwhwiKlb9CzInYEtY+4PgMPQQXQ32DAnygCFGAdjzjUmDsEAUE?= =?us-ascii?Q?Hwwa70iqTvmmqSxHjvGugDYSOcpW8N2lfDF6kbcXmIT901kfzAwMiPjX8wN4?= =?us-ascii?Q?nQ=3D=3D?= X-OriginatorOrg: iopsys.eu X-MS-Exchange-CrossTenant-Network-Message-Id: d72ebe77-45e1-4d36-f0fe-08daaaad5c70 X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 10:51:18.5816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7ff78d65-2de4-40f5-8675-0569e5c7a65d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1AFqI1WITHHAwVxyy6h8ZXtBR1tTw8o4TZFSz8xzQ1GeimrRrW3iM+xpQhABBDGmxKSwXzg99TSnh0Sv6Ob2JYcBUg4KBuDgOruMDdx3wqE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5751 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 From: Mikhail Kshevetskiy Winbond uses 3 bytes to identify flash: vendor_id, dev_id_0, dev_id_1, but current driver uses only first 2 bytes of it for devices identification. As result Winbond W25N02KV flash (id_bytes: EF, AA, 22) is identified as W25N01GV (id_bytes: EF, AA, 21). Fix this by adding missed identification bytes. Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/winbond.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 76684428354e..ed368a55d68f 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -76,7 +76,7 @@ static int w25m02gv_select_target(struct spinand_device *spinand, static const struct spinand_info winbond_spinand_table[] = { SPINAND_INFO("W25M02GV", - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab), + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab, 0x21), NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 2), NAND_ECCREQ(1, 512), SPINAND_INFO_OP_VARIANTS(&read_cache_variants, @@ -86,7 +86,7 @@ static const struct spinand_info winbond_spinand_table[] = { SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL), SPINAND_SELECT_TARGET(w25m02gv_select_target)), SPINAND_INFO("W25N01GV", - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa), + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x21), NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), NAND_ECCREQ(1, 512), SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -- 2.35.1