Skip to content

Commit

Permalink
Add T31LC
Browse files Browse the repository at this point in the history
  • Loading branch information
dimerrr committed Oct 9, 2023
1 parent 634b81e commit 05f0cca
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion board/ingenic/isvp_t31/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions boards.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ 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"
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

Expand Down
25 changes: 23 additions & 2 deletions drivers/spi/jz_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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
},
},
Expand Down
Binary file added firmware/t31lc_sfcnor.bin
Binary file not shown.
9 changes: 6 additions & 3 deletions include/configs/isvp_t31.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit 05f0cca

Please sign in to comment.