162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* Generic definitions for Marvell Dove 88AP510 SoC */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef __ASM_ARCH_DOVE_H 562306a36Sopenharmony_ci#define __ASM_ARCH_DOVE_H 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include "irqs.h" 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/* 1062306a36Sopenharmony_ci * Marvell Dove address maps. 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * phys virt size 1362306a36Sopenharmony_ci * c8000000 fdb00000 1M Cryptographic SRAM 1462306a36Sopenharmony_ci * e0000000 @runtime 128M PCIe-0 Memory space 1562306a36Sopenharmony_ci * e8000000 @runtime 128M PCIe-1 Memory space 1662306a36Sopenharmony_ci * f1000000 fec00000 1M on-chip south-bridge registers 1762306a36Sopenharmony_ci * f1800000 fe400000 8M on-chip north-bridge registers 1862306a36Sopenharmony_ci * f2000000 fee00000 1M PCIe-0 I/O space 1962306a36Sopenharmony_ci * f2100000 fef00000 1M PCIe-1 I/O space 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#define DOVE_CESA_PHYS_BASE 0xc8000000 2362306a36Sopenharmony_ci#define DOVE_CESA_VIRT_BASE IOMEM(0xfdb00000) 2462306a36Sopenharmony_ci#define DOVE_CESA_SIZE SZ_1M 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#define DOVE_PCIE0_MEM_PHYS_BASE 0xe0000000 2762306a36Sopenharmony_ci#define DOVE_PCIE0_MEM_SIZE SZ_128M 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define DOVE_PCIE1_MEM_PHYS_BASE 0xe8000000 3062306a36Sopenharmony_ci#define DOVE_PCIE1_MEM_SIZE SZ_128M 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define DOVE_BOOTROM_PHYS_BASE 0xf8000000 3362306a36Sopenharmony_ci#define DOVE_BOOTROM_SIZE SZ_128M 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define DOVE_SCRATCHPAD_PHYS_BASE 0xf0000000 3662306a36Sopenharmony_ci#define DOVE_SCRATCHPAD_VIRT_BASE IOMEM(0xfdd00000) 3762306a36Sopenharmony_ci#define DOVE_SCRATCHPAD_SIZE SZ_1M 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define DOVE_SB_REGS_PHYS_BASE 0xf1000000 4062306a36Sopenharmony_ci#define DOVE_SB_REGS_VIRT_BASE IOMEM(0xfec00000) 4162306a36Sopenharmony_ci#define DOVE_SB_REGS_SIZE SZ_1M 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define DOVE_NB_REGS_PHYS_BASE 0xf1800000 4462306a36Sopenharmony_ci#define DOVE_NB_REGS_VIRT_BASE IOMEM(0xfe400000) 4562306a36Sopenharmony_ci#define DOVE_NB_REGS_SIZE SZ_8M 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000 4862306a36Sopenharmony_ci#define DOVE_PCIE0_IO_BUS_BASE 0x00000000 4962306a36Sopenharmony_ci#define DOVE_PCIE0_IO_SIZE SZ_64K 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define DOVE_PCIE1_IO_PHYS_BASE 0xf2100000 5262306a36Sopenharmony_ci#define DOVE_PCIE1_IO_BUS_BASE 0x00010000 5362306a36Sopenharmony_ci#define DOVE_PCIE1_IO_SIZE SZ_64K 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci/* 5662306a36Sopenharmony_ci * Dove Core Registers Map 5762306a36Sopenharmony_ci */ 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci/* SPI, I2C, UART */ 6062306a36Sopenharmony_ci#define DOVE_I2C_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x11000) 6162306a36Sopenharmony_ci#define DOVE_UART0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12000) 6262306a36Sopenharmony_ci#define DOVE_UART0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12000) 6362306a36Sopenharmony_ci#define DOVE_UART1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12100) 6462306a36Sopenharmony_ci#define DOVE_UART1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12100) 6562306a36Sopenharmony_ci#define DOVE_UART2_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12200) 6662306a36Sopenharmony_ci#define DOVE_UART2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12200) 6762306a36Sopenharmony_ci#define DOVE_UART3_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12300) 6862306a36Sopenharmony_ci#define DOVE_UART3_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12300) 6962306a36Sopenharmony_ci#define DOVE_SPI0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x10600) 7062306a36Sopenharmony_ci#define DOVE_SPI1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x14600) 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci/* North-South Bridge */ 7362306a36Sopenharmony_ci#define BRIDGE_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x20000) 7462306a36Sopenharmony_ci#define BRIDGE_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x20000) 7562306a36Sopenharmony_ci#define BRIDGE_WINS_BASE (BRIDGE_PHYS_BASE) 7662306a36Sopenharmony_ci#define BRIDGE_WINS_SZ (0x80) 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci/* Cryptographic Engine */ 7962306a36Sopenharmony_ci#define DOVE_CRYPT_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x30000) 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci/* PCIe 0 */ 8262306a36Sopenharmony_ci#define DOVE_PCIE0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x40000) 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci/* USB */ 8562306a36Sopenharmony_ci#define DOVE_USB0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x50000) 8662306a36Sopenharmony_ci#define DOVE_USB1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x51000) 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci/* XOR 0 Engine */ 8962306a36Sopenharmony_ci#define DOVE_XOR0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60800) 9062306a36Sopenharmony_ci#define DOVE_XOR0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60800) 9162306a36Sopenharmony_ci#define DOVE_XOR0_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60A00) 9262306a36Sopenharmony_ci#define DOVE_XOR0_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60A00) 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci/* XOR 1 Engine */ 9562306a36Sopenharmony_ci#define DOVE_XOR1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60900) 9662306a36Sopenharmony_ci#define DOVE_XOR1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60900) 9762306a36Sopenharmony_ci#define DOVE_XOR1_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60B00) 9862306a36Sopenharmony_ci#define DOVE_XOR1_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60B00) 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci/* Gigabit Ethernet */ 10162306a36Sopenharmony_ci#define DOVE_GE00_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x70000) 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci/* PCIe 1 */ 10462306a36Sopenharmony_ci#define DOVE_PCIE1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x80000) 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci/* CAFE */ 10762306a36Sopenharmony_ci#define DOVE_SDIO0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x92000) 10862306a36Sopenharmony_ci#define DOVE_SDIO1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x90000) 10962306a36Sopenharmony_ci#define DOVE_CAM_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x94000) 11062306a36Sopenharmony_ci#define DOVE_CAFE_WIN_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x98000) 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci/* SATA */ 11362306a36Sopenharmony_ci#define DOVE_SATA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xa0000) 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci/* I2S/SPDIF */ 11662306a36Sopenharmony_ci#define DOVE_AUD0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xb0000) 11762306a36Sopenharmony_ci#define DOVE_AUD1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xb4000) 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci/* NAND Flash Controller */ 12062306a36Sopenharmony_ci#define DOVE_NFC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xc0000) 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci/* MPP, GPIO, Reset Sampling */ 12362306a36Sopenharmony_ci#define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0200) 12462306a36Sopenharmony_ci#define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) 12562306a36Sopenharmony_ci#define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE + 0x014) 12662306a36Sopenharmony_ci#define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE + 0x018) 12762306a36Sopenharmony_ci#define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0400) 12862306a36Sopenharmony_ci#define DOVE_GPIO_HI_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0420) 12962306a36Sopenharmony_ci#define DOVE_GPIO2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe8400) 13062306a36Sopenharmony_ci#define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe803c) 13162306a36Sopenharmony_ci#define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1) 13262306a36Sopenharmony_ci#define DOVE_NAND_GPIO_EN (1 << 0) 13362306a36Sopenharmony_ci#define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) 13462306a36Sopenharmony_ci#define DOVE_SPI_GPIO_SEL (1 << 5) 13562306a36Sopenharmony_ci#define DOVE_UART1_GPIO_SEL (1 << 4) 13662306a36Sopenharmony_ci#define DOVE_AU1_GPIO_SEL (1 << 3) 13762306a36Sopenharmony_ci#define DOVE_CAM_GPIO_SEL (1 << 2) 13862306a36Sopenharmony_ci#define DOVE_SD1_GPIO_SEL (1 << 1) 13962306a36Sopenharmony_ci#define DOVE_SD0_GPIO_SEL (1 << 0) 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci/* Power Management */ 14262306a36Sopenharmony_ci#define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0000) 14362306a36Sopenharmony_ci#define DOVE_PMU_SIG_CTRL (DOVE_PMU_VIRT_BASE + 0x802c) 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci/* Real Time Clock */ 14662306a36Sopenharmony_ci#define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xd8500) 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci/* AC97 */ 14962306a36Sopenharmony_ci#define DOVE_AC97_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xe0000) 15062306a36Sopenharmony_ci#define DOVE_AC97_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe0000) 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci/* Peripheral DMA */ 15362306a36Sopenharmony_ci#define DOVE_PDMA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xe4000) 15462306a36Sopenharmony_ci#define DOVE_PDMA_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe4000) 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE + 0xe802C) 15762306a36Sopenharmony_ci#define DOVE_TWSI_ENABLE_OPTION1 (1 << 7) 15862306a36Sopenharmony_ci#define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE + 0xe8030) 15962306a36Sopenharmony_ci#define DOVE_TWSI_ENABLE_OPTION2 (1 << 20) 16062306a36Sopenharmony_ci#define DOVE_TWSI_ENABLE_OPTION3 (1 << 21) 16162306a36Sopenharmony_ci#define DOVE_TWSI_OPTION3_GPIO (1 << 22) 16262306a36Sopenharmony_ci#define DOVE_SSP_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xec000) 16362306a36Sopenharmony_ci#define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE + 0xe8034) 16462306a36Sopenharmony_ci#define DOVE_SSP_ON_AU1 (1 << 0) 16562306a36Sopenharmony_ci#define DOVE_SSP_CLOCK_ENABLE (1 << 1) 16662306a36Sopenharmony_ci#define DOVE_SSP_BPB_CLOCK_SRC_SSP (1 << 11) 16762306a36Sopenharmony_ci/* Memory Controller */ 16862306a36Sopenharmony_ci#define DOVE_MC_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x00000) 16962306a36Sopenharmony_ci#define DOVE_MC_WINS_BASE (DOVE_MC_PHYS_BASE + 0x100) 17062306a36Sopenharmony_ci#define DOVE_MC_WINS_SZ (0x8) 17162306a36Sopenharmony_ci#define DOVE_MC_VIRT_BASE (DOVE_NB_REGS_VIRT_BASE + 0x00000) 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci/* LCD Controller */ 17462306a36Sopenharmony_ci#define DOVE_LCD_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x10000) 17562306a36Sopenharmony_ci#define DOVE_LCD1_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x20000) 17662306a36Sopenharmony_ci#define DOVE_LCD2_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x10000) 17762306a36Sopenharmony_ci#define DOVE_LCD_DCON_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x30000) 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci/* Graphic Engine */ 18062306a36Sopenharmony_ci#define DOVE_GPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x40000) 18162306a36Sopenharmony_ci 18262306a36Sopenharmony_ci/* Video Engine */ 18362306a36Sopenharmony_ci#define DOVE_VPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x400000) 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci#endif 186