1*dee8268fSThierry Reding /* 2*dee8268fSThierry Reding * Copyright (C) 2012 Avionic Design GmbH 3*dee8268fSThierry Reding * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. 4*dee8268fSThierry Reding * 5*dee8268fSThierry Reding * This program is free software; you can redistribute it and/or modify 6*dee8268fSThierry Reding * it under the terms of the GNU General Public License version 2 as 7*dee8268fSThierry Reding * published by the Free Software Foundation. 8*dee8268fSThierry Reding */ 9*dee8268fSThierry Reding 10*dee8268fSThierry Reding #ifndef TEGRA_HDMI_H 11*dee8268fSThierry Reding #define TEGRA_HDMI_H 1 12*dee8268fSThierry Reding 13*dee8268fSThierry Reding /* register definitions */ 14*dee8268fSThierry Reding #define HDMI_CTXSW 0x00 15*dee8268fSThierry Reding 16*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_STATE0 0x01 17*dee8268fSThierry Reding #define SOR_STATE_UPDATE (1 << 0) 18*dee8268fSThierry Reding 19*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_STATE1 0x02 20*dee8268fSThierry Reding #define SOR_STATE_ASY_HEAD_OPMODE_AWAKE (2 << 0) 21*dee8268fSThierry Reding #define SOR_STATE_ASY_ORMODE_NORMAL (1 << 2) 22*dee8268fSThierry Reding #define SOR_STATE_ATTACHED (1 << 3) 23*dee8268fSThierry Reding 24*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_STATE2 0x03 25*dee8268fSThierry Reding #define SOR_STATE_ASY_OWNER_NONE (0 << 0) 26*dee8268fSThierry Reding #define SOR_STATE_ASY_OWNER_HEAD0 (1 << 0) 27*dee8268fSThierry Reding #define SOR_STATE_ASY_SUBOWNER_NONE (0 << 4) 28*dee8268fSThierry Reding #define SOR_STATE_ASY_SUBOWNER_SUBHEAD0 (1 << 4) 29*dee8268fSThierry Reding #define SOR_STATE_ASY_SUBOWNER_SUBHEAD1 (2 << 4) 30*dee8268fSThierry Reding #define SOR_STATE_ASY_SUBOWNER_BOTH (3 << 4) 31*dee8268fSThierry Reding #define SOR_STATE_ASY_CRCMODE_ACTIVE (0 << 6) 32*dee8268fSThierry Reding #define SOR_STATE_ASY_CRCMODE_COMPLETE (1 << 6) 33*dee8268fSThierry Reding #define SOR_STATE_ASY_CRCMODE_NON_ACTIVE (2 << 6) 34*dee8268fSThierry Reding #define SOR_STATE_ASY_PROTOCOL_SINGLE_TMDS_A (1 << 8) 35*dee8268fSThierry Reding #define SOR_STATE_ASY_PROTOCOL_CUSTOM (15 << 8) 36*dee8268fSThierry Reding #define SOR_STATE_ASY_HSYNCPOL_POS (0 << 12) 37*dee8268fSThierry Reding #define SOR_STATE_ASY_HSYNCPOL_NEG (1 << 12) 38*dee8268fSThierry Reding #define SOR_STATE_ASY_VSYNCPOL_POS (0 << 13) 39*dee8268fSThierry Reding #define SOR_STATE_ASY_VSYNCPOL_NEG (1 << 13) 40*dee8268fSThierry Reding #define SOR_STATE_ASY_DEPOL_POS (0 << 14) 41*dee8268fSThierry Reding #define SOR_STATE_ASY_DEPOL_NEG (1 << 14) 42*dee8268fSThierry Reding 43*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_AN_MSB 0x04 44*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_AN_LSB 0x05 45*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CN_MSB 0x06 46*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CN_LSB 0x07 47*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_AKSV_MSB 0x08 48*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_AKSV_LSB 0x09 49*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_BKSV_MSB 0x0a 50*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_BKSV_LSB 0x0b 51*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CKSV_MSB 0x0c 52*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CKSV_LSB 0x0d 53*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_DKSV_MSB 0x0e 54*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_DKSV_LSB 0x0f 55*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CTRL 0x10 56*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CMODE 0x11 57*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_MPRIME_MSB 0x12 58*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_MPRIME_LSB 0x13 59*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_SPRIME_MSB 0x14 60*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_SPRIME_LSB2 0x15 61*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_SPRIME_LSB1 0x16 62*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_RI 0x17 63*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CS_MSB 0x18 64*dee8268fSThierry Reding #define HDMI_NV_PDISP_RG_HDCP_CS_LSB 0x19 65*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_EMU0 0x1a 66*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_EMU_RDATA0 0x1b 67*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_EMU1 0x1c 68*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_EMU2 0x1d 69*dee8268fSThierry Reding 70*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL 0x1e 71*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_STATUS 0x1f 72*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER 0x20 73*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW 0x21 74*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH 0x22 75*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_CTRL 0x23 76*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_STATUS 0x24 77*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_HEADER 0x25 78*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK0_LOW 0x26 79*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK0_HIGH 0x27 80*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK1_LOW 0x28 81*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK1_HIGH 0x29 82*dee8268fSThierry Reding 83*dee8268fSThierry Reding #define INFOFRAME_CTRL_ENABLE (1 << 0) 84*dee8268fSThierry Reding 85*dee8268fSThierry Reding #define INFOFRAME_HEADER_TYPE(x) (((x) & 0xff) << 0) 86*dee8268fSThierry Reding #define INFOFRAME_HEADER_VERSION(x) (((x) & 0xff) << 8) 87*dee8268fSThierry Reding #define INFOFRAME_HEADER_LEN(x) (((x) & 0x0f) << 16) 88*dee8268fSThierry Reding 89*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_CTRL 0x2a 90*dee8268fSThierry Reding #define GENERIC_CTRL_ENABLE (1 << 0) 91*dee8268fSThierry Reding #define GENERIC_CTRL_OTHER (1 << 4) 92*dee8268fSThierry Reding #define GENERIC_CTRL_SINGLE (1 << 8) 93*dee8268fSThierry Reding #define GENERIC_CTRL_HBLANK (1 << 12) 94*dee8268fSThierry Reding #define GENERIC_CTRL_AUDIO (1 << 16) 95*dee8268fSThierry Reding 96*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_STATUS 0x2b 97*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_HEADER 0x2c 98*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK0_LOW 0x2d 99*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK0_HIGH 0x2e 100*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK1_LOW 0x2f 101*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK1_HIGH 0x30 102*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK2_LOW 0x31 103*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK2_HIGH 0x32 104*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK3_LOW 0x33 105*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK3_HIGH 0x34 106*dee8268fSThierry Reding 107*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_CTRL 0x35 108*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0320_SUBPACK_LOW 0x36 109*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0320_SUBPACK_HIGH 0x37 110*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0441_SUBPACK_LOW 0x38 111*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0441_SUBPACK_HIGH 0x39 112*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0882_SUBPACK_LOW 0x3a 113*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0882_SUBPACK_HIGH 0x3b 114*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_1764_SUBPACK_LOW 0x3c 115*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_1764_SUBPACK_HIGH 0x3d 116*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0480_SUBPACK_LOW 0x3e 117*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0480_SUBPACK_HIGH 0x3f 118*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0960_SUBPACK_LOW 0x40 119*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_0960_SUBPACK_HIGH 0x41 120*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_1920_SUBPACK_LOW 0x42 121*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_ACR_1920_SUBPACK_HIGH 0x43 122*dee8268fSThierry Reding 123*dee8268fSThierry Reding #define ACR_SUBPACK_CTS(x) (((x) & 0xffffff) << 8) 124*dee8268fSThierry Reding #define ACR_SUBPACK_N(x) (((x) & 0xffffff) << 0) 125*dee8268fSThierry Reding #define ACR_ENABLE (1 << 31) 126*dee8268fSThierry Reding 127*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_CTRL 0x44 128*dee8268fSThierry Reding #define HDMI_CTRL_REKEY(x) (((x) & 0x7f) << 0) 129*dee8268fSThierry Reding #define HDMI_CTRL_MAX_AC_PACKET(x) (((x) & 0x1f) << 16) 130*dee8268fSThierry Reding #define HDMI_CTRL_ENABLE (1 << 30) 131*dee8268fSThierry Reding 132*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_VSYNC_KEEPOUT 0x45 133*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_VSYNC_WINDOW 0x46 134*dee8268fSThierry Reding #define VSYNC_WINDOW_END(x) (((x) & 0x3ff) << 0) 135*dee8268fSThierry Reding #define VSYNC_WINDOW_START(x) (((x) & 0x3ff) << 16) 136*dee8268fSThierry Reding #define VSYNC_WINDOW_ENABLE (1 << 31) 137*dee8268fSThierry Reding 138*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GCP_CTRL 0x47 139*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GCP_STATUS 0x48 140*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_GCP_SUBPACK 0x49 141*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_CHANNEL_STATUS1 0x4a 142*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_CHANNEL_STATUS2 0x4b 143*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_EMU0 0x4c 144*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_EMU1 0x4d 145*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_EMU1_RDATA 0x4e 146*dee8268fSThierry Reding 147*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_SPARE 0x4f 148*dee8268fSThierry Reding #define SPARE_HW_CTS (1 << 0) 149*dee8268fSThierry Reding #define SPARE_FORCE_SW_CTS (1 << 1) 150*dee8268fSThierry Reding #define SPARE_CTS_RESET_VAL(x) (((x) & 0x7) << 16) 151*dee8268fSThierry Reding 152*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_SPDIF_CHN_STATUS1 0x50 153*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_SPDIF_CHN_STATUS2 0x51 154*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDMI_HDCPRIF_ROM_CTRL 0x53 155*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CAP 0x54 156*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_PWR 0x55 157*dee8268fSThierry Reding #define SOR_PWR_NORMAL_STATE_PD (0 << 0) 158*dee8268fSThierry Reding #define SOR_PWR_NORMAL_STATE_PU (1 << 0) 159*dee8268fSThierry Reding #define SOR_PWR_NORMAL_START_NORMAL (0 << 1) 160*dee8268fSThierry Reding #define SOR_PWR_NORMAL_START_ALT (1 << 1) 161*dee8268fSThierry Reding #define SOR_PWR_SAFE_STATE_PD (0 << 16) 162*dee8268fSThierry Reding #define SOR_PWR_SAFE_STATE_PU (1 << 16) 163*dee8268fSThierry Reding #define SOR_PWR_SETTING_NEW_DONE (0 << 31) 164*dee8268fSThierry Reding #define SOR_PWR_SETTING_NEW_PENDING (1 << 31) 165*dee8268fSThierry Reding #define SOR_PWR_SETTING_NEW_TRIGGER (1 << 31) 166*dee8268fSThierry Reding 167*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_TEST 0x56 168*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_PLL0 0x57 169*dee8268fSThierry Reding #define SOR_PLL_PWR (1 << 0) 170*dee8268fSThierry Reding #define SOR_PLL_PDBG (1 << 1) 171*dee8268fSThierry Reding #define SOR_PLL_VCAPD (1 << 2) 172*dee8268fSThierry Reding #define SOR_PLL_PDPORT (1 << 3) 173*dee8268fSThierry Reding #define SOR_PLL_RESISTORSEL (1 << 4) 174*dee8268fSThierry Reding #define SOR_PLL_PULLDOWN (1 << 5) 175*dee8268fSThierry Reding #define SOR_PLL_VCOCAP(x) (((x) & 0xf) << 8) 176*dee8268fSThierry Reding #define SOR_PLL_BG_V17_S(x) (((x) & 0xf) << 12) 177*dee8268fSThierry Reding #define SOR_PLL_FILTER(x) (((x) & 0xf) << 16) 178*dee8268fSThierry Reding #define SOR_PLL_ICHPMP(x) (((x) & 0xf) << 24) 179*dee8268fSThierry Reding #define SOR_PLL_TX_REG_LOAD(x) (((x) & 0xf) << 28) 180*dee8268fSThierry Reding 181*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_PLL1 0x58 182*dee8268fSThierry Reding #define SOR_PLL_TMDS_TERM_ENABLE (1 << 8) 183*dee8268fSThierry Reding #define SOR_PLL_TMDS_TERMADJ(x) (((x) & 0xf) << 9) 184*dee8268fSThierry Reding #define SOR_PLL_LOADADJ(x) (((x) & 0xf) << 20) 185*dee8268fSThierry Reding #define SOR_PLL_PE_EN (1 << 28) 186*dee8268fSThierry Reding #define SOR_PLL_HALF_FULL_PE (1 << 29) 187*dee8268fSThierry Reding #define SOR_PLL_S_D_PIN_PE (1 << 30) 188*dee8268fSThierry Reding 189*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_PLL2 0x59 190*dee8268fSThierry Reding 191*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CSTM 0x5a 192*dee8268fSThierry Reding #define SOR_CSTM_ROTCLK(x) (((x) & 0xf) << 24) 193*dee8268fSThierry Reding 194*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_LVDS 0x5b 195*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CRCA 0x5c 196*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CRCB 0x5d 197*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_BLANK 0x5e 198*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_SEQ_CTL 0x5f 199*dee8268fSThierry Reding #define SOR_SEQ_CTL_PU_PC(x) (((x) & 0xf) << 0) 200*dee8268fSThierry Reding #define SOR_SEQ_PU_PC_ALT(x) (((x) & 0xf) << 4) 201*dee8268fSThierry Reding #define SOR_SEQ_PD_PC(x) (((x) & 0xf) << 8) 202*dee8268fSThierry Reding #define SOR_SEQ_PD_PC_ALT(x) (((x) & 0xf) << 12) 203*dee8268fSThierry Reding #define SOR_SEQ_PC(x) (((x) & 0xf) << 16) 204*dee8268fSThierry Reding #define SOR_SEQ_STATUS (1 << 28) 205*dee8268fSThierry Reding #define SOR_SEQ_SWITCH (1 << 30) 206*dee8268fSThierry Reding 207*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_SEQ_INST(x) (0x60 + (x)) 208*dee8268fSThierry Reding 209*dee8268fSThierry Reding #define SOR_SEQ_INST_WAIT_TIME(x) (((x) & 0x3ff) << 0) 210*dee8268fSThierry Reding #define SOR_SEQ_INST_WAIT_UNITS_VSYNC (2 << 12) 211*dee8268fSThierry Reding #define SOR_SEQ_INST_HALT (1 << 15) 212*dee8268fSThierry Reding #define SOR_SEQ_INST_PIN_A_LOW (0 << 21) 213*dee8268fSThierry Reding #define SOR_SEQ_INST_PIN_A_HIGH (1 << 21) 214*dee8268fSThierry Reding #define SOR_SEQ_INST_PIN_B_LOW (0 << 22) 215*dee8268fSThierry Reding #define SOR_SEQ_INST_PIN_B_HIGH (1 << 22) 216*dee8268fSThierry Reding #define SOR_SEQ_INST_DRIVE_PWM_OUT_LO (1 << 23) 217*dee8268fSThierry Reding 218*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_VCRCA0 0x72 219*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_VCRCA1 0x73 220*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CCRCA0 0x74 221*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_CCRCA1 0x75 222*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_EDATAA0 0x76 223*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_EDATAA1 0x77 224*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_COUNTA0 0x78 225*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_COUNTA1 0x79 226*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_DEBUGA0 0x7a 227*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_DEBUGA1 0x7b 228*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_TRIG 0x7c 229*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_MSCHECK 0x7d 230*dee8268fSThierry Reding 231*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_LANE_DRIVE_CURRENT 0x7e 232*dee8268fSThierry Reding #define DRIVE_CURRENT_LANE0(x) (((x) & 0x3f) << 0) 233*dee8268fSThierry Reding #define DRIVE_CURRENT_LANE1(x) (((x) & 0x3f) << 8) 234*dee8268fSThierry Reding #define DRIVE_CURRENT_LANE2(x) (((x) & 0x3f) << 16) 235*dee8268fSThierry Reding #define DRIVE_CURRENT_LANE3(x) (((x) & 0x3f) << 24) 236*dee8268fSThierry Reding #define DRIVE_CURRENT_FUSE_OVERRIDE (1 << 31) 237*dee8268fSThierry Reding 238*dee8268fSThierry Reding #define DRIVE_CURRENT_1_500_mA 0x00 239*dee8268fSThierry Reding #define DRIVE_CURRENT_1_875_mA 0x01 240*dee8268fSThierry Reding #define DRIVE_CURRENT_2_250_mA 0x02 241*dee8268fSThierry Reding #define DRIVE_CURRENT_2_625_mA 0x03 242*dee8268fSThierry Reding #define DRIVE_CURRENT_3_000_mA 0x04 243*dee8268fSThierry Reding #define DRIVE_CURRENT_3_375_mA 0x05 244*dee8268fSThierry Reding #define DRIVE_CURRENT_3_750_mA 0x06 245*dee8268fSThierry Reding #define DRIVE_CURRENT_4_125_mA 0x07 246*dee8268fSThierry Reding #define DRIVE_CURRENT_4_500_mA 0x08 247*dee8268fSThierry Reding #define DRIVE_CURRENT_4_875_mA 0x09 248*dee8268fSThierry Reding #define DRIVE_CURRENT_5_250_mA 0x0a 249*dee8268fSThierry Reding #define DRIVE_CURRENT_5_625_mA 0x0b 250*dee8268fSThierry Reding #define DRIVE_CURRENT_6_000_mA 0x0c 251*dee8268fSThierry Reding #define DRIVE_CURRENT_6_375_mA 0x0d 252*dee8268fSThierry Reding #define DRIVE_CURRENT_6_750_mA 0x0e 253*dee8268fSThierry Reding #define DRIVE_CURRENT_7_125_mA 0x0f 254*dee8268fSThierry Reding #define DRIVE_CURRENT_7_500_mA 0x10 255*dee8268fSThierry Reding #define DRIVE_CURRENT_7_875_mA 0x11 256*dee8268fSThierry Reding #define DRIVE_CURRENT_8_250_mA 0x12 257*dee8268fSThierry Reding #define DRIVE_CURRENT_8_625_mA 0x13 258*dee8268fSThierry Reding #define DRIVE_CURRENT_9_000_mA 0x14 259*dee8268fSThierry Reding #define DRIVE_CURRENT_9_375_mA 0x15 260*dee8268fSThierry Reding #define DRIVE_CURRENT_9_750_mA 0x16 261*dee8268fSThierry Reding #define DRIVE_CURRENT_10_125_mA 0x17 262*dee8268fSThierry Reding #define DRIVE_CURRENT_10_500_mA 0x18 263*dee8268fSThierry Reding #define DRIVE_CURRENT_10_875_mA 0x19 264*dee8268fSThierry Reding #define DRIVE_CURRENT_11_250_mA 0x1a 265*dee8268fSThierry Reding #define DRIVE_CURRENT_11_625_mA 0x1b 266*dee8268fSThierry Reding #define DRIVE_CURRENT_12_000_mA 0x1c 267*dee8268fSThierry Reding #define DRIVE_CURRENT_12_375_mA 0x1d 268*dee8268fSThierry Reding #define DRIVE_CURRENT_12_750_mA 0x1e 269*dee8268fSThierry Reding #define DRIVE_CURRENT_13_125_mA 0x1f 270*dee8268fSThierry Reding #define DRIVE_CURRENT_13_500_mA 0x20 271*dee8268fSThierry Reding #define DRIVE_CURRENT_13_875_mA 0x21 272*dee8268fSThierry Reding #define DRIVE_CURRENT_14_250_mA 0x22 273*dee8268fSThierry Reding #define DRIVE_CURRENT_14_625_mA 0x23 274*dee8268fSThierry Reding #define DRIVE_CURRENT_15_000_mA 0x24 275*dee8268fSThierry Reding #define DRIVE_CURRENT_15_375_mA 0x25 276*dee8268fSThierry Reding #define DRIVE_CURRENT_15_750_mA 0x26 277*dee8268fSThierry Reding #define DRIVE_CURRENT_16_125_mA 0x27 278*dee8268fSThierry Reding #define DRIVE_CURRENT_16_500_mA 0x28 279*dee8268fSThierry Reding #define DRIVE_CURRENT_16_875_mA 0x29 280*dee8268fSThierry Reding #define DRIVE_CURRENT_17_250_mA 0x2a 281*dee8268fSThierry Reding #define DRIVE_CURRENT_17_625_mA 0x2b 282*dee8268fSThierry Reding #define DRIVE_CURRENT_18_000_mA 0x2c 283*dee8268fSThierry Reding #define DRIVE_CURRENT_18_375_mA 0x2d 284*dee8268fSThierry Reding #define DRIVE_CURRENT_18_750_mA 0x2e 285*dee8268fSThierry Reding #define DRIVE_CURRENT_19_125_mA 0x2f 286*dee8268fSThierry Reding #define DRIVE_CURRENT_19_500_mA 0x30 287*dee8268fSThierry Reding #define DRIVE_CURRENT_19_875_mA 0x31 288*dee8268fSThierry Reding #define DRIVE_CURRENT_20_250_mA 0x32 289*dee8268fSThierry Reding #define DRIVE_CURRENT_20_625_mA 0x33 290*dee8268fSThierry Reding #define DRIVE_CURRENT_21_000_mA 0x34 291*dee8268fSThierry Reding #define DRIVE_CURRENT_21_375_mA 0x35 292*dee8268fSThierry Reding #define DRIVE_CURRENT_21_750_mA 0x36 293*dee8268fSThierry Reding #define DRIVE_CURRENT_22_125_mA 0x37 294*dee8268fSThierry Reding #define DRIVE_CURRENT_22_500_mA 0x38 295*dee8268fSThierry Reding #define DRIVE_CURRENT_22_875_mA 0x39 296*dee8268fSThierry Reding #define DRIVE_CURRENT_23_250_mA 0x3a 297*dee8268fSThierry Reding #define DRIVE_CURRENT_23_625_mA 0x3b 298*dee8268fSThierry Reding #define DRIVE_CURRENT_24_000_mA 0x3c 299*dee8268fSThierry Reding #define DRIVE_CURRENT_24_375_mA 0x3d 300*dee8268fSThierry Reding #define DRIVE_CURRENT_24_750_mA 0x3e 301*dee8268fSThierry Reding 302*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_DEBUG0 0x7f 303*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_DEBUG1 0x80 304*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_DEBUG2 0x81 305*dee8268fSThierry Reding 306*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_FS(x) (0x82 + (x)) 307*dee8268fSThierry Reding #define AUDIO_FS_LOW(x) (((x) & 0xfff) << 0) 308*dee8268fSThierry Reding #define AUDIO_FS_HIGH(x) (((x) & 0xfff) << 16) 309*dee8268fSThierry Reding 310*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_PULSE_WIDTH 0x89 311*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_THRESHOLD 0x8a 312*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_CNTRL0 0x8b 313*dee8268fSThierry Reding #define AUDIO_CNTRL0_ERROR_TOLERANCE(x) (((x) & 0xff) << 0) 314*dee8268fSThierry Reding #define AUDIO_CNTRL0_SOURCE_SELECT_AUTO (0 << 20) 315*dee8268fSThierry Reding #define AUDIO_CNTRL0_SOURCE_SELECT_SPDIF (1 << 20) 316*dee8268fSThierry Reding #define AUDIO_CNTRL0_SOURCE_SELECT_HDAL (2 << 20) 317*dee8268fSThierry Reding #define AUDIO_CNTRL0_FRAMES_PER_BLOCK(x) (((x) & 0xff) << 24) 318*dee8268fSThierry Reding 319*dee8268fSThierry Reding #define HDMI_NV_PDISP_AUDIO_N 0x8c 320*dee8268fSThierry Reding #define AUDIO_N_VALUE(x) (((x) & 0xfffff) << 0) 321*dee8268fSThierry Reding #define AUDIO_N_RESETF (1 << 20) 322*dee8268fSThierry Reding #define AUDIO_N_GENERATE_NORMAL (0 << 24) 323*dee8268fSThierry Reding #define AUDIO_N_GENERATE_ALTERNATE (1 << 24) 324*dee8268fSThierry Reding 325*dee8268fSThierry Reding #define HDMI_NV_PDISP_HDCPRIF_ROM_TIMING 0x94 326*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_REFCLK 0x95 327*dee8268fSThierry Reding #define SOR_REFCLK_DIV_INT(x) (((x) & 0xff) << 8) 328*dee8268fSThierry Reding #define SOR_REFCLK_DIV_FRAC(x) (((x) & 0x03) << 6) 329*dee8268fSThierry Reding 330*dee8268fSThierry Reding #define HDMI_NV_PDISP_CRC_CONTROL 0x96 331*dee8268fSThierry Reding #define HDMI_NV_PDISP_INPUT_CONTROL 0x97 332*dee8268fSThierry Reding #define HDMI_SRC_DISPLAYA (0 << 0) 333*dee8268fSThierry Reding #define HDMI_SRC_DISPLAYB (1 << 0) 334*dee8268fSThierry Reding #define ARM_VIDEO_RANGE_FULL (0 << 1) 335*dee8268fSThierry Reding #define ARM_VIDEO_RANGE_LIMITED (1 << 1) 336*dee8268fSThierry Reding 337*dee8268fSThierry Reding #define HDMI_NV_PDISP_SCRATCH 0x98 338*dee8268fSThierry Reding #define HDMI_NV_PDISP_PE_CURRENT 0x99 339*dee8268fSThierry Reding #define PE_CURRENT0(x) (((x) & 0xf) << 0) 340*dee8268fSThierry Reding #define PE_CURRENT1(x) (((x) & 0xf) << 8) 341*dee8268fSThierry Reding #define PE_CURRENT2(x) (((x) & 0xf) << 16) 342*dee8268fSThierry Reding #define PE_CURRENT3(x) (((x) & 0xf) << 24) 343*dee8268fSThierry Reding 344*dee8268fSThierry Reding #define PE_CURRENT_0_0_mA 0x0 345*dee8268fSThierry Reding #define PE_CURRENT_0_5_mA 0x1 346*dee8268fSThierry Reding #define PE_CURRENT_1_0_mA 0x2 347*dee8268fSThierry Reding #define PE_CURRENT_1_5_mA 0x3 348*dee8268fSThierry Reding #define PE_CURRENT_2_0_mA 0x4 349*dee8268fSThierry Reding #define PE_CURRENT_2_5_mA 0x5 350*dee8268fSThierry Reding #define PE_CURRENT_3_0_mA 0x6 351*dee8268fSThierry Reding #define PE_CURRENT_3_5_mA 0x7 352*dee8268fSThierry Reding #define PE_CURRENT_4_0_mA 0x8 353*dee8268fSThierry Reding #define PE_CURRENT_4_5_mA 0x9 354*dee8268fSThierry Reding #define PE_CURRENT_5_0_mA 0xa 355*dee8268fSThierry Reding #define PE_CURRENT_5_5_mA 0xb 356*dee8268fSThierry Reding #define PE_CURRENT_6_0_mA 0xc 357*dee8268fSThierry Reding #define PE_CURRENT_6_5_mA 0xd 358*dee8268fSThierry Reding #define PE_CURRENT_7_0_mA 0xe 359*dee8268fSThierry Reding #define PE_CURRENT_7_5_mA 0xf 360*dee8268fSThierry Reding 361*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_CTRL 0x9a 362*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_DEBUG0 0x9b 363*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_DEBUG1 0x9c 364*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_DEBUG2 0x9d 365*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_HDCP_KEY_0 0x9e 366*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_HDCP_KEY_1 0x9f 367*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_HDCP_KEY_2 0xa0 368*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_HDCP_KEY_3 0xa1 369*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_HDCP_KEY_TRIG 0xa2 370*dee8268fSThierry Reding #define HDMI_NV_PDISP_KEY_SKEY_INDEX 0xa3 371*dee8268fSThierry Reding 372*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_CNTRL0 0xac 373*dee8268fSThierry Reding #define AUDIO_CNTRL0_INJECT_NULLSMPL (1 << 29) 374*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_HDA_ELD_BUFWR 0xbc 375*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_HDA_PRESENSE 0xbd 376*dee8268fSThierry Reding 377*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0320 0xbf 378*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0441 0xc0 379*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0882 0xc1 380*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_1764 0xc2 381*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0480 0xc3 382*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0960 0xc4 383*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_1920 0xc5 384*dee8268fSThierry Reding #define HDMI_NV_PDISP_SOR_AUDIO_AVAL_DEFAULT 0xc5 385*dee8268fSThierry Reding 386*dee8268fSThierry Reding #endif /* TEGRA_HDMI_H */ 387