From patchwork Sat Feb 27 22:18:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 1445211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=coreboot.org (client-ip=78.46.105.101; helo=coreboot.org; envelope-from=flashrom-bounces@flashrom.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=frqSh2ot; dkim-atps=neutral Received: from coreboot.org (coreboot.org [78.46.105.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dp1nN5Wfdz9sBJ for ; Sun, 28 Feb 2021 09:45:10 +1100 (AEDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id EAD5F14E11AD; Sat, 27 Feb 2021 22:45:02 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 8C95014E0252 for ; Sat, 27 Feb 2021 22:24:48 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Sat, 27 Feb 2021 14:24:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj7ik7RarAMneDtqoR97xGrlNmvmfMf51Oc5ebqboOs=; b=frqSh2otsiHsgt6DCb6XUFaqFb/1DDeo1YNPg2SvNJF6E8Kd/bLbABT1AFnxN3F708 QqZze8dj10aEeXc8AgtGSP0m3x/6Jv0nkQCEPoygkAivH7VnFwHR01KT1zVrZnqrFcI0 ilIE4rFy953NsGHq1b2ws2uTn2RqZruLpLUxD4eHuOdk+iblEZFBf2e4jwTtEZ4Ysk3w ayxdePSpu1isYhF0gU2AHkXGMaS1RIUpg03vzR+wtyNZdQ41uqVU0N7n5ajrrvyZz5Zd h9N4I6KYeUlS/1pyf2Qwel9ZEmRDjKXPNaAiL/8FEmqpVNL8fchXi0vCBQ6C7RdvMik6 GnAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj7ik7RarAMneDtqoR97xGrlNmvmfMf51Oc5ebqboOs=; b=Cv6L3BpbKdOU4sbl5Pnlk2GNwetQ4dkOO1AjthLJBE1nFsrPIXBgltfYhndpbbGdH3 vv66OS6Jg3Hr/HJVwtMqaMd3o5QnuJyPKB4EyBhf5THnmhdg8RFxDxEt7Ykis3ZETQjA i2FyIREQf88cauu3k1aysaWcBUG+aDvK2pMNn9xWO5LEaEp2Hk9/6QPONVjvBMLmGz9Z 7CcqRG11KvwFJFQkwYBthOo8QQ+iky7TtXdrZxL/w4n4sZSAy+87de54OyoTYbV1LNrA MMKfrhQoVTCAlN8iFIYYBMKPe8fEF2XwKpIwtLVBU49coe1yYP9e38pTP1unBfaRUt/G zoTg== X-Gm-Message-State: AOAM532BK9NDqTfvF205m423O8Ldk16HPVRBr3bQjk/1joHfm4AZlt5W aB4K9XYFf4OXB1z3Rfwt4uC707z73wY0Cw== X-Google-Smtp-Source: ABdhPJyXnihsppW98qZ0XutjX2LmurtgpQeKBo8RjMIlUQRhgUWGw/KYMOi23aaxpfV2VBuyxWIFrw== X-Received: by 2002:a63:7d6:: with SMTP id 205mr8063763pgh.256.1614464686620; Sat, 27 Feb 2021 14:24:46 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.gmail.com with ESMTPSA id k16sm6187892pfp.161.2021.02.27.14.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Feb 2021 14:24:45 -0800 (PST) From: Drew Fustini To: flashrom Date: Sat, 27 Feb 2021 14:18:55 -0800 Message-Id: <20210227221854.819337-1-drew@beagleboard.org> MIME-Version: 1.0 X-Spam-Level: * X-MailFrom: drew@beagleboard.org X-Mailman-Rule-Hits: emergency X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved Message-ID-Hash: W4NSVAWPGEDPETYBIZD4MDABTFC3AIY6 X-Message-ID-Hash: W4NSVAWPGEDPETYBIZD4MDABTFC3AIY6 X-Mailman-Approved-At: Sat, 27 Feb 2021 22:44:51 +0000 CC: Drew Fustini X-Mailman-Version: 3.3.4b1 Precedence: list Subject: [flashrom] [PATCH] Add support for GD25LQ256D List-Id: flashrom discussion and development mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=flashrom-bounces@flashrom.org X-Spamd-Bar: -- Add support for GD25LQ256D [1]. I have tested both reading and writing complete ROM to this device using FT2232H (Tigard board) [2] connected to the GD25LQ256D on the BeagleV dev board [3]. [1] https://www.gigadevice.com/flash-memory/gd25lq256d/ [2] https://github.com/tigard-tools/tigard [3] https://beagleboard.org/beaglev Cc: Nico Huber Signed-off-by: Drew Fustini Reviewed-by: Edward O'Callaghan --- Thanks very much to icon (Nico Huber) on #flashrom for the assistance! flashchips.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ flashchips.h | 1 + 2 files changed, 49 insertions(+) diff --git a/flashchips.c b/flashchips.c index 6d94a1252aad..55ccac642ad7 100644 --- a/flashchips.c +++ b/flashchips.c @@ -6669,6 +6669,54 @@ const struct flashchip flashchips[] = { .voltage = {2700, 3600}, }, + { + .vendor = "GigaDevice", + .name = "GD25LQ256D", + .bustype = BUS_SPI, + .manufacture_id = GIGADEVICE_ID, + .model_id = GIGADEVICE_GD25LQ256D, + .total_size = 32768, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = spi_block_erase_21, + }, { + .eraseblocks = { {4 * 1024, 8192} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = spi_block_erase_5c, + }, { + .eraseblocks = { {32 * 1024, 1024} }, + .block_erase = spi_block_erase_52, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = spi_block_erase_dc, + }, { + .eraseblocks = { {64 * 1024, 512} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {32 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_bp3_srwd, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + .voltage = {1650, 2000}, + }, + + { .vendor = "GigaDevice", .name = "GD25Q32(B)", diff --git a/flashchips.h b/flashchips.h index a85fa6a6bf71..2340d92a917f 100644 --- a/flashchips.h +++ b/flashchips.h @@ -398,6 +398,7 @@ #define GIGADEVICE_GD25LQ32 0x6016 #define GIGADEVICE_GD25LQ64 0x6017 /* Same as GD25LQ64B (which is faster) */ #define GIGADEVICE_GD25LQ128CD 0x6018 +#define GIGADEVICE_GD25LQ256D 0x6019 #define GIGADEVICE_GD25WQ80E 0x6514 #define GIGADEVICE_GD29GL064CAB 0x7E0601