xref: /rk3399_rockchip-uboot/include/configs/ap325rxa.h (revision 8a7507a8a394f4fccbd7eb730910cf62de6f8d32)
16f0da497SNobuhiro Iwamatsu /*
26f0da497SNobuhiro Iwamatsu  * Configuation settings for the Renesas Solutions AP-325RXA board
36f0da497SNobuhiro Iwamatsu  *
46f0da497SNobuhiro Iwamatsu  * Copyright (C) 2008 Renesas Solutions Corp.
56f0da497SNobuhiro Iwamatsu  * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
66f0da497SNobuhiro Iwamatsu  *
71a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
86f0da497SNobuhiro Iwamatsu  */
96f0da497SNobuhiro Iwamatsu 
106f0da497SNobuhiro Iwamatsu #ifndef __AP325RXA_H
116f0da497SNobuhiro Iwamatsu #define __AP325RXA_H
126f0da497SNobuhiro Iwamatsu 
136f0da497SNobuhiro Iwamatsu #define CONFIG_CPU_SH7723	1
146f0da497SNobuhiro Iwamatsu #define CONFIG_AP325RXA	1
156f0da497SNobuhiro Iwamatsu 
16*18a40e84SVladimir Zapolskiy #define CONFIG_DISPLAY_BOARDINFO
176f0da497SNobuhiro Iwamatsu #undef  CONFIG_SHOW_BOOT_PROGRESS
186f0da497SNobuhiro Iwamatsu 
196f0da497SNobuhiro Iwamatsu /* SMC9118 */
20736fead8SBen Warren #define CONFIG_SMC911X 1
21736fead8SBen Warren #define CONFIG_SMC911X_32_BIT 1
22736fead8SBen Warren #define CONFIG_SMC911X_BASE 0xB6080000
236f0da497SNobuhiro Iwamatsu 
246f0da497SNobuhiro Iwamatsu /* MEMORY */
256f0da497SNobuhiro Iwamatsu #define AP325RXA_SDRAM_BASE		(0x88000000)
266f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BASE_1		(0xA0000000)
276f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BANK_SIZE	(128 * 1024 * 1024)
286f0da497SNobuhiro Iwamatsu 
29db68b703SNobuhiro Iwamatsu #define CONFIG_SYS_TEXT_BASE	0x8FFC0000
30db68b703SNobuhiro Iwamatsu 
316f0da497SNobuhiro Iwamatsu /* undef to save memory	*/
326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP
336f0da497SNobuhiro Iwamatsu /* Monitor Command Prompt */
346f0da497SNobuhiro Iwamatsu /* Buffer size for Console output */
356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE		256
366f0da497SNobuhiro Iwamatsu /* List of legal baudrate settings for this board */
376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE	{ 38400 }
386f0da497SNobuhiro Iwamatsu 
396f0da497SNobuhiro Iwamatsu /* SCIF */
406f0da497SNobuhiro Iwamatsu #define CONFIG_SCIF_A		1 /* SH7723 has SCIF and SCIFA */
416f0da497SNobuhiro Iwamatsu #define CONFIG_CONS_SCIF5	1
426f0da497SNobuhiro Iwamatsu 
436f0da497SNobuhiro Iwamatsu /* Suppress display of console information at boot */
446f0da497SNobuhiro Iwamatsu 
456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	(AP325RXA_SDRAM_BASE)
466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + (60 * 1024 * 1024))
476f0da497SNobuhiro Iwamatsu 
486f0da497SNobuhiro Iwamatsu /* Enable alternate, more extensive, memory test */
496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_ALT_MEMTEST
506f0da497SNobuhiro Iwamatsu /* Scratch address used by the alternate memory test */
516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_MEMTEST_SCRATCH
526f0da497SNobuhiro Iwamatsu 
536f0da497SNobuhiro Iwamatsu /* Enable temporary baudrate change while serial download */
546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_LOADS_BAUD_CHANGE
556f0da497SNobuhiro Iwamatsu 
566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE	(AP325RXA_SDRAM_BASE)
576f0da497SNobuhiro Iwamatsu /* maybe more, but if so u-boot doesn't know about it... */
586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_SIZE	(128 * 1024 * 1024)
596f0da497SNobuhiro Iwamatsu /* default load address for scripts ?!? */
606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR	(CONFIG_SYS_SDRAM_BASE + 16 * 1024 * 1024)
616f0da497SNobuhiro Iwamatsu 
626f0da497SNobuhiro Iwamatsu /* Address of u-boot image in Flash (NOT run time address in SDRAM) ?!? */
636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE	(AP325RXA_FLASH_BASE_1)
646f0da497SNobuhiro Iwamatsu /* Monitor size */
656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN	(128 * 1024)
666f0da497SNobuhiro Iwamatsu /* Size of DRAM reserved for malloc() use */
676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN	(256 * 1024)
686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ	(8 * 1024 * 1024)
696f0da497SNobuhiro Iwamatsu 
706f0da497SNobuhiro Iwamatsu /* FLASH */
716f0da497SNobuhiro Iwamatsu #define CONFIG_FLASH_CFI_DRIVER 1
726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI
736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_FLASH_QUIET_TEST
746f0da497SNobuhiro Iwamatsu /* print 'E' for empty sector on flinfo */
756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO
766f0da497SNobuhiro Iwamatsu /* Physical start address of Flash memory */
776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE	(AP325RXA_FLASH_BASE_1)
786f0da497SNobuhiro Iwamatsu /* Max number of sectors on each Flash chip */
796d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT	512
806f0da497SNobuhiro Iwamatsu 
816f0da497SNobuhiro Iwamatsu /*
826f0da497SNobuhiro Iwamatsu  * IDE support
836f0da497SNobuhiro Iwamatsu  */
846f0da497SNobuhiro Iwamatsu #define CONFIG_IDE_RESET	1
856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PIO_MODE		1
866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXBUS		1	/* IDE bus */
876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXDEVICE	1
886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_BASE_ADDR	0xB4180000
896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_STRIDE		2	/* 1bit shift */
906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_DATA_OFFSET	0x200	/* data reg offset */
916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_REG_OFFSET	0x200	/* reg offset */
926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_ALT_OFFSET	0x210	/* alternate register offset */
93f2a37fcdSAlbert Aribaud #define CONFIG_IDE_SWAP_IO
946f0da497SNobuhiro Iwamatsu 
956f0da497SNobuhiro Iwamatsu /* if you use all NOR Flash , you change dip-switch. Please see Manual. */
966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS	1
976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE + (0 * AP325RXA_FLASH_BANK_SIZE)}
986f0da497SNobuhiro Iwamatsu 
996f0da497SNobuhiro Iwamatsu /* Timeout for Flash erase operations (in ms) */
1006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT	(3 * 1000)
1016f0da497SNobuhiro Iwamatsu /* Timeout for Flash write operations (in ms) */
1026d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT	(3 * 1000)
1036f0da497SNobuhiro Iwamatsu /* Timeout for Flash set sector lock bit operations (in ms) */
1046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_LOCK_TOUT	(3 * 1000)
1056f0da497SNobuhiro Iwamatsu /* Timeout for Flash clear lock bit operations (in ms) */
1066d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_UNLOCK_TOUT	(3 * 1000)
1076f0da497SNobuhiro Iwamatsu 
1086f0da497SNobuhiro Iwamatsu /*
1096f0da497SNobuhiro Iwamatsu  * Use hardware flash sectors protection instead
1106f0da497SNobuhiro Iwamatsu  * of U-Boot software protection
1116f0da497SNobuhiro Iwamatsu  */
1126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_FLASH_PROTECTION
1136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_DIRECT_FLASH_TFTP
1146f0da497SNobuhiro Iwamatsu 
1156f0da497SNobuhiro Iwamatsu /* ENV setting */
1166f0da497SNobuhiro Iwamatsu #define CONFIG_ENV_OVERWRITE	1
1170e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	(128 * 1024)
1180e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
1196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
1206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* Offset of env Flash sector relative to CONFIG_SYS_FLASH_BASE */
1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_OFFSET		(CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
1220e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SECT_SIZE)
1236f0da497SNobuhiro Iwamatsu 
1246f0da497SNobuhiro Iwamatsu /* Board Clock */
1256f0da497SNobuhiro Iwamatsu #define CONFIG_SYS_CLK_FREQ	33333333
126684a501eSNobuhiro Iwamatsu #define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
127684a501eSNobuhiro Iwamatsu #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
128be45c632SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TMU_CLK_DIV		(4)	/* 4 (default), 16, 64, 256 or 1024 */
1296f0da497SNobuhiro Iwamatsu 
1306f0da497SNobuhiro Iwamatsu #endif	/* __AP325RXA_H */
131