From patchwork Thu Jan 25 20:01:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezra Buehler X-Patchwork-Id: 1891006 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=K6Miv3U0; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=easyb-ch.20230601.gappssmtp.com header.i=@easyb-ch.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=M7qchn50; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TLWtb14VBz23fD for ; Fri, 26 Jan 2024 07:01:43 +1100 (AEDT) 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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sUP9/UWuRSbedv0IgjXVNu4xiTemLyvRBgOtimFWIKc=; b=K6Miv3U0cWHN+E rN5feCt/80KS0I62ZklrOtckGzIgKO/5IKY7WzxQ/vyS/BB3wneUboDd0tA9A9TR85nnzronVRMOR mYwQp2DeuUHTNwNhSzXzci06ho53QnGGzU7TugN5tMBII51FXz1CUIXy1D6SA5e3FwEfLhdxzyo01 ChbOwYLYwmE8LyM1Pd5OCm8oNX2lHV2K4COyChEkuA1fY1a8aWcrxdEnC5LhsbX65i616na67JagS MnNPShM94cEXrIG82b0gzMtSX3A+8SvIpl93TG7LSrwcF64fEolwixC46vziRKm8e8sFGiow3skiG 6ymzNMglbX1PbIGivsRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT5uh-00000001h8P-1p1z; Thu, 25 Jan 2024 20:01:27 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT5uc-00000001h3r-0iiN for linux-mtd@lists.infradead.org; Thu, 25 Jan 2024 20:01:24 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a2e633c5365so193723266b.1 for ; Thu, 25 Jan 2024 12:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=easyb-ch.20230601.gappssmtp.com; s=20230601; t=1706212878; x=1706817678; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DQ0g29wlAAYawG7enqb5FROZ6lIs9rjJ1HjxjPIRBr4=; b=M7qchn50YnzUfk4zdgfozASJZirZhB7OmmiDtDyj6BdzohR7JyOLoEyD2mxUn2Fwv/ vaWKfOfoj5+HLbI6EEvc2a7dE9+9yL0L9AeLib2FOBd0zN8Qt0SzebEGVLZgTZ4blY+6 kWZJS92Gj/807NU7lLVdcy3GxoKcl2+JJmRXTFc2rH7NhsBjRpwHR+X8yBt19Iu12o9M DGPhdMZ9eSgiJSEl7ODr5HrLf3kZFHJvMnv/GR21RUCJQYv7G+L5Ka9sigx8oB6UErIy p/0MOczfWz5jPORSYD+h70HrIX88CBYYgxjqteZ5TjrMXAXluzEWsumUtwIzrYTqoWjS hKjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706212878; x=1706817678; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DQ0g29wlAAYawG7enqb5FROZ6lIs9rjJ1HjxjPIRBr4=; b=dD2on4GKvG/JnMUUWSm0TWWW/14kaJpU7EsjK5s/hpxAxffnVWE5EQ3ADNrdtEcYCJ Q+Crek9ccAQ07YTvL3AGIuJjklBj4GVi0bUnR+8g3y9RMqQ+5YFttHIthU+uF4lPkcdP kznllpKHNc0o58jP4D8L5/plDXWBCuDGRxQyWN8ihwVK2tvrlnxpvH7jGKszuXOOhwQX 5N21J/GNVIq2MjfF0asBe97z4gY7QOGcT+Z3ma7/9h63D0ZxjtKItAVdfxr0VRw1qOW7 oW70k9i86Qy+QUNhyjhlZHU793o9bgdLnTYDKJQpwh7mKXv7FxpQPxBM/3nxLV9PN4JS Rtqg== X-Gm-Message-State: AOJu0Yynpd/ws+W/aJlC9j7RCUVuvYBC1f8vZaUMTKB6EaA6Cw6XpFuM cBqnoiCEdT0B1cD/1eq5clweK9RtR64JQHijS/GKYaJBLZ+tchZYYxSz46iFVBwjuQDuE9HUg1L p X-Google-Smtp-Source: AGHT+IHqVYL/lJVL7JEAq3szsDoY8tNhXCz0ekp9lxwVygOHTiAaO1z5D4lST0SmwVn/brdSUyzCLQ== X-Received: by 2002:a17:907:7da5:b0:a31:1d58:262c with SMTP id oz37-20020a1709077da500b00a311d58262cmr170599ejc.5.1706212878670; Thu, 25 Jan 2024 12:01:18 -0800 (PST) Received: from pikachu.. ([105.225.45.176]) by smtp.gmail.com with ESMTPSA id ss17-20020a170907c01100b00a3496fa1f7fsm195577ejc.91.2024.01.25.12.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 12:01:18 -0800 (PST) From: Ezra Buehler To: linux-mtd@lists.infradead.org Cc: Chuanhong Guo , Dmitry Rokosov , Martin Kurbanov , Md Sadre Alam , Miquel Raynal , Richard Weinberger , Sridharan S N , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mtd: spinand: Add support for 5-byte IDs Date: Thu, 25 Jan 2024 22:01:07 +0200 Message-ID: <20240125200108.24374-2-ezra@easyb.ch> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240125200108.24374-1-ezra@easyb.ch> References: <20240125200108.24374-1-ezra@easyb.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_120122_348300_7E85A584 X-CRM114-Status: GOOD ( 13.72 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: From: Ezra Buehler E.g. ESMT chips will return an identification code with a length of 5 bytes. In order to prevent ambiguity, flash chips would actually need to return IDs that are up to 17 or more bytes long due to JE [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:631 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ezra Buehler E.g. ESMT chips will return an identification code with a length of 5 bytes. In order to prevent ambiguity, flash chips would actually need to return IDs that are up to 17 or more bytes long due to JEDEC's continuation scheme. I understand that if a manufacturer ID is located in bank N of JEDEC's database (there are currently 16 banks), N - 1 continuation codes (7Fh) need to be added to the identification code (comprising of manufacturer ID and device ID). However, most flash chip manufacturers don't seem to implement this (correctly). Signed-off-by: Ezra Buehler Reviewed-by: Martin Kurbanov Tested-by: Martin Kurbanov --- include/linux/mtd/spinand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index badb4c1ac079..5c19ead60499 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -169,7 +169,7 @@ struct spinand_op; struct spinand_device; -#define SPINAND_MAX_ID_LEN 4 +#define SPINAND_MAX_ID_LEN 5 /* * For erase, write and read operation, we got the following timings : * tBERS (erase) 1ms to 4ms