Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2020 Cortina Access Inc. |
| 4 | * |
Alex Nemirovsky | 0c97b7f | 2021-01-14 13:34:13 -0800 | [diff] [blame] | 5 | * Configuration for Cortina-Access Presidio board |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __PRESIDIO_ASIC_H |
| 9 | #define __PRESIDIO_ASIC_H |
| 10 | |
| 11 | #define CONFIG_REMAKE_ELF |
| 12 | |
| 13 | #define CONFIG_SUPPORT_RAW_INITRD |
| 14 | |
| 15 | #define CONFIG_SYS_INIT_SP_ADDR 0x00100000 |
| 16 | #define CONFIG_SYS_BOOTM_LEN 0x00c00000 |
| 17 | |
| 18 | /* Generic Timer Definitions */ |
| 19 | #define COUNTER_FREQUENCY 25000000 |
| 20 | #define CONFIG_SYS_TIMER_RATE COUNTER_FREQUENCY |
| 21 | #define CONFIG_SYS_TIMER_COUNTER 0xf4321008 |
| 22 | |
| 23 | /* note: arch/arm/cpu/armv8/start.S which references GICD_BASE/GICC_BASE |
| 24 | * does not yet support DT. Thus define it here. |
| 25 | */ |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 26 | #define GICD_BASE 0xf7011000 |
| 27 | #define GICC_BASE 0xf7012000 |
| 28 | |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 29 | #define CONFIG_SYS_TIMER_BASE 0xf4321000 |
| 30 | |
| 31 | /* Use external clock source */ |
| 32 | #define PRESIDIO_APB_CLK 125000000 |
| 33 | #define CORTINA_PER_IO_FREQ PRESIDIO_APB_CLK |
| 34 | |
| 35 | /* Cortina Serial Configuration */ |
| 36 | #define CORTINA_UART_CLOCK (PRESIDIO_APB_CLK) |
| 37 | #define CORTINA_SERIAL_PORTS {(void *)CONFIG_SYS_SERIAL0, \ |
| 38 | (void *)CONFIG_SYS_SERIAL1} |
| 39 | |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 40 | #define CONFIG_SYS_SERIAL0 PER_UART0_CFG |
| 41 | #define CONFIG_SYS_SERIAL1 PER_UART1_CFG |
| 42 | |
| 43 | /* BOOTP options */ |
| 44 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 45 | |
| 46 | /* Miscellaneous configurable options */ |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 47 | #define CONFIG_LAST_STAGE_INIT |
| 48 | |
| 49 | /* SDRAM Bank #1 */ |
| 50 | #define DDR_BASE 0x00000000 |
| 51 | #define PHYS_SDRAM_1 DDR_BASE |
| 52 | #define PHYS_SDRAM_1_SIZE 0x80000000 /* 2GB */ |
| 53 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 54 | |
| 55 | /* Console I/O Buffer Size */ |
| 56 | #define CONFIG_SYS_CBSIZE 256 |
| 57 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 58 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 59 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 60 | |
Alex Nemirovsky | 0c97b7f | 2021-01-14 13:34:13 -0800 | [diff] [blame] | 61 | #define KSEG1_ATU_XLAT(x) (x) |
| 62 | |
| 63 | /* HW REG ADDR */ |
| 64 | #define NI_READ_POLL_COUNT 1000 |
| 65 | #define CA_NI_MDIO_REG_BASE 0xF4338 |
| 66 | #define NI_HV_GLB_MAC_ADDR_CFG0_OFFSET 0x010 |
| 67 | #define NI_HV_GLB_MAC_ADDR_CFG1_OFFSET 0x014 |
| 68 | #define NI_HV_PT_BASE 0x400 |
| 69 | #define NI_HV_XRAM_BASE 0x820 |
| 70 | #define GLOBAL_BLOCK_RESET_OFFSET 0x04 |
| 71 | #define GLOBAL_GLOBAL_CONFIG_OFFSET 0x20 |
| 72 | #define GLOBAL_IO_DRIVE_CONTROL_OFFSET 0x4c |
| 73 | |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 74 | /* max command args */ |
| 75 | #define CONFIG_SYS_MAXARGS 64 |
| 76 | #define CONFIG_EXTRA_ENV_SETTINGS "silent=y\0" |
| 77 | |
Kate Liu | f0cb5b8 | 2020-12-11 13:46:13 -0800 | [diff] [blame] | 78 | /* nand driver parameters */ |
| 79 | #ifdef CONFIG_TARGET_PRESIDIO_ASIC |
Kate Liu | f0cb5b8 | 2020-12-11 13:46:13 -0800 | [diff] [blame] | 80 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Kate Liu | f0cb5b8 | 2020-12-11 13:46:13 -0800 | [diff] [blame] | 81 | #define CONFIG_SYS_NAND_BASE CONFIG_SYS_FLASH_BASE |
| 82 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } |
| 83 | #endif |
| 84 | |
Alex Nemirovsky | 1ecad07 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 85 | #endif /* __PRESIDIO_ASIC_H */ |