18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2015, NVIDIA Corporation. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef TEGRA_VIC_H 78c2ecf20Sopenharmony_ci#define TEGRA_VIC_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci/* VIC methods */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define VIC_SET_APPLICATION_ID 0x00000200 128c2ecf20Sopenharmony_ci#define VIC_SET_FCE_UCODE_SIZE 0x0000071C 138c2ecf20Sopenharmony_ci#define VIC_SET_FCE_UCODE_OFFSET 0x0000072C 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* VIC registers */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define VIC_THI_STREAMID0 0x00000030 188c2ecf20Sopenharmony_ci#define VIC_THI_STREAMID1 0x00000034 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define NV_PVIC_MISC_PRI_VIC_CG 0x000016d0 218c2ecf20Sopenharmony_ci#define CG_IDLE_CG_DLY_CNT(val) ((val & 0x3f) << 0) 228c2ecf20Sopenharmony_ci#define CG_IDLE_CG_EN (1 << 6) 238c2ecf20Sopenharmony_ci#define CG_WAKEUP_DLY_CNT(val) ((val & 0xf) << 16) 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define VIC_TFBIF_TRANSCFG 0x00002044 268c2ecf20Sopenharmony_ci#define TRANSCFG_ATT(i, v) (((v) & 0x3) << (i * 4)) 278c2ecf20Sopenharmony_ci#define TRANSCFG_SID_HW 0 288c2ecf20Sopenharmony_ci#define TRANSCFG_SID_PHY 1 298c2ecf20Sopenharmony_ci#define TRANSCFG_SID_FALCON 2 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* Firmware offsets */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define VIC_UCODE_FCE_HEADER_OFFSET (6*4) 348c2ecf20Sopenharmony_ci#define VIC_UCODE_FCE_DATA_OFFSET (7*4) 358c2ecf20Sopenharmony_ci#define FCE_UCODE_SIZE_OFFSET (2*4) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#endif /* TEGRA_VIC_H */ 38