Alex Nemirovsky | 7d706a8 | 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 | c34a927 | 2021-01-14 13:34:13 -0800 | [diff] [blame] | 5 | * Configuration for Cortina-Access Presidio board |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __PRESIDIO_ASIC_H |
| 9 | #define __PRESIDIO_ASIC_H |
| 10 | |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 11 | /* Generic Timer Definitions */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 12 | #define CFG_SYS_TIMER_RATE 25000000 |
| 13 | #define CFG_SYS_TIMER_COUNTER 0xf4321008 |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 14 | |
| 15 | /* note: arch/arm/cpu/armv8/start.S which references GICD_BASE/GICC_BASE |
| 16 | * does not yet support DT. Thus define it here. |
| 17 | */ |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 18 | #define GICD_BASE 0xf7011000 |
| 19 | #define GICC_BASE 0xf7012000 |
| 20 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 21 | #define CFG_SYS_TIMER_BASE 0xf4321000 |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 22 | |
| 23 | /* Use external clock source */ |
| 24 | #define PRESIDIO_APB_CLK 125000000 |
| 25 | #define CORTINA_PER_IO_FREQ PRESIDIO_APB_CLK |
| 26 | |
| 27 | /* Cortina Serial Configuration */ |
| 28 | #define CORTINA_UART_CLOCK (PRESIDIO_APB_CLK) |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 29 | #define CORTINA_SERIAL_PORTS {(void *)CFG_SYS_SERIAL0, \ |
| 30 | (void *)CFG_SYS_SERIAL1} |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 31 | |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 32 | #define CFG_SYS_SERIAL0 PER_UART0_CFG |
| 33 | #define CFG_SYS_SERIAL1 PER_UART1_CFG |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 34 | |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 35 | /* SDRAM Bank #1 */ |
| 36 | #define DDR_BASE 0x00000000 |
| 37 | #define PHYS_SDRAM_1 DDR_BASE |
| 38 | #define PHYS_SDRAM_1_SIZE 0x80000000 /* 2GB */ |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 39 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 40 | |
| 41 | /* Console I/O Buffer Size */ |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 42 | |
Alex Nemirovsky | c34a927 | 2021-01-14 13:34:13 -0800 | [diff] [blame] | 43 | #define KSEG1_ATU_XLAT(x) (x) |
| 44 | |
| 45 | /* HW REG ADDR */ |
| 46 | #define NI_READ_POLL_COUNT 1000 |
| 47 | #define CA_NI_MDIO_REG_BASE 0xF4338 |
| 48 | #define NI_HV_GLB_MAC_ADDR_CFG0_OFFSET 0x010 |
| 49 | #define NI_HV_GLB_MAC_ADDR_CFG1_OFFSET 0x014 |
| 50 | #define NI_HV_PT_BASE 0x400 |
| 51 | #define NI_HV_XRAM_BASE 0x820 |
| 52 | #define GLOBAL_BLOCK_RESET_OFFSET 0x04 |
| 53 | #define GLOBAL_GLOBAL_CONFIG_OFFSET 0x20 |
| 54 | #define GLOBAL_IO_DRIVE_CONTROL_OFFSET 0x4c |
| 55 | |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 56 | /* max command args */ |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 57 | #define CFG_EXTRA_ENV_SETTINGS "silent=y\0" |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 58 | |
Kate Liu | 34a5add | 2020-12-11 13:46:13 -0800 | [diff] [blame] | 59 | /* nand driver parameters */ |
| 60 | #ifdef CONFIG_TARGET_PRESIDIO_ASIC |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 61 | #define CFG_SYS_NAND_BASE CFG_SYS_FLASH_BASE |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 62 | #define CFG_SYS_NAND_BASE_LIST { CFG_SYS_NAND_BASE } |
Kate Liu | 34a5add | 2020-12-11 13:46:13 -0800 | [diff] [blame] | 63 | #endif |
| 64 | |
Alex Nemirovsky | 7d706a8 | 2020-01-30 12:34:59 -0800 | [diff] [blame] | 65 | #endif /* __PRESIDIO_ASIC_H */ |