Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2386064lqp; Sun, 24 Mar 2024 17:07:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFGqHVjCSgZRkQugiaMnoo1eGo/lLXcmr77uRHsbrrWNxLYToIHGnsk4lO5ZMRsxTsLDX0X1zI8FVWLz1/hd6qrsZE6X6jIq9odQgE2Q== X-Google-Smtp-Source: AGHT+IGWmi/Sc/l2KGGYKGzxqC8vAeZDMxDGr+T4QMkTcilRQipmZXmqVaqr0Ce00WbzdxI4sVTY X-Received: by 2002:a05:6a00:1825:b0:6e6:9a11:ccec with SMTP id y37-20020a056a00182500b006e69a11ccecmr6069008pfa.17.1711325247071; Sun, 24 Mar 2024 17:07:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325247; cv=pass; d=google.com; s=arc-20160816; b=OlXZA1KLxzEJIHQG1C7k6GdlWPcVATDSjrLIUczz5njMGlcPOuVzhBzNJtFXqzI92k 3KxTTzC3n225irdpe7A0bZwAGQ8kQbw+S31jNR2P/kAPyvdlfNhwozGPQpVHGyfvr3O5 lSEDaKQl8VdI9EJyDRz2fEp5Yo0XqqEVMutenBhZ2mu/kOVn8/elDlg3RPAIsZ8n0bRe FTkWTc+gi5CGOBjz1oAPRrcgO6NQTzTCycC4wOUaQVKMylSX+3pthWYsUANs8/os54Pk iFS0QFA0m3/9YTon+AJExhM0jCOlYBdA8zeMY8vO7RwgifcOjCcJs6Aob8lZEmJ+787n qXfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=oHyomVLkzTTccVg2D9uB9aTRJcoVloVoNhHxFXqEP7Q=; fh=iHDCGxPu0NVhL52I/jVvC6a818caffv4VmIpLxoIcVE=; b=0sntxIa4E7WlxYf6KfNqM1YHJ1FZEVqL0totCr6atSeZhQqmyHPFZgTZuWJ8o7Uosw xJTKvbdud4Bvqi7tOItk+9mnjXhMWjwx/zBlBjjbZom4gXvat8rYNhkSrTGeQ+JYnU4L l45DuOu0kAORPPNR6go7+KQg/kvOWedenTfrC8SH9UQ0SH662xFJ/k/3RF2KdReVbsJZ utkGbaCXcmN5n5z5UAEuw4RmF6aGysYvLCm03fI6aoaATNR+rz6a9i0cHdVaqUNDrjG6 as2puNfOxj9Cm1eGWeJfq8TmfMeXpUpgcc11YzCB5sSLoeDyJAmbKTIZx4AeKpxpFojR TzjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="l7/UeI8j"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f15-20020a63de0f000000b005e83b65bc52si6817797pgg.204.2024.03.24.17.07.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="l7/UeI8j"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A2E7283E68 for ; Mon, 25 Mar 2024 00:02:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D95C818E7EA; Sun, 24 Mar 2024 22:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l7/UeI8j" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C254F18E0EE; Sun, 24 Mar 2024 22:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320089; cv=none; b=XAGCEG3SCptoaF9bSql4g25rj0hpDvVOEaR8vQOkSjHpcJp6g+txCQiFUFlrP+EEiqtG/btT9pV/D2U2swsk4a7EhiuGDVyBJE7YwbtUSwR3/Ob+wtQA0XldyPr0RZo090NNmtW9wenTD2ZJUJAjbS6ISirQymYbGZXrk9Hx4N8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320089; c=relaxed/simple; bh=YZPj3TCyeuHzFbALh1S/QKMJWCXWAsaZ839msyp0NqU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tUFCCGHVQscGesuUw7+E42BvJaj7CMWmiXzB+5RCuVh2Xn5oRNdat6cptqYFX+jMY6rirgyw8MWnKFlE/z3uS6EiYX+jk5b8LPayw0uOw/PNCal1TKKK1whRYbAHFteVIrRLSGVsgsCm2h68hvuOwRxdN06TI24/4tP8u55B4pQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l7/UeI8j; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6F08C43390; Sun, 24 Mar 2024 22:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320089; bh=YZPj3TCyeuHzFbALh1S/QKMJWCXWAsaZ839msyp0NqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7/UeI8j2hXphPLcJWI05Z2hpgLkxElBihgWH+cz3beRTvK/UWQCM0h/I9vQJSc0e DaCYlCqIO0xHR7hqeq+tHi00TicrIHiQBaMzISKjs92/yO9lF89Nzvrh2+aXRLXxrL S429iYJXLCFhFHPt86NpaFtTGr3fC3bnAw6AyGK+Tr1zd91Qxr+TMH0pgawGEzDDo9 WA04SuwAe02XnPWmrrE+cfIMTar1diws1y5gE7Sq2/EHZRmzLXiJV2zG6bY+FI5NNC LK4BPzpINeRnOdl47hJf2PcQldQss5+lNgSnY9oOF/F9fgk76aD1/fzyTX6P2N+Qcj amyW1DbTh254g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ezra Buehler , Martin Kurbanov , Miquel Raynal , Sasha Levin Subject: [PATCH 6.8 398/715] mtd: spinand: esmt: Extend IDs to 5 bytes Date: Sun, 24 Mar 2024 18:29:37 -0400 Message-ID: <20240324223455.1342824-399-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ezra Buehler [ Upstream commit 4bd14b2fd8a83a2f5220ba4ef323f741e11bfdfd ] According to the datasheets, the ESMT chips in question will return a 5 byte long identification code where the last 3 bytes are the JEDEC continuation codes (7Fh). Although, I would have expected 4 continuation codes as Powerchip Semiconductor (C8h, corresponding to the parameter page data) is located in bank 5 of the JEDEC database. By matching the full 5 bytes we can avoid clashes with GigaDevice NAND flashes. This fix allows the MT7688-based GARDENA smart Gateway to boot again. Fixes: aa08bf187f32 ("mtd: spinand: esmt: add support for F50D2G41KA") Signed-off-by: Ezra Buehler Reviewed-by: Martin Kurbanov Tested-by: Martin Kurbanov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240125200108.24374-3-ezra@easyb.ch Signed-off-by: Sasha Levin --- drivers/mtd/nand/spi/esmt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/spi/esmt.c b/drivers/mtd/nand/spi/esmt.c index 31c439a557b18..4597a82de23a4 100644 --- a/drivers/mtd/nand/spi/esmt.c +++ b/drivers/mtd/nand/spi/esmt.c @@ -104,7 +104,8 @@ static const struct mtd_ooblayout_ops f50l1g41lb_ooblayout = { static const struct spinand_info esmt_c8_spinand_table[] = { SPINAND_INFO("F50L1G41LB", - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x01), + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x01, 0x7f, + 0x7f, 0x7f), NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), NAND_ECCREQ(1, 512), SPINAND_INFO_OP_VARIANTS(&read_cache_variants, @@ -113,7 +114,8 @@ static const struct spinand_info esmt_c8_spinand_table[] = { 0, SPINAND_ECCINFO(&f50l1g41lb_ooblayout, NULL)), SPINAND_INFO("F50D1G41LB", - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x11), + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x11, 0x7f, + 0x7f, 0x7f), NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), NAND_ECCREQ(1, 512), SPINAND_INFO_OP_VARIANTS(&read_cache_variants, @@ -122,7 +124,8 @@ static const struct spinand_info esmt_c8_spinand_table[] = { 0, SPINAND_ECCINFO(&f50l1g41lb_ooblayout, NULL)), SPINAND_INFO("F50D2G41KA", - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x51), + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x51, 0x7f, + 0x7f, 0x7f), NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), NAND_ECCREQ(8, 512), SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -- 2.43.0