162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2012 Avionic Design GmbH
462306a36Sopenharmony_ci * Copyright (C) 2012 NVIDIA CORPORATION.  All rights reserved.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef TEGRA_HDMI_H
862306a36Sopenharmony_ci#define TEGRA_HDMI_H 1
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/* register definitions */
1162306a36Sopenharmony_ci#define HDMI_CTXSW						0x00
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_STATE0				0x01
1462306a36Sopenharmony_ci#define SOR_STATE_UPDATE (1 << 0)
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_STATE1				0x02
1762306a36Sopenharmony_ci#define SOR_STATE_ASY_HEAD_OPMODE_AWAKE (2 << 0)
1862306a36Sopenharmony_ci#define SOR_STATE_ASY_ORMODE_NORMAL     (1 << 2)
1962306a36Sopenharmony_ci#define SOR_STATE_ATTACHED              (1 << 3)
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_STATE2				0x03
2262306a36Sopenharmony_ci#define SOR_STATE_ASY_OWNER_NONE         (0 <<  0)
2362306a36Sopenharmony_ci#define SOR_STATE_ASY_OWNER_HEAD0        (1 <<  0)
2462306a36Sopenharmony_ci#define SOR_STATE_ASY_SUBOWNER_NONE      (0 <<  4)
2562306a36Sopenharmony_ci#define SOR_STATE_ASY_SUBOWNER_SUBHEAD0  (1 <<  4)
2662306a36Sopenharmony_ci#define SOR_STATE_ASY_SUBOWNER_SUBHEAD1  (2 <<  4)
2762306a36Sopenharmony_ci#define SOR_STATE_ASY_SUBOWNER_BOTH      (3 <<  4)
2862306a36Sopenharmony_ci#define SOR_STATE_ASY_CRCMODE_ACTIVE     (0 <<  6)
2962306a36Sopenharmony_ci#define SOR_STATE_ASY_CRCMODE_COMPLETE   (1 <<  6)
3062306a36Sopenharmony_ci#define SOR_STATE_ASY_CRCMODE_NON_ACTIVE (2 <<  6)
3162306a36Sopenharmony_ci#define SOR_STATE_ASY_PROTOCOL_SINGLE_TMDS_A (1 << 8)
3262306a36Sopenharmony_ci#define SOR_STATE_ASY_PROTOCOL_CUSTOM        (15 << 8)
3362306a36Sopenharmony_ci#define SOR_STATE_ASY_HSYNCPOL_POS       (0 << 12)
3462306a36Sopenharmony_ci#define SOR_STATE_ASY_HSYNCPOL_NEG       (1 << 12)
3562306a36Sopenharmony_ci#define SOR_STATE_ASY_VSYNCPOL_POS       (0 << 13)
3662306a36Sopenharmony_ci#define SOR_STATE_ASY_VSYNCPOL_NEG       (1 << 13)
3762306a36Sopenharmony_ci#define SOR_STATE_ASY_DEPOL_POS          (0 << 14)
3862306a36Sopenharmony_ci#define SOR_STATE_ASY_DEPOL_NEG          (1 << 14)
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_AN_MSB				0x04
4162306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_AN_LSB				0x05
4262306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CN_MSB				0x06
4362306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CN_LSB				0x07
4462306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_AKSV_MSB				0x08
4562306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_AKSV_LSB				0x09
4662306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_BKSV_MSB				0x0a
4762306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_BKSV_LSB				0x0b
4862306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CKSV_MSB				0x0c
4962306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CKSV_LSB				0x0d
5062306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_DKSV_MSB				0x0e
5162306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_DKSV_LSB				0x0f
5262306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CTRL				0x10
5362306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CMODE				0x11
5462306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_MPRIME_MSB			0x12
5562306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_MPRIME_LSB			0x13
5662306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_SPRIME_MSB			0x14
5762306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_SPRIME_LSB2			0x15
5862306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_SPRIME_LSB1			0x16
5962306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_RI				0x17
6062306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CS_MSB				0x18
6162306a36Sopenharmony_ci#define HDMI_NV_PDISP_RG_HDCP_CS_LSB				0x19
6262306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_EMU0				0x1a
6362306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_EMU_RDATA0			0x1b
6462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_EMU1				0x1c
6562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_EMU2				0x1d
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL			0x1e
6862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_STATUS		0x1f
6962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER		0x20
7062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW		0x21
7162306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH	0x22
7262306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_CTRL			0x23
7362306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_STATUS			0x24
7462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_HEADER			0x25
7562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK0_LOW		0x26
7662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK0_HIGH		0x27
7762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK1_LOW		0x28
7862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_AVI_INFOFRAME_SUBPACK1_HIGH		0x29
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci#define INFOFRAME_CTRL_ENABLE (1 << 0)
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci#define INFOFRAME_HEADER_TYPE(x)    (((x) & 0xff) <<  0)
8362306a36Sopenharmony_ci#define INFOFRAME_HEADER_VERSION(x) (((x) & 0xff) <<  8)
8462306a36Sopenharmony_ci#define INFOFRAME_HEADER_LEN(x)     (((x) & 0x0f) << 16)
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_CTRL				0x2a
8762306a36Sopenharmony_ci#define GENERIC_CTRL_ENABLE (1 <<  0)
8862306a36Sopenharmony_ci#define GENERIC_CTRL_OTHER  (1 <<  4)
8962306a36Sopenharmony_ci#define GENERIC_CTRL_SINGLE (1 <<  8)
9062306a36Sopenharmony_ci#define GENERIC_CTRL_HBLANK (1 << 12)
9162306a36Sopenharmony_ci#define GENERIC_CTRL_AUDIO  (1 << 16)
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_STATUS			0x2b
9462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_HEADER			0x2c
9562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK0_LOW			0x2d
9662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK0_HIGH		0x2e
9762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK1_LOW			0x2f
9862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK1_HIGH		0x30
9962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK2_LOW			0x31
10062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK2_HIGH		0x32
10162306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK3_LOW			0x33
10262306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GENERIC_SUBPACK3_HIGH		0x34
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_CTRL				0x35
10562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0320_SUBPACK_LOW			0x36
10662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0320_SUBPACK_HIGH		0x37
10762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0441_SUBPACK_LOW			0x38
10862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0441_SUBPACK_HIGH		0x39
10962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0882_SUBPACK_LOW			0x3a
11062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0882_SUBPACK_HIGH		0x3b
11162306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_1764_SUBPACK_LOW			0x3c
11262306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_1764_SUBPACK_HIGH		0x3d
11362306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0480_SUBPACK_LOW			0x3e
11462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0480_SUBPACK_HIGH		0x3f
11562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0960_SUBPACK_LOW			0x40
11662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_0960_SUBPACK_HIGH		0x41
11762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_1920_SUBPACK_LOW			0x42
11862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_ACR_1920_SUBPACK_HIGH		0x43
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci#define ACR_SUBPACK_CTS(x) (((x) & 0xffffff) << 8)
12162306a36Sopenharmony_ci#define ACR_SUBPACK_N(x)   (((x) & 0xffffff) << 0)
12262306a36Sopenharmony_ci#define ACR_ENABLE         (1 << 31)
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_CTRL					0x44
12562306a36Sopenharmony_ci#define HDMI_CTRL_REKEY(x)         (((x) & 0x7f) <<  0)
12662306a36Sopenharmony_ci#define HDMI_CTRL_MAX_AC_PACKET(x) (((x) & 0x1f) << 16)
12762306a36Sopenharmony_ci#define HDMI_CTRL_ENABLE           (1 << 30)
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_VSYNC_KEEPOUT			0x45
13062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_VSYNC_WINDOW				0x46
13162306a36Sopenharmony_ci#define VSYNC_WINDOW_END(x)   (((x) & 0x3ff) <<  0)
13262306a36Sopenharmony_ci#define VSYNC_WINDOW_START(x) (((x) & 0x3ff) << 16)
13362306a36Sopenharmony_ci#define VSYNC_WINDOW_ENABLE   (1 << 31)
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GCP_CTRL				0x47
13662306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GCP_STATUS				0x48
13762306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_GCP_SUBPACK				0x49
13862306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_CHANNEL_STATUS1			0x4a
13962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_CHANNEL_STATUS2			0x4b
14062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_EMU0					0x4c
14162306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_EMU1					0x4d
14262306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_EMU1_RDATA				0x4e
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_SPARE				0x4f
14562306a36Sopenharmony_ci#define SPARE_HW_CTS           (1 << 0)
14662306a36Sopenharmony_ci#define SPARE_FORCE_SW_CTS     (1 << 1)
14762306a36Sopenharmony_ci#define SPARE_CTS_RESET_VAL(x) (((x) & 0x7) << 16)
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_SPDIF_CHN_STATUS1			0x50
15062306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_SPDIF_CHN_STATUS2			0x51
15162306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDMI_HDCPRIF_ROM_CTRL			0x53
15262306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CAP					0x54
15362306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_PWR					0x55
15462306a36Sopenharmony_ci#define SOR_PWR_NORMAL_STATE_PD     (0 <<  0)
15562306a36Sopenharmony_ci#define SOR_PWR_NORMAL_STATE_PU     (1 <<  0)
15662306a36Sopenharmony_ci#define SOR_PWR_NORMAL_START_NORMAL (0 <<  1)
15762306a36Sopenharmony_ci#define SOR_PWR_NORMAL_START_ALT    (1 <<  1)
15862306a36Sopenharmony_ci#define SOR_PWR_SAFE_STATE_PD       (0 << 16)
15962306a36Sopenharmony_ci#define SOR_PWR_SAFE_STATE_PU       (1 << 16)
16062306a36Sopenharmony_ci#define SOR_PWR_SETTING_NEW_DONE    (0 << 31)
16162306a36Sopenharmony_ci#define SOR_PWR_SETTING_NEW_PENDING (1 << 31)
16262306a36Sopenharmony_ci#define SOR_PWR_SETTING_NEW_TRIGGER (1 << 31)
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_TEST					0x56
16562306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_PLL0					0x57
16662306a36Sopenharmony_ci#define SOR_PLL_PWR            (1 << 0)
16762306a36Sopenharmony_ci#define SOR_PLL_PDBG           (1 << 1)
16862306a36Sopenharmony_ci#define SOR_PLL_VCAPD          (1 << 2)
16962306a36Sopenharmony_ci#define SOR_PLL_PDPORT         (1 << 3)
17062306a36Sopenharmony_ci#define SOR_PLL_RESISTORSEL    (1 << 4)
17162306a36Sopenharmony_ci#define SOR_PLL_PULLDOWN       (1 << 5)
17262306a36Sopenharmony_ci#define SOR_PLL_VCOCAP(x)      (((x) & 0xf) <<  8)
17362306a36Sopenharmony_ci#define SOR_PLL_BG_V17_S(x)    (((x) & 0xf) << 12)
17462306a36Sopenharmony_ci#define SOR_PLL_FILTER(x)      (((x) & 0xf) << 16)
17562306a36Sopenharmony_ci#define SOR_PLL_ICHPMP(x)      (((x) & 0xf) << 24)
17662306a36Sopenharmony_ci#define SOR_PLL_TX_REG_LOAD(x) (((x) & 0xf) << 28)
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_PLL1					0x58
17962306a36Sopenharmony_ci#define SOR_PLL_TMDS_TERM_ENABLE (1 << 8)
18062306a36Sopenharmony_ci#define SOR_PLL_TMDS_TERMADJ(x)  (((x) & 0xf) <<  9)
18162306a36Sopenharmony_ci#define SOR_PLL_LOADADJ(x)       (((x) & 0xf) << 20)
18262306a36Sopenharmony_ci#define SOR_PLL_PE_EN            (1 << 28)
18362306a36Sopenharmony_ci#define SOR_PLL_HALF_FULL_PE     (1 << 29)
18462306a36Sopenharmony_ci#define SOR_PLL_S_D_PIN_PE       (1 << 30)
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_PLL2					0x59
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CSTM					0x5a
18962306a36Sopenharmony_ci#define SOR_CSTM_ROTCLK(x) (((x) & 0xf) << 24)
19062306a36Sopenharmony_ci#define SOR_CSTM_PLLDIV (1 << 21)
19162306a36Sopenharmony_ci#define SOR_CSTM_LVDS_ENABLE (1 << 16)
19262306a36Sopenharmony_ci#define SOR_CSTM_MODE_LVDS (0 << 12)
19362306a36Sopenharmony_ci#define SOR_CSTM_MODE_TMDS (1 << 12)
19462306a36Sopenharmony_ci#define SOR_CSTM_MODE_MASK (3 << 12)
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_LVDS					0x5b
19762306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CRCA					0x5c
19862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CRCB					0x5d
19962306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_BLANK					0x5e
20062306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_SEQ_CTL				0x5f
20162306a36Sopenharmony_ci#define SOR_SEQ_PU_PC(x)     (((x) & 0xf) <<  0)
20262306a36Sopenharmony_ci#define SOR_SEQ_PU_PC_ALT(x) (((x) & 0xf) <<  4)
20362306a36Sopenharmony_ci#define SOR_SEQ_PD_PC(x)     (((x) & 0xf) <<  8)
20462306a36Sopenharmony_ci#define SOR_SEQ_PD_PC_ALT(x) (((x) & 0xf) << 12)
20562306a36Sopenharmony_ci#define SOR_SEQ_PC(x)        (((x) & 0xf) << 16)
20662306a36Sopenharmony_ci#define SOR_SEQ_STATUS       (1 << 28)
20762306a36Sopenharmony_ci#define SOR_SEQ_SWITCH       (1 << 30)
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_SEQ_INST(x)				(0x60 + (x))
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ci#define SOR_SEQ_INST_WAIT_TIME(x)     (((x) & 0x3ff) << 0)
21262306a36Sopenharmony_ci#define SOR_SEQ_INST_WAIT_UNITS_VSYNC (2 << 12)
21362306a36Sopenharmony_ci#define SOR_SEQ_INST_HALT             (1 << 15)
21462306a36Sopenharmony_ci#define SOR_SEQ_INST_PIN_A_LOW        (0 << 21)
21562306a36Sopenharmony_ci#define SOR_SEQ_INST_PIN_A_HIGH       (1 << 21)
21662306a36Sopenharmony_ci#define SOR_SEQ_INST_PIN_B_LOW        (0 << 22)
21762306a36Sopenharmony_ci#define SOR_SEQ_INST_PIN_B_HIGH       (1 << 22)
21862306a36Sopenharmony_ci#define SOR_SEQ_INST_DRIVE_PWM_OUT_LO (1 << 23)
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_VCRCA0				0x72
22162306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_VCRCA1				0x73
22262306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CCRCA0				0x74
22362306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_CCRCA1				0x75
22462306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_EDATAA0				0x76
22562306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_EDATAA1				0x77
22662306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_COUNTA0				0x78
22762306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_COUNTA1				0x79
22862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_DEBUGA0				0x7a
22962306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_DEBUGA1				0x7b
23062306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_TRIG					0x7c
23162306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_MSCHECK				0x7d
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_LANE_DRIVE_CURRENT			0x7e
23462306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE0(x)      (((x) & 0x3f) <<  0)
23562306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE1(x)      (((x) & 0x3f) <<  8)
23662306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE2(x)      (((x) & 0x3f) << 16)
23762306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE3(x)      (((x) & 0x3f) << 24)
23862306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE0_T114(x) (((x) & 0x7f) <<  0)
23962306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE1_T114(x) (((x) & 0x7f) <<  8)
24062306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE2_T114(x) (((x) & 0x7f) << 16)
24162306a36Sopenharmony_ci#define DRIVE_CURRENT_LANE3_T114(x) (((x) & 0x7f) << 24)
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ci#define DRIVE_CURRENT_1_500_mA  0x00
24462306a36Sopenharmony_ci#define DRIVE_CURRENT_1_875_mA  0x01
24562306a36Sopenharmony_ci#define DRIVE_CURRENT_2_250_mA  0x02
24662306a36Sopenharmony_ci#define DRIVE_CURRENT_2_625_mA  0x03
24762306a36Sopenharmony_ci#define DRIVE_CURRENT_3_000_mA  0x04
24862306a36Sopenharmony_ci#define DRIVE_CURRENT_3_375_mA  0x05
24962306a36Sopenharmony_ci#define DRIVE_CURRENT_3_750_mA  0x06
25062306a36Sopenharmony_ci#define DRIVE_CURRENT_4_125_mA  0x07
25162306a36Sopenharmony_ci#define DRIVE_CURRENT_4_500_mA  0x08
25262306a36Sopenharmony_ci#define DRIVE_CURRENT_4_875_mA  0x09
25362306a36Sopenharmony_ci#define DRIVE_CURRENT_5_250_mA  0x0a
25462306a36Sopenharmony_ci#define DRIVE_CURRENT_5_625_mA  0x0b
25562306a36Sopenharmony_ci#define DRIVE_CURRENT_6_000_mA  0x0c
25662306a36Sopenharmony_ci#define DRIVE_CURRENT_6_375_mA  0x0d
25762306a36Sopenharmony_ci#define DRIVE_CURRENT_6_750_mA  0x0e
25862306a36Sopenharmony_ci#define DRIVE_CURRENT_7_125_mA  0x0f
25962306a36Sopenharmony_ci#define DRIVE_CURRENT_7_500_mA  0x10
26062306a36Sopenharmony_ci#define DRIVE_CURRENT_7_875_mA  0x11
26162306a36Sopenharmony_ci#define DRIVE_CURRENT_8_250_mA  0x12
26262306a36Sopenharmony_ci#define DRIVE_CURRENT_8_625_mA  0x13
26362306a36Sopenharmony_ci#define DRIVE_CURRENT_9_000_mA  0x14
26462306a36Sopenharmony_ci#define DRIVE_CURRENT_9_375_mA  0x15
26562306a36Sopenharmony_ci#define DRIVE_CURRENT_9_750_mA  0x16
26662306a36Sopenharmony_ci#define DRIVE_CURRENT_10_125_mA 0x17
26762306a36Sopenharmony_ci#define DRIVE_CURRENT_10_500_mA 0x18
26862306a36Sopenharmony_ci#define DRIVE_CURRENT_10_875_mA 0x19
26962306a36Sopenharmony_ci#define DRIVE_CURRENT_11_250_mA 0x1a
27062306a36Sopenharmony_ci#define DRIVE_CURRENT_11_625_mA 0x1b
27162306a36Sopenharmony_ci#define DRIVE_CURRENT_12_000_mA 0x1c
27262306a36Sopenharmony_ci#define DRIVE_CURRENT_12_375_mA 0x1d
27362306a36Sopenharmony_ci#define DRIVE_CURRENT_12_750_mA 0x1e
27462306a36Sopenharmony_ci#define DRIVE_CURRENT_13_125_mA 0x1f
27562306a36Sopenharmony_ci#define DRIVE_CURRENT_13_500_mA 0x20
27662306a36Sopenharmony_ci#define DRIVE_CURRENT_13_875_mA 0x21
27762306a36Sopenharmony_ci#define DRIVE_CURRENT_14_250_mA 0x22
27862306a36Sopenharmony_ci#define DRIVE_CURRENT_14_625_mA 0x23
27962306a36Sopenharmony_ci#define DRIVE_CURRENT_15_000_mA 0x24
28062306a36Sopenharmony_ci#define DRIVE_CURRENT_15_375_mA 0x25
28162306a36Sopenharmony_ci#define DRIVE_CURRENT_15_750_mA 0x26
28262306a36Sopenharmony_ci#define DRIVE_CURRENT_16_125_mA 0x27
28362306a36Sopenharmony_ci#define DRIVE_CURRENT_16_500_mA 0x28
28462306a36Sopenharmony_ci#define DRIVE_CURRENT_16_875_mA 0x29
28562306a36Sopenharmony_ci#define DRIVE_CURRENT_17_250_mA 0x2a
28662306a36Sopenharmony_ci#define DRIVE_CURRENT_17_625_mA 0x2b
28762306a36Sopenharmony_ci#define DRIVE_CURRENT_18_000_mA 0x2c
28862306a36Sopenharmony_ci#define DRIVE_CURRENT_18_375_mA 0x2d
28962306a36Sopenharmony_ci#define DRIVE_CURRENT_18_750_mA 0x2e
29062306a36Sopenharmony_ci#define DRIVE_CURRENT_19_125_mA 0x2f
29162306a36Sopenharmony_ci#define DRIVE_CURRENT_19_500_mA 0x30
29262306a36Sopenharmony_ci#define DRIVE_CURRENT_19_875_mA 0x31
29362306a36Sopenharmony_ci#define DRIVE_CURRENT_20_250_mA 0x32
29462306a36Sopenharmony_ci#define DRIVE_CURRENT_20_625_mA 0x33
29562306a36Sopenharmony_ci#define DRIVE_CURRENT_21_000_mA 0x34
29662306a36Sopenharmony_ci#define DRIVE_CURRENT_21_375_mA 0x35
29762306a36Sopenharmony_ci#define DRIVE_CURRENT_21_750_mA 0x36
29862306a36Sopenharmony_ci#define DRIVE_CURRENT_22_125_mA 0x37
29962306a36Sopenharmony_ci#define DRIVE_CURRENT_22_500_mA 0x38
30062306a36Sopenharmony_ci#define DRIVE_CURRENT_22_875_mA 0x39
30162306a36Sopenharmony_ci#define DRIVE_CURRENT_23_250_mA 0x3a
30262306a36Sopenharmony_ci#define DRIVE_CURRENT_23_625_mA 0x3b
30362306a36Sopenharmony_ci#define DRIVE_CURRENT_24_000_mA 0x3c
30462306a36Sopenharmony_ci#define DRIVE_CURRENT_24_375_mA 0x3d
30562306a36Sopenharmony_ci#define DRIVE_CURRENT_24_750_mA 0x3e
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci#define DRIVE_CURRENT_0_000_mA_T114 0x00
30862306a36Sopenharmony_ci#define DRIVE_CURRENT_0_400_mA_T114 0x01
30962306a36Sopenharmony_ci#define DRIVE_CURRENT_0_800_mA_T114 0x02
31062306a36Sopenharmony_ci#define DRIVE_CURRENT_1_200_mA_T114 0x03
31162306a36Sopenharmony_ci#define DRIVE_CURRENT_1_600_mA_T114 0x04
31262306a36Sopenharmony_ci#define DRIVE_CURRENT_2_000_mA_T114 0x05
31362306a36Sopenharmony_ci#define DRIVE_CURRENT_2_400_mA_T114 0x06
31462306a36Sopenharmony_ci#define DRIVE_CURRENT_2_800_mA_T114 0x07
31562306a36Sopenharmony_ci#define DRIVE_CURRENT_3_200_mA_T114 0x08
31662306a36Sopenharmony_ci#define DRIVE_CURRENT_3_600_mA_T114 0x09
31762306a36Sopenharmony_ci#define DRIVE_CURRENT_4_000_mA_T114 0x0a
31862306a36Sopenharmony_ci#define DRIVE_CURRENT_4_400_mA_T114 0x0b
31962306a36Sopenharmony_ci#define DRIVE_CURRENT_4_800_mA_T114 0x0c
32062306a36Sopenharmony_ci#define DRIVE_CURRENT_5_200_mA_T114 0x0d
32162306a36Sopenharmony_ci#define DRIVE_CURRENT_5_600_mA_T114 0x0e
32262306a36Sopenharmony_ci#define DRIVE_CURRENT_6_000_mA_T114 0x0f
32362306a36Sopenharmony_ci#define DRIVE_CURRENT_6_400_mA_T114 0x10
32462306a36Sopenharmony_ci#define DRIVE_CURRENT_6_800_mA_T114 0x11
32562306a36Sopenharmony_ci#define DRIVE_CURRENT_7_200_mA_T114 0x12
32662306a36Sopenharmony_ci#define DRIVE_CURRENT_7_600_mA_T114 0x13
32762306a36Sopenharmony_ci#define DRIVE_CURRENT_8_000_mA_T114 0x14
32862306a36Sopenharmony_ci#define DRIVE_CURRENT_8_400_mA_T114 0x15
32962306a36Sopenharmony_ci#define DRIVE_CURRENT_8_800_mA_T114 0x16
33062306a36Sopenharmony_ci#define DRIVE_CURRENT_9_200_mA_T114 0x17
33162306a36Sopenharmony_ci#define DRIVE_CURRENT_9_600_mA_T114 0x18
33262306a36Sopenharmony_ci#define DRIVE_CURRENT_10_000_mA_T114 0x19
33362306a36Sopenharmony_ci#define DRIVE_CURRENT_10_400_mA_T114 0x1a
33462306a36Sopenharmony_ci#define DRIVE_CURRENT_10_800_mA_T114 0x1b
33562306a36Sopenharmony_ci#define DRIVE_CURRENT_11_200_mA_T114 0x1c
33662306a36Sopenharmony_ci#define DRIVE_CURRENT_11_600_mA_T114 0x1d
33762306a36Sopenharmony_ci#define DRIVE_CURRENT_12_000_mA_T114 0x1e
33862306a36Sopenharmony_ci#define DRIVE_CURRENT_12_400_mA_T114 0x1f
33962306a36Sopenharmony_ci#define DRIVE_CURRENT_12_800_mA_T114 0x20
34062306a36Sopenharmony_ci#define DRIVE_CURRENT_13_200_mA_T114 0x21
34162306a36Sopenharmony_ci#define DRIVE_CURRENT_13_600_mA_T114 0x22
34262306a36Sopenharmony_ci#define DRIVE_CURRENT_14_000_mA_T114 0x23
34362306a36Sopenharmony_ci#define DRIVE_CURRENT_14_400_mA_T114 0x24
34462306a36Sopenharmony_ci#define DRIVE_CURRENT_14_800_mA_T114 0x25
34562306a36Sopenharmony_ci#define DRIVE_CURRENT_15_200_mA_T114 0x26
34662306a36Sopenharmony_ci#define DRIVE_CURRENT_15_600_mA_T114 0x27
34762306a36Sopenharmony_ci#define DRIVE_CURRENT_16_000_mA_T114 0x28
34862306a36Sopenharmony_ci#define DRIVE_CURRENT_16_400_mA_T114 0x29
34962306a36Sopenharmony_ci#define DRIVE_CURRENT_16_800_mA_T114 0x2a
35062306a36Sopenharmony_ci#define DRIVE_CURRENT_17_200_mA_T114 0x2b
35162306a36Sopenharmony_ci#define DRIVE_CURRENT_17_600_mA_T114 0x2c
35262306a36Sopenharmony_ci#define DRIVE_CURRENT_18_000_mA_T114 0x2d
35362306a36Sopenharmony_ci#define DRIVE_CURRENT_18_400_mA_T114 0x2e
35462306a36Sopenharmony_ci#define DRIVE_CURRENT_18_800_mA_T114 0x2f
35562306a36Sopenharmony_ci#define DRIVE_CURRENT_19_200_mA_T114 0x30
35662306a36Sopenharmony_ci#define DRIVE_CURRENT_19_600_mA_T114 0x31
35762306a36Sopenharmony_ci#define DRIVE_CURRENT_20_000_mA_T114 0x32
35862306a36Sopenharmony_ci#define DRIVE_CURRENT_20_400_mA_T114 0x33
35962306a36Sopenharmony_ci#define DRIVE_CURRENT_20_800_mA_T114 0x34
36062306a36Sopenharmony_ci#define DRIVE_CURRENT_21_200_mA_T114 0x35
36162306a36Sopenharmony_ci#define DRIVE_CURRENT_21_600_mA_T114 0x36
36262306a36Sopenharmony_ci#define DRIVE_CURRENT_22_000_mA_T114 0x37
36362306a36Sopenharmony_ci#define DRIVE_CURRENT_22_400_mA_T114 0x38
36462306a36Sopenharmony_ci#define DRIVE_CURRENT_22_800_mA_T114 0x39
36562306a36Sopenharmony_ci#define DRIVE_CURRENT_23_200_mA_T114 0x3a
36662306a36Sopenharmony_ci#define DRIVE_CURRENT_23_600_mA_T114 0x3b
36762306a36Sopenharmony_ci#define DRIVE_CURRENT_24_000_mA_T114 0x3c
36862306a36Sopenharmony_ci#define DRIVE_CURRENT_24_400_mA_T114 0x3d
36962306a36Sopenharmony_ci#define DRIVE_CURRENT_24_800_mA_T114 0x3e
37062306a36Sopenharmony_ci#define DRIVE_CURRENT_25_200_mA_T114 0x3f
37162306a36Sopenharmony_ci#define DRIVE_CURRENT_25_400_mA_T114 0x40
37262306a36Sopenharmony_ci#define DRIVE_CURRENT_25_800_mA_T114 0x41
37362306a36Sopenharmony_ci#define DRIVE_CURRENT_26_200_mA_T114 0x42
37462306a36Sopenharmony_ci#define DRIVE_CURRENT_26_600_mA_T114 0x43
37562306a36Sopenharmony_ci#define DRIVE_CURRENT_27_000_mA_T114 0x44
37662306a36Sopenharmony_ci#define DRIVE_CURRENT_27_400_mA_T114 0x45
37762306a36Sopenharmony_ci#define DRIVE_CURRENT_27_800_mA_T114 0x46
37862306a36Sopenharmony_ci#define DRIVE_CURRENT_28_200_mA_T114 0x47
37962306a36Sopenharmony_ci
38062306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_DEBUG0				0x7f
38162306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_DEBUG1				0x80
38262306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_DEBUG2				0x81
38362306a36Sopenharmony_ci
38462306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_FS(x)				(0x82 + (x))
38562306a36Sopenharmony_ci#define AUDIO_FS_LOW(x)  (((x) & 0xfff) <<  0)
38662306a36Sopenharmony_ci#define AUDIO_FS_HIGH(x) (((x) & 0xfff) << 16)
38762306a36Sopenharmony_ci
38862306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_PULSE_WIDTH				0x89
38962306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_THRESHOLD				0x8a
39062306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_CNTRL0				0x8b
39162306a36Sopenharmony_ci#define AUDIO_CNTRL0_ERROR_TOLERANCE(x)  (((x) & 0xff) << 0)
39262306a36Sopenharmony_ci#define AUDIO_CNTRL0_SOURCE_SELECT_AUTO  (0 << 20)
39362306a36Sopenharmony_ci#define AUDIO_CNTRL0_SOURCE_SELECT_SPDIF (1 << 20)
39462306a36Sopenharmony_ci#define AUDIO_CNTRL0_SOURCE_SELECT_HDAL  (2 << 20)
39562306a36Sopenharmony_ci#define AUDIO_CNTRL0_FRAMES_PER_BLOCK(x) (((x) & 0xff) << 24)
39662306a36Sopenharmony_ci
39762306a36Sopenharmony_ci#define HDMI_NV_PDISP_AUDIO_N					0x8c
39862306a36Sopenharmony_ci#define AUDIO_N_VALUE(x)           (((x) & 0xfffff) << 0)
39962306a36Sopenharmony_ci#define AUDIO_N_RESETF             (1 << 20)
40062306a36Sopenharmony_ci#define AUDIO_N_GENERATE_NORMAL    (0 << 24)
40162306a36Sopenharmony_ci#define AUDIO_N_GENERATE_ALTERNATE (1 << 24)
40262306a36Sopenharmony_ci
40362306a36Sopenharmony_ci#define HDMI_NV_PDISP_HDCPRIF_ROM_TIMING			0x94
40462306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_REFCLK				0x95
40562306a36Sopenharmony_ci#define SOR_REFCLK_DIV_INT(x)  (((x) & 0xff) << 8)
40662306a36Sopenharmony_ci#define SOR_REFCLK_DIV_FRAC(x) (((x) & 0x03) << 6)
40762306a36Sopenharmony_ci
40862306a36Sopenharmony_ci#define HDMI_NV_PDISP_CRC_CONTROL				0x96
40962306a36Sopenharmony_ci#define HDMI_NV_PDISP_INPUT_CONTROL				0x97
41062306a36Sopenharmony_ci#define HDMI_SRC_DISPLAYA       (0 << 0)
41162306a36Sopenharmony_ci#define HDMI_SRC_DISPLAYB       (1 << 0)
41262306a36Sopenharmony_ci#define ARM_VIDEO_RANGE_FULL    (0 << 1)
41362306a36Sopenharmony_ci#define ARM_VIDEO_RANGE_LIMITED (1 << 1)
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci#define HDMI_NV_PDISP_SCRATCH					0x98
41662306a36Sopenharmony_ci#define HDMI_NV_PDISP_PE_CURRENT				0x99
41762306a36Sopenharmony_ci#define PE_CURRENT0(x) (((x) & 0xf) << 0)
41862306a36Sopenharmony_ci#define PE_CURRENT1(x) (((x) & 0xf) << 8)
41962306a36Sopenharmony_ci#define PE_CURRENT2(x) (((x) & 0xf) << 16)
42062306a36Sopenharmony_ci#define PE_CURRENT3(x) (((x) & 0xf) << 24)
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ci#define PE_CURRENT_0_0_mA 0x0
42362306a36Sopenharmony_ci#define PE_CURRENT_0_5_mA 0x1
42462306a36Sopenharmony_ci#define PE_CURRENT_1_0_mA 0x2
42562306a36Sopenharmony_ci#define PE_CURRENT_1_5_mA 0x3
42662306a36Sopenharmony_ci#define PE_CURRENT_2_0_mA 0x4
42762306a36Sopenharmony_ci#define PE_CURRENT_2_5_mA 0x5
42862306a36Sopenharmony_ci#define PE_CURRENT_3_0_mA 0x6
42962306a36Sopenharmony_ci#define PE_CURRENT_3_5_mA 0x7
43062306a36Sopenharmony_ci#define PE_CURRENT_4_0_mA 0x8
43162306a36Sopenharmony_ci#define PE_CURRENT_4_5_mA 0x9
43262306a36Sopenharmony_ci#define PE_CURRENT_5_0_mA 0xa
43362306a36Sopenharmony_ci#define PE_CURRENT_5_5_mA 0xb
43462306a36Sopenharmony_ci#define PE_CURRENT_6_0_mA 0xc
43562306a36Sopenharmony_ci#define PE_CURRENT_6_5_mA 0xd
43662306a36Sopenharmony_ci#define PE_CURRENT_7_0_mA 0xe
43762306a36Sopenharmony_ci#define PE_CURRENT_7_5_mA 0xf
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_ci#define PE_CURRENT_0_mA_T114 0x0
44062306a36Sopenharmony_ci#define PE_CURRENT_1_mA_T114 0x1
44162306a36Sopenharmony_ci#define PE_CURRENT_2_mA_T114 0x2
44262306a36Sopenharmony_ci#define PE_CURRENT_3_mA_T114 0x3
44362306a36Sopenharmony_ci#define PE_CURRENT_4_mA_T114 0x4
44462306a36Sopenharmony_ci#define PE_CURRENT_5_mA_T114 0x5
44562306a36Sopenharmony_ci#define PE_CURRENT_6_mA_T114 0x6
44662306a36Sopenharmony_ci#define PE_CURRENT_7_mA_T114 0x7
44762306a36Sopenharmony_ci#define PE_CURRENT_8_mA_T114 0x8
44862306a36Sopenharmony_ci#define PE_CURRENT_9_mA_T114 0x9
44962306a36Sopenharmony_ci#define PE_CURRENT_10_mA_T114 0xa
45062306a36Sopenharmony_ci#define PE_CURRENT_11_mA_T114 0xb
45162306a36Sopenharmony_ci#define PE_CURRENT_12_mA_T114 0xc
45262306a36Sopenharmony_ci#define PE_CURRENT_13_mA_T114 0xd
45362306a36Sopenharmony_ci#define PE_CURRENT_14_mA_T114 0xe
45462306a36Sopenharmony_ci#define PE_CURRENT_15_mA_T114 0xf
45562306a36Sopenharmony_ci
45662306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_CTRL					0x9a
45762306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_DEBUG0				0x9b
45862306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_DEBUG1				0x9c
45962306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_DEBUG2				0x9d
46062306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_HDCP_KEY_0				0x9e
46162306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_HDCP_KEY_1				0x9f
46262306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_HDCP_KEY_2				0xa0
46362306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_HDCP_KEY_3				0xa1
46462306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_HDCP_KEY_TRIG				0xa2
46562306a36Sopenharmony_ci#define HDMI_NV_PDISP_KEY_SKEY_INDEX				0xa3
46662306a36Sopenharmony_ci
46762306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_CNTRL0				0xac
46862306a36Sopenharmony_ci#define  SOR_AUDIO_CNTRL0_SOURCE_SELECT_AUTO	(0 << 20)
46962306a36Sopenharmony_ci#define  SOR_AUDIO_CNTRL0_SOURCE_SELECT_SPDIF	(1 << 20)
47062306a36Sopenharmony_ci#define  SOR_AUDIO_CNTRL0_SOURCE_SELECT_HDAL	(2 << 20)
47162306a36Sopenharmony_ci#define  SOR_AUDIO_CNTRL0_INJECT_NULLSMPL	(1 << 29)
47262306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_SPARE0				0xae
47362306a36Sopenharmony_ci#define  SOR_AUDIO_SPARE0_HBR_ENABLE		(1 << 27)
47462306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_HDA_CODEC_SCRATCH0		0xba
47562306a36Sopenharmony_ci#define  SOR_AUDIO_HDA_CODEC_SCRATCH0_VALID	(1 << 30)
47662306a36Sopenharmony_ci#define  SOR_AUDIO_HDA_CODEC_SCRATCH0_FMT_MASK	0xffff
47762306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_HDA_CODEC_SCRATCH1		0xbb
47862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_HDA_ELD_BUFWR			0xbc
47962306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_HDA_PRESENSE			0xbd
48062306a36Sopenharmony_ci#define  SOR_AUDIO_HDA_PRESENSE_VALID		(1 << 1)
48162306a36Sopenharmony_ci#define  SOR_AUDIO_HDA_PRESENSE_PRESENT		(1 << 0)
48262306a36Sopenharmony_ci
48362306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0320    0xbf
48462306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0441    0xc0
48562306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0882    0xc1
48662306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_1764    0xc2
48762306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0480    0xc3
48862306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_0960    0xc4
48962306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_1920    0xc5
49062306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_AUDIO_AVAL_DEFAULT 0xc5
49162306a36Sopenharmony_ci
49262306a36Sopenharmony_ci#define HDMI_NV_PDISP_INT_STATUS			0xcc
49362306a36Sopenharmony_ci#define  INT_SCRATCH		(1 << 3)
49462306a36Sopenharmony_ci#define  INT_CP_REQUEST		(1 << 2)
49562306a36Sopenharmony_ci#define  INT_CODEC_SCRATCH1	(1 << 1)
49662306a36Sopenharmony_ci#define  INT_CODEC_SCRATCH0	(1 << 0)
49762306a36Sopenharmony_ci#define HDMI_NV_PDISP_INT_MASK				0xcd
49862306a36Sopenharmony_ci#define HDMI_NV_PDISP_INT_ENABLE			0xce
49962306a36Sopenharmony_ci
50062306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_IO_PEAK_CURRENT		0xd1
50162306a36Sopenharmony_ci#define PEAK_CURRENT_LANE0(x) (((x) & 0x7f) <<  0)
50262306a36Sopenharmony_ci#define PEAK_CURRENT_LANE1(x) (((x) & 0x7f) <<  8)
50362306a36Sopenharmony_ci#define PEAK_CURRENT_LANE2(x) (((x) & 0x7f) << 16)
50462306a36Sopenharmony_ci#define PEAK_CURRENT_LANE3(x) (((x) & 0x7f) << 24)
50562306a36Sopenharmony_ci
50662306a36Sopenharmony_ci#define PEAK_CURRENT_0_000_mA 0x00
50762306a36Sopenharmony_ci#define PEAK_CURRENT_0_200_mA 0x01
50862306a36Sopenharmony_ci#define PEAK_CURRENT_0_400_mA 0x02
50962306a36Sopenharmony_ci#define PEAK_CURRENT_0_600_mA 0x03
51062306a36Sopenharmony_ci#define PEAK_CURRENT_0_800_mA 0x04
51162306a36Sopenharmony_ci#define PEAK_CURRENT_1_000_mA 0x05
51262306a36Sopenharmony_ci#define PEAK_CURRENT_1_200_mA 0x06
51362306a36Sopenharmony_ci#define PEAK_CURRENT_1_400_mA 0x07
51462306a36Sopenharmony_ci#define PEAK_CURRENT_1_600_mA 0x08
51562306a36Sopenharmony_ci#define PEAK_CURRENT_1_800_mA 0x09
51662306a36Sopenharmony_ci#define PEAK_CURRENT_2_000_mA 0x0a
51762306a36Sopenharmony_ci#define PEAK_CURRENT_2_200_mA 0x0b
51862306a36Sopenharmony_ci#define PEAK_CURRENT_2_400_mA 0x0c
51962306a36Sopenharmony_ci#define PEAK_CURRENT_2_600_mA 0x0d
52062306a36Sopenharmony_ci#define PEAK_CURRENT_2_800_mA 0x0e
52162306a36Sopenharmony_ci#define PEAK_CURRENT_3_000_mA 0x0f
52262306a36Sopenharmony_ci#define PEAK_CURRENT_3_200_mA 0x10
52362306a36Sopenharmony_ci#define PEAK_CURRENT_3_400_mA 0x11
52462306a36Sopenharmony_ci#define PEAK_CURRENT_3_600_mA 0x12
52562306a36Sopenharmony_ci#define PEAK_CURRENT_3_800_mA 0x13
52662306a36Sopenharmony_ci#define PEAK_CURRENT_4_000_mA 0x14
52762306a36Sopenharmony_ci#define PEAK_CURRENT_4_200_mA 0x15
52862306a36Sopenharmony_ci#define PEAK_CURRENT_4_400_mA 0x16
52962306a36Sopenharmony_ci#define PEAK_CURRENT_4_600_mA 0x17
53062306a36Sopenharmony_ci#define PEAK_CURRENT_4_800_mA 0x18
53162306a36Sopenharmony_ci#define PEAK_CURRENT_5_000_mA 0x19
53262306a36Sopenharmony_ci#define PEAK_CURRENT_5_200_mA 0x1a
53362306a36Sopenharmony_ci#define PEAK_CURRENT_5_400_mA 0x1b
53462306a36Sopenharmony_ci#define PEAK_CURRENT_5_600_mA 0x1c
53562306a36Sopenharmony_ci#define PEAK_CURRENT_5_800_mA 0x1d
53662306a36Sopenharmony_ci#define PEAK_CURRENT_6_000_mA 0x1e
53762306a36Sopenharmony_ci#define PEAK_CURRENT_6_200_mA 0x1f
53862306a36Sopenharmony_ci#define PEAK_CURRENT_6_400_mA 0x20
53962306a36Sopenharmony_ci#define PEAK_CURRENT_6_600_mA 0x21
54062306a36Sopenharmony_ci#define PEAK_CURRENT_6_800_mA 0x22
54162306a36Sopenharmony_ci#define PEAK_CURRENT_7_000_mA 0x23
54262306a36Sopenharmony_ci#define PEAK_CURRENT_7_200_mA 0x24
54362306a36Sopenharmony_ci#define PEAK_CURRENT_7_400_mA 0x25
54462306a36Sopenharmony_ci#define PEAK_CURRENT_7_600_mA 0x26
54562306a36Sopenharmony_ci#define PEAK_CURRENT_7_800_mA 0x27
54662306a36Sopenharmony_ci#define PEAK_CURRENT_8_000_mA 0x28
54762306a36Sopenharmony_ci#define PEAK_CURRENT_8_200_mA 0x29
54862306a36Sopenharmony_ci#define PEAK_CURRENT_8_400_mA 0x2a
54962306a36Sopenharmony_ci#define PEAK_CURRENT_8_600_mA 0x2b
55062306a36Sopenharmony_ci#define PEAK_CURRENT_8_800_mA 0x2c
55162306a36Sopenharmony_ci#define PEAK_CURRENT_9_000_mA 0x2d
55262306a36Sopenharmony_ci#define PEAK_CURRENT_9_200_mA 0x2e
55362306a36Sopenharmony_ci#define PEAK_CURRENT_9_400_mA 0x2f
55462306a36Sopenharmony_ci
55562306a36Sopenharmony_ci#define HDMI_NV_PDISP_SOR_PAD_CTLS0		0xd2
55662306a36Sopenharmony_ci
55762306a36Sopenharmony_ci#endif /* TEGRA_HDMI_H */
558