Browse Source

Support GD28LQ128 QSPI flash

Signed-off-by: MichaelZhuxx <michael.zhu@starfivetech.com>
MichaelZhuxx 2 years ago
parent
commit
0b86f96e75
3 changed files with 6 additions and 5 deletions
  1. 1 1
      README.md
  2. 4 4
      build/Makefile
  3. 1 0
      spi/spi_probe.c

+ 1 - 1
README.md

@@ -11,7 +11,7 @@ export PATH=/home/user/compiler/bin:$PATH
 	
 # Build
 
-Enter the build directory, generate the bootloader-BEAGLEV-xxxxxx.bin.out file after make
+Enter the build directory, generate the bootloader-JH7100-xxxxxx.bin.out file after make
 
 # Upgrade 
 

+ 4 - 4
build/Makefile

@@ -8,14 +8,14 @@ LD=${CROSSCOMPILE}ld
 OBJCOPY=${CROSSCOMPILE}objcopy
 OBJDUMP=${CROSSCOMPILE}objdump
 
-# BOARD IS BEAGLEV OR EVBV1
-BOARD=BEAGLEV
+# SoC IS JH7100 FOR VISIONFIVE OR BEAGLEV OR EVBV1 
+SoC=JH7100
 
 SUFFIX=$(shell date +%y%m%d)
 GIT_VERSION=$(shell git show -s --pretty=format:%h)
 BLD_VERSION=$(SUFFIX)-$(GIT_VERSION)
 
-TARGET 	= bootloader-$(BOARD)-$(SUFFIX)
+TARGET 	= bootloader-$(SoC)-$(SUFFIX)
 LINKER_SCRIPT := bootloader.lds
 MAP_FILE := bootloader.map
 
@@ -31,7 +31,7 @@ INCLUDE_DIR=-I. -I../boot\
 RISCV_ARCH := rv64imafdc
 RISCV_ABI  := lp64d 
 
-CFLAGS += -O2 -g -c -Wall -DVERSION=\"$(BLD_VERSION)\" -D$(BOARD)
+CFLAGS += -O2 -g -c -Wall -DVERSION=\"$(BLD_VERSION)\" -D$(SoC)
 CFLAGS += -march=$(RISCV_ARCH)
 CFLAGS += -mabi=$(RISCV_ABI)
 CFLAGS += -mcmodel=medany

+ 1 - 0
spi/spi_probe.c

@@ -156,6 +156,7 @@ static const struct spi_flash_params spi_flash_table[] =
 	 //{"GD25LB64C",	   	0x1760C8,   8,16,16,256, NOR},
 	 {"S25FL512S_512K", 0x200201, 8,16,64,256, NOR},
 	 {"GD25LQ256D", 0x1960C8, 8,16,16,512, NOR},
+	 {"GD25LQ128", 0x1960C8, 8,16,16,256, NOR}
 	//{"GD25LB64B",	   	0xC86017,   8,16,16,256, NOR},
 	//{"NORMAL",			0x000000,	8,16,16,	1,	NOR},