/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2020 */ /* * This file contains the configuration parameters for MC30SF6-EM target. */ #ifndef __CONFIG_H #define __CONFIG_H #include <../mach-elvees/include/elvees_regs.h> #define ADDR(x) (0xA0000000+x) #define CONFIG_ELVEES_MIPS #define MPORT_SIZE 0x30 #define DDR_PORT0_BASE (ELVEES_BASE+0x1200) #define DDR_PORT1_BASE (ELVEES_BASE+0x1300) #define DDR_PORT_SIZE 0x30 /* * Do not use setups from start.S */ //#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_SYS_MHZ 120 #define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) #define DSP_FRQ 140 /* MHz */ #define MPORT_FRQ 70 /* MHz */ #define DDR_FRQ 70 /* MHz */ #define DDR_TMR 0x00a60222 /* for 120 MHz */ #define ELVEES_SYSTEM ADDR(ELVEES_BASE+0x4000) #define CSR_OFF 8 #define FLUSH_I (0x00000001<<12) #define FLUSH_D (0x00000001<<14) #define CONFIG_TIMESTAMP /* Print image info with timestamp */ #define CONFIG_EXTRA_ENV_SETTINGS \ "addmisc=setenv bootargs ${bootargs} " \ "console=ttyS0,${baudrate} " \ "panic=1\0" \ "" /* TODO "bootfile=/tftpboot/vmlinux\0" \ "load=tftp 80500000 ${u-boot}\0" \ "" */ #define CONFIG_BOOTCOMMAND "bootm;bootp;bootelf" /* * BOOTP options */ #define CONFIG_BOOTP_BOOTFILESIZE /* * Command line configuration. */ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_MIPS_TIMER_FREQ /* ??? TODO */ #define CONFIG_SYS_NS16550_COM1 ADDR(ELVEES_BASE+0x3000) #ifndef CONFIG_CONS_INDEX #define CONFIG_CONS_INDEX 1 /* UART0 */ #endif /* * Miscellaneous configurable options */ #define CONFIG_SYS_MALLOC_LEN (256 << 10) #define CONFIG_SYS_BOOTPARAMS_LEN 128*1024 /* Cached addr */ #define CONFIG_SYS_SDRAM_BASE 0x80000000 /* default load address */ #ifndef CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_LOAD_ADDR 0x85000000 #endif #define CONFIG_SYS_MEMTEST_START 0x80100000 #define CONFIG_SYS_MEMTEST_END 0x80800000 /*----------------------------------------------------------------------- * FLASH and environment organization */ /* The following #defines are needed to get flash environment right */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_INIT_SP_OFFSET 0x400000 /* We boot from this flash, selected with dip switch */ #define CONFIG_SYS_FLASH_BASE 0xbfc00000 #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 128 /* Address and size of Primary Environment Sector */ #define CONFIG_ENV_SIZE 0x8000 #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + (4 << 20) - CONFIG_ENV_SIZE) #define CONFIG_ENV_OVERWRITE 1 #define MEM_SIZE 128 #define CONFIG_SYS_BOOTM_LEN 0x2000000 #endif /* __CONFIG_H */