From 0b44caf8314d9a8345ed05d91aa4e068ec6cc1e5 Mon Sep 17 00:00:00 2001 From: Hans Perera Date: Sun, 21 Apr 2019 01:04:09 -0500 Subject: [PATCH] Adding support for EN25QH128 --- Readme.md | 9 ++++++++- drivers/spi/jz_spi.h | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 2382521..7add3f0 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,11 @@ ## Bootloader for T20 Devices ## Scripts: -Compile_ *** => compiles a Version for a specific Device \ No newline at end of file +Compile_ *** => compiles a Version for a specific Device + +## Build using a ubuntu container +1) Checkout the repo +2) `docker run -it -v d::/uboot ubuntu /bin/bash` +3) `apt-get update && apt-get upgrade && apt-get install -y build-essential make git` +4) `git clone https://github.com/Dafang-Hacks/mips-gcc472-glibc216-64bit.git toolchain` +5) `cd /uboot && ./Compile_*` \ No newline at end of file diff --git a/drivers/spi/jz_spi.h b/drivers/spi/jz_spi.h index 0c18418..c67ff91 100644 --- a/drivers/spi/jz_spi.h +++ b/drivers/spi/jz_spi.h @@ -345,6 +345,27 @@ static struct jz_spi_support jz_spi_support_table[] = { .cmd_read = CMD_QUAD_READ, #ifdef CONFIG_JZ_SFC .sfc_mode = TRAN_SPI_QUAD, +#endif + }, + }, + { + .name = "EN25QH128", + .id_manufactory = 0x1c7018, + .page_size = 256, + .sector_size = (64 * 1024), + .addr_size = 3, + .size = (16 * 1024 * 1024), + .quad_mode = { + .dummy_byte = 8, + .RDSR_CMD = CMD_RDSR_1, + .WRSR_CMD = CMD_WRSR_1, + .RDSR_DATE = 0x2,//the data is write the spi status register for QE bit + .RD_DATE_SIZE = 1, + .WRSR_DATE = 0x2,//this bit should be the flash QUAD mode enable + .WD_DATE_SIZE = 1, + .cmd_read = CMD_QUAD_READ, +#ifdef CONFIG_JZ_SFC + .sfc_mode = TRAN_SPI_QUAD, #endif }, },