Sergii Dmytruk has uploaded this change for review.

View Change

[RFC][OTP] flashchips,otp: support MX25L6436E "family"

Also includes MX25L6445E, MX25L6465E, MX25L6473E and MX25L6473F.

It's emulated by dummy flasher and will be used in tests.

Change-Id: I7e9dbef8632d8a1ef9322286b5fb1c0b47e8007e
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
---
M flashchips.c
M otp.h
M otp_layouts.c
3 files changed, 23 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/59712/1
diff --git a/flashchips.c b/flashchips.c
index d7d6f31..56ba854 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -9134,7 +9134,7 @@
.page_size = 256,
/* supports SFDP */
/* OTP: 512B total; enter 0xB1, exit 0xC1 */
- .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_SCUR,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -9162,6 +9162,7 @@
.write = spi_chip_write_256,
.read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
+ .otp = &mx512otp,
},

{
diff --git a/otp.h b/otp.h
index 80a1e31..3ad1420 100644
--- a/otp.h
+++ b/otp.h
@@ -68,6 +68,7 @@
} regions[FLASHROM_OTP_MAX_REGIONS + 1]; /* We need one more than maximum */
};

+extern struct otp mx512otp;
extern struct otp en128_2048otp;
extern struct otp en256_512otp;
extern struct otp en512_4096otp;
diff --git a/otp_layouts.c b/otp_layouts.c
index fc22d12..fb42f3c 100644
--- a/otp_layouts.c
+++ b/otp_layouts.c
@@ -23,6 +23,26 @@
#include "spi.h"

/*
+ * Macronix (OTP mode with security register)
+ */
+
+/* MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F */
+struct otp mx512otp = {
+ .feature_bits = OTP_KIND_MODE,
+ .otp_enter_opcode = JEDEC_ENSO,
+ .otp_exit_opcode = JEDEC_EXSO,
+ .regions =
+ {
+ {
+ .addr = 0x000000,
+ .size = 512,
+ .user_lock = {SECREG, 1, OTP},
+ .factory_lock = {SECREG, 0, RO},
+ },
+ },
+};
+
+/*
* Eon (OTP mode)
*
* Because OTP region is mapped at the end of address space, structures differ

To view, visit change 59712. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7e9dbef8632d8a1ef9322286b5fb1c0b47e8007e
Gerrit-Change-Number: 59712
Gerrit-PatchSet: 1
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Gerrit-MessageType: newchange