1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (C) 2020-2023 Intel Corporation 4 */ 5 6 #ifndef __IVPU_HW_37XX_REG_H__ 7 #define __IVPU_HW_37XX_REG_H__ 8 9 #include <linux/bits.h> 10 11 #define VPU_37XX_BUTTRESS_INTERRUPT_TYPE 0x00000000u 12 13 #define VPU_37XX_BUTTRESS_INTERRUPT_STAT 0x00000004u 14 #define VPU_37XX_BUTTRESS_INTERRUPT_STAT_FREQ_CHANGE_MASK BIT_MASK(0) 15 #define VPU_37XX_BUTTRESS_INTERRUPT_STAT_ATS_ERR_MASK BIT_MASK(1) 16 #define VPU_37XX_BUTTRESS_INTERRUPT_STAT_UFI_ERR_MASK BIT_MASK(2) 17 18 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD0 0x00000008u 19 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD0_MIN_RATIO_MASK GENMASK(15, 0) 20 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD0_MAX_RATIO_MASK GENMASK(31, 16) 21 22 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD1 0x0000000cu 23 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD1_TARGET_RATIO_MASK GENMASK(15, 0) 24 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD1_EPP_MASK GENMASK(31, 16) 25 26 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD2 0x00000010u 27 #define VPU_37XX_BUTTRESS_WP_REQ_PAYLOAD2_CONFIG_MASK GENMASK(15, 0) 28 29 #define VPU_37XX_BUTTRESS_WP_REQ_CMD 0x00000014u 30 #define VPU_37XX_BUTTRESS_WP_REQ_CMD_SEND_MASK BIT_MASK(0) 31 32 #define VPU_37XX_BUTTRESS_WP_DOWNLOAD 0x00000018u 33 #define VPU_37XX_BUTTRESS_WP_DOWNLOAD_TARGET_RATIO_MASK GENMASK(15, 0) 34 35 #define VPU_37XX_BUTTRESS_CURRENT_PLL 0x0000001cu 36 #define VPU_37XX_BUTTRESS_CURRENT_PLL_RATIO_MASK GENMASK(15, 0) 37 38 #define VPU_37XX_BUTTRESS_PLL_ENABLE 0x00000020u 39 40 #define VPU_37XX_BUTTRESS_FMIN_FUSE 0x00000024u 41 #define VPU_37XX_BUTTRESS_FMIN_FUSE_MIN_RATIO_MASK GENMASK(7, 0) 42 #define VPU_37XX_BUTTRESS_FMIN_FUSE_PN_RATIO_MASK GENMASK(15, 8) 43 44 #define VPU_37XX_BUTTRESS_FMAX_FUSE 0x00000028u 45 #define VPU_37XX_BUTTRESS_FMAX_FUSE_MAX_RATIO_MASK GENMASK(7, 0) 46 47 #define VPU_37XX_BUTTRESS_TILE_FUSE 0x0000002cu 48 #define VPU_37XX_BUTTRESS_TILE_FUSE_VALID_MASK BIT_MASK(0) 49 #define VPU_37XX_BUTTRESS_TILE_FUSE_SKU_MASK GENMASK(3, 2) 50 51 #define VPU_37XX_BUTTRESS_LOCAL_INT_MASK 0x00000030u 52 #define VPU_37XX_BUTTRESS_GLOBAL_INT_MASK 0x00000034u 53 54 #define VPU_37XX_BUTTRESS_PLL_STATUS 0x00000040u 55 #define VPU_37XX_BUTTRESS_PLL_STATUS_LOCK_MASK BIT_MASK(1) 56 57 #define VPU_37XX_BUTTRESS_VPU_STATUS 0x00000044u 58 #define VPU_37XX_BUTTRESS_VPU_STATUS_READY_MASK BIT_MASK(0) 59 #define VPU_37XX_BUTTRESS_VPU_STATUS_IDLE_MASK BIT_MASK(1) 60 61 #define VPU_37XX_BUTTRESS_VPU_D0I3_CONTROL 0x00000060u 62 #define VPU_37XX_BUTTRESS_VPU_D0I3_CONTROL_INPROGRESS_MASK BIT_MASK(0) 63 #define VPU_37XX_BUTTRESS_VPU_D0I3_CONTROL_I3_MASK BIT_MASK(2) 64 65 #define VPU_37XX_BUTTRESS_VPU_IP_RESET 0x00000050u 66 #define VPU_37XX_BUTTRESS_VPU_IP_RESET_TRIGGER_MASK BIT_MASK(0) 67 68 #define VPU_37XX_BUTTRESS_VPU_TELEMETRY_OFFSET 0x00000080u 69 #define VPU_37XX_BUTTRESS_VPU_TELEMETRY_SIZE 0x00000084u 70 #define VPU_37XX_BUTTRESS_VPU_TELEMETRY_ENABLE 0x00000088u 71 72 #define VPU_37XX_BUTTRESS_ATS_ERR_LOG_0 0x000000a0u 73 #define VPU_37XX_BUTTRESS_ATS_ERR_LOG_1 0x000000a4u 74 #define VPU_37XX_BUTTRESS_ATS_ERR_CLEAR 0x000000a8u 75 76 #define VPU_37XX_BUTTRESS_UFI_ERR_LOG 0x000000b0u 77 #define VPU_37XX_BUTTRESS_UFI_ERR_LOG_CQ_ID_MASK GENMASK(11, 0) 78 #define VPU_37XX_BUTTRESS_UFI_ERR_LOG_AXI_ID_MASK GENMASK(19, 12) 79 #define VPU_37XX_BUTTRESS_UFI_ERR_LOG_OPCODE_MASK GENMASK(24, 20) 80 81 #define VPU_37XX_BUTTRESS_UFI_ERR_CLEAR 0x000000b4u 82 83 #define VPU_37XX_HOST_SS_CPR_CLK_SET 0x00000084u 84 #define VPU_37XX_HOST_SS_CPR_CLK_SET_TOP_NOC_MASK BIT_MASK(1) 85 #define VPU_37XX_HOST_SS_CPR_CLK_SET_DSS_MAS_MASK BIT_MASK(10) 86 #define VPU_37XX_HOST_SS_CPR_CLK_SET_MSS_MAS_MASK BIT_MASK(11) 87 88 #define VPU_37XX_HOST_SS_CPR_RST_SET 0x00000094u 89 #define VPU_37XX_HOST_SS_CPR_RST_SET_TOP_NOC_MASK BIT_MASK(1) 90 #define VPU_37XX_HOST_SS_CPR_RST_SET_DSS_MAS_MASK BIT_MASK(10) 91 #define VPU_37XX_HOST_SS_CPR_RST_SET_MSS_MAS_MASK BIT_MASK(11) 92 93 #define VPU_37XX_HOST_SS_CPR_RST_CLR 0x00000098u 94 #define VPU_37XX_HOST_SS_CPR_RST_CLR_AON_MASK BIT_MASK(0) 95 #define VPU_37XX_HOST_SS_CPR_RST_CLR_TOP_NOC_MASK BIT_MASK(1) 96 #define VPU_37XX_HOST_SS_CPR_RST_CLR_DSS_MAS_MASK BIT_MASK(10) 97 #define VPU_37XX_HOST_SS_CPR_RST_CLR_MSS_MAS_MASK BIT_MASK(11) 98 99 #define VPU_37XX_HOST_SS_HW_VERSION 0x00000108u 100 #define VPU_37XX_HOST_SS_HW_VERSION_SOC_REVISION_MASK GENMASK(7, 0) 101 #define VPU_37XX_HOST_SS_HW_VERSION_SOC_NUMBER_MASK GENMASK(15, 8) 102 #define VPU_37XX_HOST_SS_HW_VERSION_VPU_GENERATION_MASK GENMASK(23, 16) 103 104 #define VPU_37XX_HOST_SS_GEN_CTRL 0x00000118u 105 #define VPU_37XX_HOST_SS_GEN_CTRL_PS_MASK GENMASK(31, 29) 106 107 #define VPU_37XX_HOST_SS_NOC_QREQN 0x00000154u 108 #define VPU_37XX_HOST_SS_NOC_QREQN_TOP_SOCMMIO_MASK BIT_MASK(0) 109 110 #define VPU_37XX_HOST_SS_NOC_QACCEPTN 0x00000158u 111 #define VPU_37XX_HOST_SS_NOC_QACCEPTN_TOP_SOCMMIO_MASK BIT_MASK(0) 112 113 #define VPU_37XX_HOST_SS_NOC_QDENY 0x0000015cu 114 #define VPU_37XX_HOST_SS_NOC_QDENY_TOP_SOCMMIO_MASK BIT_MASK(0) 115 116 #define VPU_37XX_TOP_NOC_QREQN 0x00000160u 117 #define VPU_37XX_TOP_NOC_QREQN_CPU_CTRL_MASK BIT_MASK(0) 118 #define VPU_37XX_TOP_NOC_QREQN_HOSTIF_L2CACHE_MASK BIT_MASK(1) 119 120 #define VPU_37XX_TOP_NOC_QACCEPTN 0x00000164u 121 #define VPU_37XX_TOP_NOC_QACCEPTN_CPU_CTRL_MASK BIT_MASK(0) 122 #define VPU_37XX_TOP_NOC_QACCEPTN_HOSTIF_L2CACHE_MASK BIT_MASK(1) 123 124 #define VPU_37XX_TOP_NOC_QDENY 0x00000168u 125 #define VPU_37XX_TOP_NOC_QDENY_CPU_CTRL_MASK BIT_MASK(0) 126 #define VPU_37XX_TOP_NOC_QDENY_HOSTIF_L2CACHE_MASK BIT_MASK(1) 127 128 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN 0x00000170u 129 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_CSS_ROM_CMX_MASK BIT_MASK(0) 130 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_CSS_DBG_MASK BIT_MASK(1) 131 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_CSS_CTRL_MASK BIT_MASK(2) 132 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_DEC400_MASK BIT_MASK(3) 133 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_MSS_NCE_MASK BIT_MASK(4) 134 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_MSS_MBI_MASK BIT_MASK(5) 135 #define VPU_37XX_HOST_SS_FW_SOC_IRQ_EN_MSS_MBI_CMX_MASK BIT_MASK(6) 136 137 #define VPU_37XX_HOST_SS_ICB_STATUS_0 0x00010210u 138 #define VPU_37XX_HOST_SS_ICB_STATUS_0_TIMER_0_INT_MASK BIT_MASK(0) 139 #define VPU_37XX_HOST_SS_ICB_STATUS_0_TIMER_1_INT_MASK BIT_MASK(1) 140 #define VPU_37XX_HOST_SS_ICB_STATUS_0_TIMER_2_INT_MASK BIT_MASK(2) 141 #define VPU_37XX_HOST_SS_ICB_STATUS_0_TIMER_3_INT_MASK BIT_MASK(3) 142 #define VPU_37XX_HOST_SS_ICB_STATUS_0_HOST_IPC_FIFO_INT_MASK BIT_MASK(4) 143 #define VPU_37XX_HOST_SS_ICB_STATUS_0_MMU_IRQ_0_INT_MASK BIT_MASK(5) 144 #define VPU_37XX_HOST_SS_ICB_STATUS_0_MMU_IRQ_1_INT_MASK BIT_MASK(6) 145 #define VPU_37XX_HOST_SS_ICB_STATUS_0_MMU_IRQ_2_INT_MASK BIT_MASK(7) 146 #define VPU_37XX_HOST_SS_ICB_STATUS_0_NOC_FIREWALL_INT_MASK BIT_MASK(8) 147 #define VPU_37XX_HOST_SS_ICB_STATUS_0_CPU_INT_REDIRECT_0_INT_MASK BIT_MASK(30) 148 #define VPU_37XX_HOST_SS_ICB_STATUS_0_CPU_INT_REDIRECT_1_INT_MASK BIT_MASK(31) 149 150 #define VPU_37XX_HOST_SS_ICB_STATUS_1 0x00010214u 151 #define VPU_37XX_HOST_SS_ICB_STATUS_1_CPU_INT_REDIRECT_2_INT_MASK BIT_MASK(0) 152 #define VPU_37XX_HOST_SS_ICB_STATUS_1_CPU_INT_REDIRECT_3_INT_MASK BIT_MASK(1) 153 #define VPU_37XX_HOST_SS_ICB_STATUS_1_CPU_INT_REDIRECT_4_INT_MASK BIT_MASK(2) 154 155 #define VPU_37XX_HOST_SS_ICB_CLEAR_0 0x00010220u 156 #define VPU_37XX_HOST_SS_ICB_CLEAR_1 0x00010224u 157 #define VPU_37XX_HOST_SS_ICB_ENABLE_0 0x00010240u 158 159 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_ATM 0x000200f4u 160 161 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_STAT 0x000200fcu 162 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_STAT_READ_POINTER_MASK GENMASK(7, 0) 163 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_STAT_WRITE_POINTER_MASK GENMASK(15, 8) 164 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_STAT_FILL_LEVEL_MASK GENMASK(23, 16) 165 #define VPU_37XX_HOST_SS_TIM_IPC_FIFO_STAT_RSVD0_MASK GENMASK(31, 24) 166 167 #define VPU_37XX_HOST_SS_AON_PWR_ISO_EN0 0x00030020u 168 #define VPU_37XX_HOST_SS_AON_PWR_ISO_EN0_MSS_CPU_MASK BIT_MASK(3) 169 170 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_EN0 0x00030024u 171 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_EN0_MSS_CPU_MASK BIT_MASK(3) 172 173 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_TRICKLE_EN0 0x00030028u 174 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_TRICKLE_EN0_MSS_CPU_MASK BIT_MASK(3) 175 176 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_STATUS0 0x0003002cu 177 #define VPU_37XX_HOST_SS_AON_PWR_ISLAND_STATUS0_MSS_CPU_MASK BIT_MASK(3) 178 179 #define VPU_37XX_HOST_SS_AON_VPU_IDLE_GEN 0x00030200u 180 #define VPU_37XX_HOST_SS_AON_VPU_IDLE_GEN_EN_MASK BIT_MASK(0) 181 182 #define VPU_37XX_HOST_SS_AON_DPU_ACTIVE 0x00030204u 183 #define VPU_37XX_HOST_SS_AON_DPU_ACTIVE_DPU_ACTIVE_MASK BIT_MASK(0) 184 185 #define VPU_37XX_HOST_SS_LOADING_ADDRESS_LO 0x00041040u 186 #define VPU_37XX_HOST_SS_LOADING_ADDRESS_LO_DONE_MASK BIT_MASK(0) 187 #define VPU_37XX_HOST_SS_LOADING_ADDRESS_LO_IOSF_RS_ID_MASK GENMASK(2, 1) 188 #define VPU_37XX_HOST_SS_LOADING_ADDRESS_LO_IMAGE_LOCATION_MASK GENMASK(31, 3) 189 190 #define VPU_37XX_HOST_SS_WORKPOINT_CONFIG_MIRROR 0x00082020u 191 #define VPU_37XX_HOST_SS_WORKPOINT_CONFIG_MIRROR_FINAL_PLL_FREQ_MASK GENMASK(15, 0) 192 #define VPU_37XX_HOST_SS_WORKPOINT_CONFIG_MIRROR_CONFIG_ID_MASK GENMASK(31, 16) 193 194 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES 0x00360000u 195 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_CACHE_OVERRIDE_EN_MASK BIT_MASK(0) 196 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_AWCACHE_OVERRIDE_MASK BIT_MASK(1) 197 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_ARCACHE_OVERRIDE_MASK BIT_MASK(2) 198 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_NOSNOOP_OVERRIDE_EN_MASK BIT_MASK(3) 199 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_AW_NOSNOOP_OVERRIDE_MASK BIT_MASK(4) 200 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_AR_NOSNOOP_OVERRIDE_MASK BIT_MASK(5) 201 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_PTW_AW_CONTEXT_FLAG_MASK GENMASK(10, 6) 202 #define VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES_PTW_AR_CONTEXT_FLAG_MASK GENMASK(15, 11) 203 204 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV 0x00360004u 205 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU0_AWMMUSSIDV_MASK BIT_MASK(0) 206 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU0_ARMMUSSIDV_MASK BIT_MASK(1) 207 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU1_AWMMUSSIDV_MASK BIT_MASK(2) 208 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU1_ARMMUSSIDV_MASK BIT_MASK(3) 209 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU2_AWMMUSSIDV_MASK BIT_MASK(4) 210 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU2_ARMMUSSIDV_MASK BIT_MASK(5) 211 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU3_AWMMUSSIDV_MASK BIT_MASK(6) 212 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU3_ARMMUSSIDV_MASK BIT_MASK(7) 213 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU4_AWMMUSSIDV_MASK BIT_MASK(8) 214 #define VPU_37XX_HOST_IF_TBU_MMUSSIDV_TBU4_ARMMUSSIDV_MASK BIT_MASK(9) 215 216 #define VPU_37XX_CPU_SS_DSU_LEON_RT_BASE 0x04000000u 217 #define VPU_37XX_CPU_SS_DSU_LEON_RT_DSU_CTRL 0x04000000u 218 #define VPU_37XX_CPU_SS_DSU_LEON_RT_PC_REG 0x04400010u 219 #define VPU_37XX_CPU_SS_DSU_LEON_RT_NPC_REG 0x04400014u 220 #define VPU_37XX_CPU_SS_DSU_LEON_RT_DSU_TRAP_REG 0x04400020u 221 222 #define VPU_37XX_CPU_SS_MSSCPU_CPR_CLK_SET 0x06010004u 223 #define VPU_37XX_CPU_SS_MSSCPU_CPR_CLK_SET_CPU_DSU_MASK BIT_MASK(1) 224 225 #define VPU_37XX_CPU_SS_MSSCPU_CPR_RST_CLR 0x06010018u 226 #define VPU_37XX_CPU_SS_MSSCPU_CPR_RST_CLR_CPU_DSU_MASK BIT_MASK(1) 227 228 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC 0x06010040u 229 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC_IRQI_RSTRUN0_MASK BIT_MASK(0) 230 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC_IRQI_RESUME0_MASK BIT_MASK(1) 231 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC_IRQI_RSTRUN1_MASK BIT_MASK(2) 232 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC_IRQI_RESUME1_MASK BIT_MASK(3) 233 #define VPU_37XX_CPU_SS_MSSCPU_CPR_LEON_RT_VEC_IRQI_RSTVEC_MASK GENMASK(31, 4) 234 235 #define VPU_37XX_CPU_SS_TIM_WATCHDOG 0x0602009cu 236 #define VPU_37XX_CPU_SS_TIM_WDOG_EN 0x060200a4u 237 #define VPU_37XX_CPU_SS_TIM_SAFE 0x060200a8u 238 #define VPU_37XX_CPU_SS_TIM_IPC_FIFO 0x060200f0u 239 240 #define VPU_37XX_CPU_SS_TIM_GEN_CONFIG 0x06021008u 241 #define VPU_37XX_CPU_SS_TIM_GEN_CONFIG_WDOG_TO_INT_CLR_MASK BIT_MASK(9) 242 243 #define VPU_37XX_CPU_SS_TIM_PERF_FREE_CNT 0x06029000u 244 245 #define VPU_37XX_CPU_SS_DOORBELL_0 0x06300000u 246 #define VPU_37XX_CPU_SS_DOORBELL_0_SET_MASK BIT_MASK(0) 247 248 #define VPU_37XX_CPU_SS_DOORBELL_1 0x06301000u 249 250 #endif /* __IVPU_HW_37XX_REG_H__ */ 251