blob: 646a496084aa86b90711a85b0e5d1b5e21f76d4e [file] [log] [blame]
Alex Nemirovsky1ecad072020-01-30 12:34:59 -08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2020 Cortina Access Inc.
4 *
Alex Nemirovsky0c97b7f2021-01-14 13:34:13 -08005 * Configuration for Cortina-Access Presidio board
Alex Nemirovsky1ecad072020-01-30 12:34:59 -08006 */
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 Nemirovsky1ecad072020-01-30 12:34:59 -080026#define GICD_BASE 0xf7011000
27#define GICC_BASE 0xf7012000
28
Alex Nemirovsky1ecad072020-01-30 12:34:59 -080029/* Size of malloc() pool */
30#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20))
31
32#define CONFIG_SYS_TIMER_BASE 0xf4321000
33
34/* Use external clock source */
35#define PRESIDIO_APB_CLK 125000000
36#define CORTINA_PER_IO_FREQ PRESIDIO_APB_CLK
37
38/* Cortina Serial Configuration */
39#define CORTINA_UART_CLOCK (PRESIDIO_APB_CLK)
40#define CORTINA_SERIAL_PORTS {(void *)CONFIG_SYS_SERIAL0, \
41 (void *)CONFIG_SYS_SERIAL1}
42
Alex Nemirovsky1ecad072020-01-30 12:34:59 -080043#define CONFIG_SYS_SERIAL0 PER_UART0_CFG
44#define CONFIG_SYS_SERIAL1 PER_UART1_CFG
45
46/* BOOTP options */
47#define CONFIG_BOOTP_BOOTFILESIZE
48
49/* Miscellaneous configurable options */
50#define CONFIG_SYS_LOAD_ADDR (DDR_BASE + 0x10000000)
51#define CONFIG_LAST_STAGE_INIT
52
53/* SDRAM Bank #1 */
54#define DDR_BASE 0x00000000
55#define PHYS_SDRAM_1 DDR_BASE
56#define PHYS_SDRAM_1_SIZE 0x80000000 /* 2GB */
57#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
58
59/* Console I/O Buffer Size */
60#define CONFIG_SYS_CBSIZE 256
61#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
62 sizeof(CONFIG_SYS_PROMPT) + 16)
63#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
64
Alex Nemirovsky0c97b7f2021-01-14 13:34:13 -080065#define KSEG1_ATU_XLAT(x) (x)
66
67/* HW REG ADDR */
68#define NI_READ_POLL_COUNT 1000
69#define CA_NI_MDIO_REG_BASE 0xF4338
70#define NI_HV_GLB_MAC_ADDR_CFG0_OFFSET 0x010
71#define NI_HV_GLB_MAC_ADDR_CFG1_OFFSET 0x014
72#define NI_HV_PT_BASE 0x400
73#define NI_HV_XRAM_BASE 0x820
74#define GLOBAL_BLOCK_RESET_OFFSET 0x04
75#define GLOBAL_GLOBAL_CONFIG_OFFSET 0x20
76#define GLOBAL_IO_DRIVE_CONTROL_OFFSET 0x4c
77
Alex Nemirovsky1ecad072020-01-30 12:34:59 -080078/* max command args */
79#define CONFIG_SYS_MAXARGS 64
80#define CONFIG_EXTRA_ENV_SETTINGS "silent=y\0"
81
Kate Liuf0cb5b82020-12-11 13:46:13 -080082/* nand driver parameters */
83#ifdef CONFIG_TARGET_PRESIDIO_ASIC
84 #define CONFIG_SYS_NAND_ONFI_DETECTION
85 #define CONFIG_SYS_MAX_NAND_DEVICE 1
86 #define CONFIG_SYS_NAND_MAX_CHIPS 1
87 #define CONFIG_SYS_NAND_BASE CONFIG_SYS_FLASH_BASE
88 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
89#endif
90
Alex Nemirovsky1ecad072020-01-30 12:34:59 -080091#endif /* __PRESIDIO_ASIC_H */