18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Copyright 2018-2020 HabanaLabs, Ltd. 48c2ecf20Sopenharmony_ci * All Rights Reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef GAUDI_H 98c2ecf20Sopenharmony_ci#define GAUDI_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define SRAM_BAR_ID 0 128c2ecf20Sopenharmony_ci#define CFG_BAR_ID 2 138c2ecf20Sopenharmony_ci#define HBM_BAR_ID 4 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define SRAM_BAR_SIZE 0x4000000ull /* 64MB */ 168c2ecf20Sopenharmony_ci#define CFG_BAR_SIZE 0x8000000ull /* 128MB */ 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define CFG_BASE 0x7FFC000000ull 198c2ecf20Sopenharmony_ci#define CFG_SIZE 0x4000000 /* 32MB CFG + 32MB DBG*/ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define SRAM_BASE_ADDR 0x7FF0000000ull 228c2ecf20Sopenharmony_ci#define SRAM_SIZE 0x1400000 /* 20MB */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define SPI_FLASH_BASE_ADDR 0x7FF8000000ull 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define PSOC_SCRATCHPAD_ADDR 0x7FFBFE0000ull 278c2ecf20Sopenharmony_ci#define PSOC_SCRATCHPAD_SIZE 0x10000 /* 64KB */ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define PCIE_FW_SRAM_ADDR 0x7FFBFF0000ull 308c2ecf20Sopenharmony_ci#define PCIE_FW_SRAM_SIZE 0x8000 /* 32KB */ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define DRAM_PHYS_BASE 0x0ull 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define HOST_PHYS_BASE 0x8000000000ull /* 0.5TB */ 358c2ecf20Sopenharmony_ci#define HOST_PHYS_SIZE 0x1000000000000ull /* 0.25PB (48 bits) */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define GAUDI_MSI_ENTRIES 32 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define QMAN_PQ_ENTRY_SIZE 16 /* Bytes */ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#define MAX_ASID 1024 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define PROT_BITS_OFFS 0xF80 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define MME_NUMBER_OF_MASTER_ENGINES 2 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define MME_NUMBER_OF_SLAVE_ENGINES 2 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#define TPC_NUMBER_OF_ENGINES 8 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define DMA_NUMBER_OF_CHANNELS 8 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define NIC_NUMBER_OF_MACROS 5 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define NIC_NUMBER_OF_ENGINES (NIC_NUMBER_OF_MACROS * 2) 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define NUMBER_OF_IF 8 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define DEVICE_CACHE_LINE_SIZE 128 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif /* GAUDI_H */ 62