diff --git a/Makefile b/Makefile index cc0b8b11..5ce36b18 100644 --- a/Makefile +++ b/Makefile @@ -525,6 +525,13 @@ $(obj)u-boot.dis: $(obj)u-boot $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ -I binary -O binary $< $(obj)spl/u-boot-spl-pad.bin +ifdef CONFIG_T31LC +ifdef CONFIG_SPL_SFC_SUPPORT + cp $(TOPDIR)/firmware/t31lc_sfcnor.bin $(obj)spl/u-boot-spl-pad.bin +else + $(error "T31LC unsupported option") +endif +endif cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ rm $(obj)spl/u-boot-spl-pad.bin @@ -925,11 +932,15 @@ tidy: clean clobber: tidy @find $(OBJTREE) -type f \( -name '*.srec' \ - -o -name '*.bin' -o -name u-boot.img \) \ + -o -name u-boot.img \) \ -print0 | xargs -0 rm -f @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) + @rm -f $(obj)spl/u-boot-spl.bin + @rm -f $(obj)u-boot-with-spl.bin + @rm -f $(obj)u-boot.bin + @rm -f $(obj)examples/standalone/hello_world.bin @rm -f $(obj)u-boot.kwb @rm -f $(obj)u-boot.pbl @rm -f $(obj)u-boot.imx diff --git a/board/ingenic/isvp_t31/board.c b/board/ingenic/isvp_t31/board.c index 148b5982..e63eec55 100644 --- a/board/ingenic/isvp_t31/board.c +++ b/board/ingenic/isvp_t31/board.c @@ -46,7 +46,9 @@ struct cgu_clk_src cgu_clk_src[] = { int board_early_init_f(void) { -#ifndef CONFIG_T31A +#if defined(CONFIG_T31A) || defined(CONFIG_T31AL) + /* printf("support quad\n");*/ +#else gpio_direction_input(25); gpio_direction_input(26); gpio_disable_pull_down(25); diff --git a/boards.cfg b/boards.cfg index 70789e25..96ea2187 100644 --- a/boards.cfg +++ b/boards.cfg @@ -597,6 +597,7 @@ isvp_t31a_msc0_ddr128M mips xburst isvp_t31 ingenic isvp_t31al_sfcnand_ddr128M mips xburst isvp_t31 ingenic t31 isvp_t31:SPL_SFC_NAND,JZ_MMC_MSC0,DDR2_128M isvp_t31al_sfcnor_ddr128M mips xburst isvp_t31 ingenic t31 isvp_t31:SPL_SFC_SUPPORT,ENV_IS_IN_SPI_FLASH,SPL_SFC_NOR,JZ_MMC_MSC0,DDR2_128M isvp_t31al_msc0_ddr128M mips xburst isvp_t31 ingenic t31 isvp_t31:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC0,SFC_COMMAND,DDR2_128M +isvp_t31lc_sfcnor mips xburst isvp_t31 ingenic t31 isvp_t31:SPL_SFC_SUPPORT,ENV_IS_IN_SPI_FLASH,SPL_SFC_NOR,JZ_MMC_MSC0,T31LC columba_uImage_rvms_sfcnor mips xburst columba ingenic t10 columba:SPL_SFC_SUPPORT,SFC_NOR bootes_uImage_rvms_msc1 mips xburst bootes ingenic t15 bootes:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC1,SFC_COMMOND bootes_uImage_rvms_sfcnor_16M mips xburst bootes ingenic t15 bootes:SPL_SFC_SUPPORT,ENV_IS_IN_SPI_FLASH,SFC_NOR,SFC_NOR_16M diff --git a/build.sh b/build.sh index 19b0a0d7..91f69182 100755 --- a/build.sh +++ b/build.sh @@ -28,6 +28,7 @@ cfg[t31l]="isvp_t31_sfcnor_lite" cfg[t31x]="isvp_t31_sfcnor_ddr128M" cfg[t31a]="isvp_t31a_sfcnor_ddr128M" cfg[t31al]="isvp_t31al_sfcnor_ddr128M" +cfg[t31lc]="isvp_t31lc_sfcnor" cfg[t21n]="isvp_t21_sfcnor" cfg[t30n]="isvp_t30_sfcnor" cfg[t30l]="isvp_t30_sfcnor_lite" @@ -35,6 +36,7 @@ cfg[t30x]="isvp_t30_sfcnor_ddr128M" cfg[t30a]="isvp_t30a_sfcnor_ddr128M" cfg[t30a1]="isvp_t30a1_sfcnor_ddr128M" + OUTPUTDIR="${HOME}/uboot" mkdir -p ${OUTPUTDIR} 2>&1 > /dev/null diff --git a/drivers/spi/jz_spi.h b/drivers/spi/jz_spi.h index 23c9e9da..75674271 100644 --- a/drivers/spi/jz_spi.h +++ b/drivers/spi/jz_spi.h @@ -205,7 +205,7 @@ static struct jz_spi_support jz_spi_support_table[] = { }, }, { - .name = "MX25L25645G", + .name = "MX25L25645G/35F", .id_manufactory = 0xc22019, .page_size = 256, .sector_size = (32 * 1024), @@ -289,7 +289,7 @@ static struct jz_spi_support jz_spi_support_table[] = { }, }, { - .name = "GD25Q256", + .name = "GD25Q256D/E", .id_manufactory = 0xc84019, .page_size = 256, .sector_size = (64 * 1024), @@ -1084,6 +1084,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 = "PY25Q128HA", + .id_manufactory = 0x852018, + .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 }, }, diff --git a/firmware/t31lc_sfcnor.bin b/firmware/t31lc_sfcnor.bin new file mode 100644 index 00000000..53101169 Binary files /dev/null and b/firmware/t31lc_sfcnor.bin differ diff --git a/include/configs/isvp_t31.h b/include/configs/isvp_t31.h index a2d4ff62..8f48b65a 100644 --- a/include/configs/isvp_t31.h +++ b/include/configs/isvp_t31.h @@ -44,6 +44,9 @@ #elif defined(CONFIG_T31A) #define APLL_1392M #define DDR_750M +#elif defined(CONFIG_T31LC) +#define APLL_1104M +#define DDR_500M #else /* T31N */ #define APLL_1400M @@ -65,9 +68,9 @@ #elif defined APLL_1008M #define CONFIG_SYS_APLL_FREQ 1008000000 /*If APLL not use mast be set 0*/ #define CONFIG_SYS_APLL_MNOD ((84 << 20) | (1 << 14) | (2 << 11) | (1<<8)) -#elif defined APLL_1080M -#define CONFIG_SYS_APLL_FREQ 1080000000 /*If APLL not use mast be set 0*/ -#define CONFIG_SYS_APLL_MNOD ((90 << 20) | (1 << 14) | (2 << 11) | (1<<8)) +#elif defined APLL_1104M +#define CONFIG_SYS_APLL_FREQ 1104000000 /*If APLL not use mast be set 0*/ +#define CONFIG_SYS_APLL_MNOD ((92 << 20) | (1 << 14) | (2 << 11) | (1<<8)) #elif defined APLL_1200M #define CONFIG_SYS_APLL_FREQ 1200000000 /*If APLL not use mast be set 0*/ #define CONFIG_SYS_APLL_MNOD ((100 << 20) | (1 << 14) | (2 << 11) | (1<<8))