18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * tc358743 - Toshiba HDMI to CSI-2 bridge - register names and bit masks
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright 2015 Cisco Systems, Inc. and/or its affiliates. All rights
68c2ecf20Sopenharmony_ci * reserved.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/*
108c2ecf20Sopenharmony_ci * References (c = chapter, p = page):
118c2ecf20Sopenharmony_ci * REF_01 - Toshiba, TC358743XBG (H2C), Functional Specification, Rev 0.60
128c2ecf20Sopenharmony_ci */
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/* Bit masks has prefix 'MASK_' and options after '_'. */
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#ifndef __TC358743_REGS_H
178c2ecf20Sopenharmony_ci#define __TC358743_REGS_H
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define CHIPID                                0x0000
208c2ecf20Sopenharmony_ci#define MASK_CHIPID                           0xff00
218c2ecf20Sopenharmony_ci#define MASK_REVID                            0x00ff
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#define SYSCTL                                0x0002
248c2ecf20Sopenharmony_ci#define MASK_IRRST                            0x0800
258c2ecf20Sopenharmony_ci#define MASK_CECRST                           0x0400
268c2ecf20Sopenharmony_ci#define MASK_CTXRST                           0x0200
278c2ecf20Sopenharmony_ci#define MASK_HDMIRST                          0x0100
288c2ecf20Sopenharmony_ci#define MASK_SLEEP                            0x0001
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#define CONFCTL                               0x0004
318c2ecf20Sopenharmony_ci#define MASK_PWRISO                           0x8000
328c2ecf20Sopenharmony_ci#define MASK_ACLKOPT                          0x1000
338c2ecf20Sopenharmony_ci#define MASK_AUDCHNUM                         0x0c00
348c2ecf20Sopenharmony_ci#define MASK_AUDCHNUM_8                       0x0000
358c2ecf20Sopenharmony_ci#define MASK_AUDCHNUM_6                       0x0400
368c2ecf20Sopenharmony_ci#define MASK_AUDCHNUM_4                       0x0800
378c2ecf20Sopenharmony_ci#define MASK_AUDCHNUM_2                       0x0c00
388c2ecf20Sopenharmony_ci#define MASK_AUDCHSEL                         0x0200
398c2ecf20Sopenharmony_ci#define MASK_I2SDLYOPT                        0x0100
408c2ecf20Sopenharmony_ci#define MASK_YCBCRFMT                         0x00c0
418c2ecf20Sopenharmony_ci#define MASK_YCBCRFMT_444                     0x0000
428c2ecf20Sopenharmony_ci#define MASK_YCBCRFMT_422_12_BIT              0x0040
438c2ecf20Sopenharmony_ci#define MASK_YCBCRFMT_COLORBAR                0x0080
448c2ecf20Sopenharmony_ci#define MASK_YCBCRFMT_422_8_BIT               0x00c0
458c2ecf20Sopenharmony_ci#define MASK_INFRMEN                          0x0020
468c2ecf20Sopenharmony_ci#define MASK_AUDOUTSEL                        0x0018
478c2ecf20Sopenharmony_ci#define MASK_AUDOUTSEL_CSI                    0x0000
488c2ecf20Sopenharmony_ci#define MASK_AUDOUTSEL_I2S                    0x0010
498c2ecf20Sopenharmony_ci#define MASK_AUDOUTSEL_TDM                    0x0018
508c2ecf20Sopenharmony_ci#define MASK_AUTOINDEX                        0x0004
518c2ecf20Sopenharmony_ci#define MASK_ABUFEN                           0x0002
528c2ecf20Sopenharmony_ci#define MASK_VBUFEN                           0x0001
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#define FIFOCTL                               0x0006
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define INTSTATUS                             0x0014
578c2ecf20Sopenharmony_ci#define MASK_AMUTE_INT                        0x0400
588c2ecf20Sopenharmony_ci#define MASK_HDMI_INT                         0x0200
598c2ecf20Sopenharmony_ci#define MASK_CSI_INT                          0x0100
608c2ecf20Sopenharmony_ci#define MASK_SYS_INT                          0x0020
618c2ecf20Sopenharmony_ci#define MASK_CEC_EINT                         0x0010
628c2ecf20Sopenharmony_ci#define MASK_CEC_TINT                         0x0008
638c2ecf20Sopenharmony_ci#define MASK_CEC_RINT                         0x0004
648c2ecf20Sopenharmony_ci#define MASK_IR_EINT                          0x0002
658c2ecf20Sopenharmony_ci#define MASK_IR_DINT                          0x0001
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#define INTMASK                               0x0016
688c2ecf20Sopenharmony_ci#define MASK_AMUTE_MSK                        0x0400
698c2ecf20Sopenharmony_ci#define MASK_HDMI_MSK                         0x0200
708c2ecf20Sopenharmony_ci#define MASK_CSI_MSK                          0x0100
718c2ecf20Sopenharmony_ci#define MASK_SYS_MSK                          0x0020
728c2ecf20Sopenharmony_ci#define MASK_CEC_EMSK                         0x0010
738c2ecf20Sopenharmony_ci#define MASK_CEC_TMSK                         0x0008
748c2ecf20Sopenharmony_ci#define MASK_CEC_RMSK                         0x0004
758c2ecf20Sopenharmony_ci#define MASK_IR_EMSK                          0x0002
768c2ecf20Sopenharmony_ci#define MASK_IR_DMSK                          0x0001
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#define INTFLAG                               0x0018
798c2ecf20Sopenharmony_ci#define INTSYSSTATUS                          0x001A
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci#define PLLCTL0                               0x0020
828c2ecf20Sopenharmony_ci#define MASK_PLL_PRD                          0xf000
838c2ecf20Sopenharmony_ci#define SET_PLL_PRD(prd)                      ((((prd) - 1) << 12) &\
848c2ecf20Sopenharmony_ci						MASK_PLL_PRD)
858c2ecf20Sopenharmony_ci#define MASK_PLL_FBD                          0x01ff
868c2ecf20Sopenharmony_ci#define SET_PLL_FBD(fbd)                      (((fbd) - 1) & MASK_PLL_FBD)
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci#define PLLCTL1                               0x0022
898c2ecf20Sopenharmony_ci#define MASK_PLL_FRS                          0x0c00
908c2ecf20Sopenharmony_ci#define SET_PLL_FRS(frs)                      (((frs) << 10) & MASK_PLL_FRS)
918c2ecf20Sopenharmony_ci#define MASK_PLL_LBWS                         0x0300
928c2ecf20Sopenharmony_ci#define MASK_LFBREN                           0x0040
938c2ecf20Sopenharmony_ci#define MASK_BYPCKEN                          0x0020
948c2ecf20Sopenharmony_ci#define MASK_CKEN                             0x0010
958c2ecf20Sopenharmony_ci#define MASK_RESETB                           0x0002
968c2ecf20Sopenharmony_ci#define MASK_PLL_EN                           0x0001
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci#define CLW_CNTRL                             0x0140
998c2ecf20Sopenharmony_ci#define MASK_CLW_LANEDISABLE                  0x0001
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci#define D0W_CNTRL                             0x0144
1028c2ecf20Sopenharmony_ci#define MASK_D0W_LANEDISABLE                  0x0001
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci#define D1W_CNTRL                             0x0148
1058c2ecf20Sopenharmony_ci#define MASK_D1W_LANEDISABLE                  0x0001
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci#define D2W_CNTRL                             0x014C
1088c2ecf20Sopenharmony_ci#define MASK_D2W_LANEDISABLE                  0x0001
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci#define D3W_CNTRL                             0x0150
1118c2ecf20Sopenharmony_ci#define MASK_D3W_LANEDISABLE                  0x0001
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci#define STARTCNTRL                            0x0204
1148c2ecf20Sopenharmony_ci#define MASK_START                            0x00000001
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci#define LINEINITCNT                           0x0210
1178c2ecf20Sopenharmony_ci#define LPTXTIMECNT                           0x0214
1188c2ecf20Sopenharmony_ci#define TCLK_HEADERCNT                        0x0218
1198c2ecf20Sopenharmony_ci#define TCLK_TRAILCNT                         0x021C
1208c2ecf20Sopenharmony_ci#define THS_HEADERCNT                         0x0220
1218c2ecf20Sopenharmony_ci#define TWAKEUP                               0x0224
1228c2ecf20Sopenharmony_ci#define TCLK_POSTCNT                          0x0228
1238c2ecf20Sopenharmony_ci#define THS_TRAILCNT                          0x022C
1248c2ecf20Sopenharmony_ci#define HSTXVREGCNT                           0x0230
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci#define HSTXVREGEN                            0x0234
1278c2ecf20Sopenharmony_ci#define MASK_D3M_HSTXVREGEN                   0x0010
1288c2ecf20Sopenharmony_ci#define MASK_D2M_HSTXVREGEN                   0x0008
1298c2ecf20Sopenharmony_ci#define MASK_D1M_HSTXVREGEN                   0x0004
1308c2ecf20Sopenharmony_ci#define MASK_D0M_HSTXVREGEN                   0x0002
1318c2ecf20Sopenharmony_ci#define MASK_CLM_HSTXVREGEN                   0x0001
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci#define TXOPTIONCNTRL                         0x0238
1358c2ecf20Sopenharmony_ci#define MASK_CONTCLKMODE                      0x00000001
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci#define CSI_CONTROL                           0x040C
1388c2ecf20Sopenharmony_ci#define MASK_CSI_MODE                         0x8000
1398c2ecf20Sopenharmony_ci#define MASK_HTXTOEN                          0x0400
1408c2ecf20Sopenharmony_ci#define MASK_TXHSMD                           0x0080
1418c2ecf20Sopenharmony_ci#define MASK_HSCKMD                           0x0020
1428c2ecf20Sopenharmony_ci#define MASK_NOL                              0x0006
1438c2ecf20Sopenharmony_ci#define MASK_NOL_1                            0x0000
1448c2ecf20Sopenharmony_ci#define MASK_NOL_2                            0x0002
1458c2ecf20Sopenharmony_ci#define MASK_NOL_3                            0x0004
1468c2ecf20Sopenharmony_ci#define MASK_NOL_4                            0x0006
1478c2ecf20Sopenharmony_ci#define MASK_EOTDIS                           0x0001
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci#define CSI_INT                               0x0414
1508c2ecf20Sopenharmony_ci#define MASK_INTHLT                           0x00000008
1518c2ecf20Sopenharmony_ci#define MASK_INTER                            0x00000004
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_ci#define CSI_INT_ENA                           0x0418
1548c2ecf20Sopenharmony_ci#define MASK_IENHLT                           0x00000008
1558c2ecf20Sopenharmony_ci#define MASK_IENER                            0x00000004
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci#define CSI_ERR                               0x044C
1588c2ecf20Sopenharmony_ci#define MASK_INER                             0x00000200
1598c2ecf20Sopenharmony_ci#define MASK_WCER                             0x00000100
1608c2ecf20Sopenharmony_ci#define MASK_QUNK                             0x00000010
1618c2ecf20Sopenharmony_ci#define MASK_TXBRK                            0x00000002
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci#define CSI_ERR_INTENA                        0x0450
1648c2ecf20Sopenharmony_ci#define CSI_ERR_HALT                          0x0454
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_ci#define CSI_CONFW                             0x0500
1678c2ecf20Sopenharmony_ci#define MASK_MODE                             0xe0000000
1688c2ecf20Sopenharmony_ci#define MASK_MODE_SET                         0xa0000000
1698c2ecf20Sopenharmony_ci#define MASK_MODE_CLEAR                       0xc0000000
1708c2ecf20Sopenharmony_ci#define MASK_ADDRESS                          0x1f000000
1718c2ecf20Sopenharmony_ci#define MASK_ADDRESS_CSI_CONTROL              0x03000000
1728c2ecf20Sopenharmony_ci#define MASK_ADDRESS_CSI_INT_ENA              0x06000000
1738c2ecf20Sopenharmony_ci#define MASK_ADDRESS_CSI_ERR_INTENA           0x14000000
1748c2ecf20Sopenharmony_ci#define MASK_ADDRESS_CSI_ERR_HALT             0x15000000
1758c2ecf20Sopenharmony_ci#define MASK_DATA                             0x0000ffff
1768c2ecf20Sopenharmony_ci
1778c2ecf20Sopenharmony_ci#define CSI_INT_CLR                           0x050C
1788c2ecf20Sopenharmony_ci#define MASK_ICRER                            0x00000004
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ci#define CSI_START                             0x0518
1818c2ecf20Sopenharmony_ci#define MASK_STRT                             0x00000001
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci/* *** CEC (32 bit) *** */
1848c2ecf20Sopenharmony_ci#define CECHCLK				      0x0028	/* 16 bits */
1858c2ecf20Sopenharmony_ci#define MASK_CECHCLK			      (0x7ff << 0)
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci#define CECLCLK				      0x002a	/* 16 bits */
1888c2ecf20Sopenharmony_ci#define MASK_CECLCLK			      (0x7ff << 0)
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci#define CECEN				      0x0600
1918c2ecf20Sopenharmony_ci#define MASK_CECEN			      0x0001
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci#define CECADD				      0x0604
1948c2ecf20Sopenharmony_ci#define CECRST				      0x0608
1958c2ecf20Sopenharmony_ci#define MASK_CECRESET			      0x0001
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci#define CECREN				      0x060c
1988c2ecf20Sopenharmony_ci#define MASK_CECREN			      0x0001
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_ci#define CECRCTL1			      0x0614
2018c2ecf20Sopenharmony_ci#define MASK_CECACKDIS			      (1 << 24)
2028c2ecf20Sopenharmony_ci#define MASK_CECHNC			      (3 << 20)
2038c2ecf20Sopenharmony_ci#define MASK_CECLNC			      (7 << 16)
2048c2ecf20Sopenharmony_ci#define MASK_CECMIN			      (7 << 12)
2058c2ecf20Sopenharmony_ci#define MASK_CECMAX			      (7 << 8)
2068c2ecf20Sopenharmony_ci#define MASK_CECDAT			      (7 << 4)
2078c2ecf20Sopenharmony_ci#define MASK_CECTOUT			      (3 << 2)
2088c2ecf20Sopenharmony_ci#define MASK_CECRIHLD			      (1 << 1)
2098c2ecf20Sopenharmony_ci#define MASK_CECOTH			      (1 << 0)
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci#define CECRCTL2			      0x0618
2128c2ecf20Sopenharmony_ci#define MASK_CECSWAV3			      (7 << 12)
2138c2ecf20Sopenharmony_ci#define MASK_CECSWAV2			      (7 << 8)
2148c2ecf20Sopenharmony_ci#define MASK_CECSWAV1			      (7 << 4)
2158c2ecf20Sopenharmony_ci#define MASK_CECSWAV0			      (7 << 0)
2168c2ecf20Sopenharmony_ci
2178c2ecf20Sopenharmony_ci#define CECRCTL3			      0x061c
2188c2ecf20Sopenharmony_ci#define MASK_CECWAV3			      (7 << 20)
2198c2ecf20Sopenharmony_ci#define MASK_CECWAV2			      (7 << 16)
2208c2ecf20Sopenharmony_ci#define MASK_CECWAV1			      (7 << 12)
2218c2ecf20Sopenharmony_ci#define MASK_CECWAV0			      (7 << 8)
2228c2ecf20Sopenharmony_ci#define MASK_CECACKEI			      (1 << 4)
2238c2ecf20Sopenharmony_ci#define MASK_CECMINEI			      (1 << 3)
2248c2ecf20Sopenharmony_ci#define MASK_CECMAXEI			      (1 << 2)
2258c2ecf20Sopenharmony_ci#define MASK_CECRSTEI			      (1 << 1)
2268c2ecf20Sopenharmony_ci#define MASK_CECWAVEI			      (1 << 0)
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_ci#define CECTEN				      0x0620
2298c2ecf20Sopenharmony_ci#define MASK_CECTBUSY			      (1 << 1)
2308c2ecf20Sopenharmony_ci#define MASK_CECTEN			      (1 << 0)
2318c2ecf20Sopenharmony_ci
2328c2ecf20Sopenharmony_ci#define CECTCTL				      0x0628
2338c2ecf20Sopenharmony_ci#define MASK_CECSTRS			      (7 << 20)
2348c2ecf20Sopenharmony_ci#define MASK_CECSPRD			      (7 << 16)
2358c2ecf20Sopenharmony_ci#define MASK_CECDTRS			      (7 << 12)
2368c2ecf20Sopenharmony_ci#define MASK_CECDPRD			      (15 << 8)
2378c2ecf20Sopenharmony_ci#define MASK_CECBRD			      (1 << 4)
2388c2ecf20Sopenharmony_ci#define MASK_CECFREE			      (15 << 0)
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ci#define CECRSTAT			      0x062c
2418c2ecf20Sopenharmony_ci#define MASK_CECRIWA			      (1 << 6)
2428c2ecf20Sopenharmony_ci#define MASK_CECRIOR			      (1 << 5)
2438c2ecf20Sopenharmony_ci#define MASK_CECRIACK			      (1 << 4)
2448c2ecf20Sopenharmony_ci#define MASK_CECRIMIN			      (1 << 3)
2458c2ecf20Sopenharmony_ci#define MASK_CECRIMAX			      (1 << 2)
2468c2ecf20Sopenharmony_ci#define MASK_CECRISTA			      (1 << 1)
2478c2ecf20Sopenharmony_ci#define MASK_CECRIEND			      (1 << 0)
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci#define CECTSTAT			      0x0630
2508c2ecf20Sopenharmony_ci#define MASK_CECTIUR			      (1 << 4)
2518c2ecf20Sopenharmony_ci#define MASK_CECTIACK			      (1 << 3)
2528c2ecf20Sopenharmony_ci#define MASK_CECTIAL			      (1 << 2)
2538c2ecf20Sopenharmony_ci#define MASK_CECTIEND			      (1 << 1)
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ci#define CECRBUF1			      0x0634
2568c2ecf20Sopenharmony_ci#define MASK_CECRACK			      (1 << 9)
2578c2ecf20Sopenharmony_ci#define MASK_CECEOM			      (1 << 8)
2588c2ecf20Sopenharmony_ci#define MASK_CECRBYTE			      (0xff << 0)
2598c2ecf20Sopenharmony_ci
2608c2ecf20Sopenharmony_ci#define CECTBUF1			      0x0674
2618c2ecf20Sopenharmony_ci#define MASK_CECTEOM			      (1 << 8)
2628c2ecf20Sopenharmony_ci#define MASK_CECTBYTE			      (0xff << 0)
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci#define CECRCTR				      0x06b4
2658c2ecf20Sopenharmony_ci#define MASK_CECRCTR			      (0x1f << 0)
2668c2ecf20Sopenharmony_ci
2678c2ecf20Sopenharmony_ci#define CECIMSK				      0x06c0
2688c2ecf20Sopenharmony_ci#define MASK_CECTIM			      (1 << 1)
2698c2ecf20Sopenharmony_ci#define MASK_CECRIM			      (1 << 0)
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_ci#define CECICLR				      0x06cc
2728c2ecf20Sopenharmony_ci#define MASK_CECTICLR			      (1 << 1)
2738c2ecf20Sopenharmony_ci#define MASK_CECRICLR			      (1 << 0)
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ci
2768c2ecf20Sopenharmony_ci#define HDMI_INT0                             0x8500
2778c2ecf20Sopenharmony_ci#define MASK_I_KEY                            0x80
2788c2ecf20Sopenharmony_ci#define MASK_I_MISC                           0x02
2798c2ecf20Sopenharmony_ci#define MASK_I_PHYERR                         0x01
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ci#define HDMI_INT1                             0x8501
2828c2ecf20Sopenharmony_ci#define MASK_I_GBD                            0x80
2838c2ecf20Sopenharmony_ci#define MASK_I_HDCP                           0x40
2848c2ecf20Sopenharmony_ci#define MASK_I_ERR                            0x20
2858c2ecf20Sopenharmony_ci#define MASK_I_AUD                            0x10
2868c2ecf20Sopenharmony_ci#define MASK_I_CBIT                           0x08
2878c2ecf20Sopenharmony_ci#define MASK_I_PACKET                         0x04
2888c2ecf20Sopenharmony_ci#define MASK_I_CLK                            0x02
2898c2ecf20Sopenharmony_ci#define MASK_I_SYS                            0x01
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ci#define SYS_INT                               0x8502
2928c2ecf20Sopenharmony_ci#define MASK_I_ACR_CTS                        0x80
2938c2ecf20Sopenharmony_ci#define MASK_I_ACRN                           0x40
2948c2ecf20Sopenharmony_ci#define MASK_I_DVI                            0x20
2958c2ecf20Sopenharmony_ci#define MASK_I_HDMI                           0x10
2968c2ecf20Sopenharmony_ci#define MASK_I_NOPMBDET                       0x08
2978c2ecf20Sopenharmony_ci#define MASK_I_DPMBDET                        0x04
2988c2ecf20Sopenharmony_ci#define MASK_I_TMDS                           0x02
2998c2ecf20Sopenharmony_ci#define MASK_I_DDC                            0x01
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci#define CLK_INT                               0x8503
3028c2ecf20Sopenharmony_ci#define MASK_I_OUT_H_CHG                      0x40
3038c2ecf20Sopenharmony_ci#define MASK_I_IN_DE_CHG                      0x20
3048c2ecf20Sopenharmony_ci#define MASK_I_IN_HV_CHG                      0x10
3058c2ecf20Sopenharmony_ci#define MASK_I_DC_CHG                         0x08
3068c2ecf20Sopenharmony_ci#define MASK_I_PXCLK_CHG                      0x04
3078c2ecf20Sopenharmony_ci#define MASK_I_PHYCLK_CHG                     0x02
3088c2ecf20Sopenharmony_ci#define MASK_I_TMDSCLK_CHG                    0x01
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_ci#define CBIT_INT                              0x8505
3118c2ecf20Sopenharmony_ci#define MASK_I_AF_LOCK                        0x80
3128c2ecf20Sopenharmony_ci#define MASK_I_AF_UNLOCK                      0x40
3138c2ecf20Sopenharmony_ci#define MASK_I_CBIT_FS                        0x02
3148c2ecf20Sopenharmony_ci
3158c2ecf20Sopenharmony_ci#define AUDIO_INT                             0x8506
3168c2ecf20Sopenharmony_ci
3178c2ecf20Sopenharmony_ci#define ERR_INT                               0x8507
3188c2ecf20Sopenharmony_ci#define MASK_I_EESS_ERR                       0x80
3198c2ecf20Sopenharmony_ci
3208c2ecf20Sopenharmony_ci#define HDCP_INT                              0x8508
3218c2ecf20Sopenharmony_ci#define MASK_I_AVM_SET                        0x80
3228c2ecf20Sopenharmony_ci#define MASK_I_AVM_CLR                        0x40
3238c2ecf20Sopenharmony_ci#define MASK_I_LINKERR                        0x20
3248c2ecf20Sopenharmony_ci#define MASK_I_SHA_END                        0x10
3258c2ecf20Sopenharmony_ci#define MASK_I_R0_END                         0x08
3268c2ecf20Sopenharmony_ci#define MASK_I_KM_END                         0x04
3278c2ecf20Sopenharmony_ci#define MASK_I_AKSV_END                       0x02
3288c2ecf20Sopenharmony_ci#define MASK_I_AN_END                         0x01
3298c2ecf20Sopenharmony_ci
3308c2ecf20Sopenharmony_ci#define MISC_INT                              0x850B
3318c2ecf20Sopenharmony_ci#define MASK_I_AS_LAYOUT                      0x10
3328c2ecf20Sopenharmony_ci#define MASK_I_NO_SPD                         0x08
3338c2ecf20Sopenharmony_ci#define MASK_I_NO_VS                          0x03
3348c2ecf20Sopenharmony_ci#define MASK_I_SYNC_CHG                       0x02
3358c2ecf20Sopenharmony_ci#define MASK_I_AUDIO_MUTE                     0x01
3368c2ecf20Sopenharmony_ci
3378c2ecf20Sopenharmony_ci#define KEY_INT                               0x850F
3388c2ecf20Sopenharmony_ci
3398c2ecf20Sopenharmony_ci#define SYS_INTM                              0x8512
3408c2ecf20Sopenharmony_ci#define MASK_M_ACR_CTS                        0x80
3418c2ecf20Sopenharmony_ci#define MASK_M_ACR_N                          0x40
3428c2ecf20Sopenharmony_ci#define MASK_M_DVI_DET                        0x20
3438c2ecf20Sopenharmony_ci#define MASK_M_HDMI_DET                       0x10
3448c2ecf20Sopenharmony_ci#define MASK_M_NOPMBDET                       0x08
3458c2ecf20Sopenharmony_ci#define MASK_M_BPMBDET                        0x04
3468c2ecf20Sopenharmony_ci#define MASK_M_TMDS                           0x02
3478c2ecf20Sopenharmony_ci#define MASK_M_DDC                            0x01
3488c2ecf20Sopenharmony_ci
3498c2ecf20Sopenharmony_ci#define CLK_INTM                              0x8513
3508c2ecf20Sopenharmony_ci#define MASK_M_OUT_H_CHG                      0x40
3518c2ecf20Sopenharmony_ci#define MASK_M_IN_DE_CHG                      0x20
3528c2ecf20Sopenharmony_ci#define MASK_M_IN_HV_CHG                      0x10
3538c2ecf20Sopenharmony_ci#define MASK_M_DC_CHG                         0x08
3548c2ecf20Sopenharmony_ci#define MASK_M_PXCLK_CHG                      0x04
3558c2ecf20Sopenharmony_ci#define MASK_M_PHYCLK_CHG                     0x02
3568c2ecf20Sopenharmony_ci#define MASK_M_TMDS_CHG                       0x01
3578c2ecf20Sopenharmony_ci
3588c2ecf20Sopenharmony_ci#define PACKET_INTM                           0x8514
3598c2ecf20Sopenharmony_ci
3608c2ecf20Sopenharmony_ci#define CBIT_INTM                             0x8515
3618c2ecf20Sopenharmony_ci#define MASK_M_AF_LOCK                        0x80
3628c2ecf20Sopenharmony_ci#define MASK_M_AF_UNLOCK                      0x40
3638c2ecf20Sopenharmony_ci#define MASK_M_CBIT_FS                        0x02
3648c2ecf20Sopenharmony_ci
3658c2ecf20Sopenharmony_ci#define AUDIO_INTM                            0x8516
3668c2ecf20Sopenharmony_ci#define MASK_M_BUFINIT_END                    0x01
3678c2ecf20Sopenharmony_ci
3688c2ecf20Sopenharmony_ci#define ERR_INTM                              0x8517
3698c2ecf20Sopenharmony_ci#define MASK_M_EESS_ERR                       0x80
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_ci#define HDCP_INTM                             0x8518
3728c2ecf20Sopenharmony_ci#define MASK_M_AVM_SET                        0x80
3738c2ecf20Sopenharmony_ci#define MASK_M_AVM_CLR                        0x40
3748c2ecf20Sopenharmony_ci#define MASK_M_LINKERR                        0x20
3758c2ecf20Sopenharmony_ci#define MASK_M_SHA_END                        0x10
3768c2ecf20Sopenharmony_ci#define MASK_M_R0_END                         0x08
3778c2ecf20Sopenharmony_ci#define MASK_M_KM_END                         0x04
3788c2ecf20Sopenharmony_ci#define MASK_M_AKSV_END                       0x02
3798c2ecf20Sopenharmony_ci#define MASK_M_AN_END                         0x01
3808c2ecf20Sopenharmony_ci
3818c2ecf20Sopenharmony_ci#define MISC_INTM                             0x851B
3828c2ecf20Sopenharmony_ci#define MASK_M_AS_LAYOUT                      0x10
3838c2ecf20Sopenharmony_ci#define MASK_M_NO_SPD                         0x08
3848c2ecf20Sopenharmony_ci#define MASK_M_NO_VS                          0x03
3858c2ecf20Sopenharmony_ci#define MASK_M_SYNC_CHG                       0x02
3868c2ecf20Sopenharmony_ci#define MASK_M_AUDIO_MUTE                     0x01
3878c2ecf20Sopenharmony_ci
3888c2ecf20Sopenharmony_ci#define KEY_INTM                              0x851F
3898c2ecf20Sopenharmony_ci
3908c2ecf20Sopenharmony_ci#define SYS_STATUS                            0x8520
3918c2ecf20Sopenharmony_ci#define MASK_S_SYNC                           0x80
3928c2ecf20Sopenharmony_ci#define MASK_S_AVMUTE                         0x40
3938c2ecf20Sopenharmony_ci#define MASK_S_HDCP                           0x20
3948c2ecf20Sopenharmony_ci#define MASK_S_HDMI                           0x10
3958c2ecf20Sopenharmony_ci#define MASK_S_PHY_SCDT                       0x08
3968c2ecf20Sopenharmony_ci#define MASK_S_PHY_PLL                        0x04
3978c2ecf20Sopenharmony_ci#define MASK_S_TMDS                           0x02
3988c2ecf20Sopenharmony_ci#define MASK_S_DDC5V                          0x01
3998c2ecf20Sopenharmony_ci
4008c2ecf20Sopenharmony_ci#define CSI_STATUS                            0x0410
4018c2ecf20Sopenharmony_ci#define MASK_S_WSYNC                          0x0400
4028c2ecf20Sopenharmony_ci#define MASK_S_TXACT                          0x0200
4038c2ecf20Sopenharmony_ci#define MASK_S_RXACT                          0x0100
4048c2ecf20Sopenharmony_ci#define MASK_S_HLT                            0x0001
4058c2ecf20Sopenharmony_ci
4068c2ecf20Sopenharmony_ci#define VI_STATUS1                            0x8522
4078c2ecf20Sopenharmony_ci#define MASK_S_V_GBD                          0x08
4088c2ecf20Sopenharmony_ci#define MASK_S_DEEPCOLOR                      0x0c
4098c2ecf20Sopenharmony_ci#define MASK_S_V_422                          0x02
4108c2ecf20Sopenharmony_ci#define MASK_S_V_INTERLACE                    0x01
4118c2ecf20Sopenharmony_ci
4128c2ecf20Sopenharmony_ci#define AU_STATUS0                            0x8523
4138c2ecf20Sopenharmony_ci#define MASK_S_A_SAMPLE                       0x01
4148c2ecf20Sopenharmony_ci
4158c2ecf20Sopenharmony_ci#define VI_STATUS3                            0x8528
4168c2ecf20Sopenharmony_ci#define MASK_S_V_COLOR                        0x1e
4178c2ecf20Sopenharmony_ci#define MASK_LIMITED                          0x01
4188c2ecf20Sopenharmony_ci
4198c2ecf20Sopenharmony_ci#define PHY_CTL0                              0x8531
4208c2ecf20Sopenharmony_ci#define MASK_PHY_SYSCLK_IND                   0x02
4218c2ecf20Sopenharmony_ci#define MASK_PHY_CTL                          0x01
4228c2ecf20Sopenharmony_ci
4238c2ecf20Sopenharmony_ci
4248c2ecf20Sopenharmony_ci#define PHY_CTL1                              0x8532 /* Not in REF_01 */
4258c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RST1                    0xf0
4268c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RST1_OFF                0x00
4278c2ecf20Sopenharmony_ci#define SET_PHY_AUTO_RST1_US(us)             ((((us) / 200) << 4) & \
4288c2ecf20Sopenharmony_ci						MASK_PHY_AUTO_RST1)
4298c2ecf20Sopenharmony_ci#define MASK_FREQ_RANGE_MODE                  0x0f
4308c2ecf20Sopenharmony_ci#define SET_FREQ_RANGE_MODE_CYCLES(cycles)   (((cycles) - 1) & \
4318c2ecf20Sopenharmony_ci						MASK_FREQ_RANGE_MODE)
4328c2ecf20Sopenharmony_ci
4338c2ecf20Sopenharmony_ci#define PHY_CTL2                              0x8533 /* Not in REF_01 */
4348c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RST4                    0x04
4358c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RST3                    0x02
4368c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RST2                    0x01
4378c2ecf20Sopenharmony_ci#define MASK_PHY_AUTO_RSTn                    (MASK_PHY_AUTO_RST4 | \
4388c2ecf20Sopenharmony_ci						MASK_PHY_AUTO_RST3 | \
4398c2ecf20Sopenharmony_ci						MASK_PHY_AUTO_RST2)
4408c2ecf20Sopenharmony_ci
4418c2ecf20Sopenharmony_ci#define PHY_EN                                0x8534
4428c2ecf20Sopenharmony_ci#define MASK_ENABLE_PHY                       0x01
4438c2ecf20Sopenharmony_ci
4448c2ecf20Sopenharmony_ci#define PHY_RST                               0x8535
4458c2ecf20Sopenharmony_ci#define MASK_RESET_CTRL                       0x01   /* Reset active low */
4468c2ecf20Sopenharmony_ci
4478c2ecf20Sopenharmony_ci#define PHY_BIAS                              0x8536 /* Not in REF_01 */
4488c2ecf20Sopenharmony_ci
4498c2ecf20Sopenharmony_ci#define PHY_CSQ                               0x853F /* Not in REF_01 */
4508c2ecf20Sopenharmony_ci#define MASK_CSQ_CNT                          0x0f
4518c2ecf20Sopenharmony_ci#define SET_CSQ_CNT_LEVEL(n)                 (n & MASK_CSQ_CNT)
4528c2ecf20Sopenharmony_ci
4538c2ecf20Sopenharmony_ci#define SYS_FREQ0                             0x8540
4548c2ecf20Sopenharmony_ci#define SYS_FREQ1                             0x8541
4558c2ecf20Sopenharmony_ci
4568c2ecf20Sopenharmony_ci#define SYS_CLK                               0x8542 /* Not in REF_01 */
4578c2ecf20Sopenharmony_ci#define MASK_CLK_DIFF                         0x0C
4588c2ecf20Sopenharmony_ci#define MASK_CLK_DIV                          0x03
4598c2ecf20Sopenharmony_ci
4608c2ecf20Sopenharmony_ci#define DDC_CTL                               0x8543
4618c2ecf20Sopenharmony_ci#define MASK_DDC_ACK_POL                      0x08
4628c2ecf20Sopenharmony_ci#define MASK_DDC_ACTION                       0x04
4638c2ecf20Sopenharmony_ci#define MASK_DDC5V_MODE                       0x03
4648c2ecf20Sopenharmony_ci#define MASK_DDC5V_MODE_0MS                   0x00
4658c2ecf20Sopenharmony_ci#define MASK_DDC5V_MODE_50MS                  0x01
4668c2ecf20Sopenharmony_ci#define MASK_DDC5V_MODE_100MS                 0x02
4678c2ecf20Sopenharmony_ci#define MASK_DDC5V_MODE_200MS                 0x03
4688c2ecf20Sopenharmony_ci
4698c2ecf20Sopenharmony_ci#define HPD_CTL                               0x8544
4708c2ecf20Sopenharmony_ci#define MASK_HPD_CTL0                         0x10
4718c2ecf20Sopenharmony_ci#define MASK_HPD_OUT0                         0x01
4728c2ecf20Sopenharmony_ci
4738c2ecf20Sopenharmony_ci#define ANA_CTL                               0x8545
4748c2ecf20Sopenharmony_ci#define MASK_APPL_PCSX                        0x30
4758c2ecf20Sopenharmony_ci#define MASK_APPL_PCSX_HIZ                    0x00
4768c2ecf20Sopenharmony_ci#define MASK_APPL_PCSX_L_FIX                  0x10
4778c2ecf20Sopenharmony_ci#define MASK_APPL_PCSX_H_FIX                  0x20
4788c2ecf20Sopenharmony_ci#define MASK_APPL_PCSX_NORMAL                 0x30
4798c2ecf20Sopenharmony_ci#define MASK_ANALOG_ON                        0x01
4808c2ecf20Sopenharmony_ci
4818c2ecf20Sopenharmony_ci#define AVM_CTL                               0x8546
4828c2ecf20Sopenharmony_ci
4838c2ecf20Sopenharmony_ci#define INIT_END                              0x854A
4848c2ecf20Sopenharmony_ci#define MASK_INIT_END                         0x01
4858c2ecf20Sopenharmony_ci
4868c2ecf20Sopenharmony_ci#define HDMI_DET                              0x8552 /* Not in REF_01 */
4878c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_MOD1                    0x80
4888c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_MOD0                    0x40
4898c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_V                       0x30
4908c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_V_SYNC                  0x00
4918c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_V_ASYNC_25MS            0x10
4928c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_V_ASYNC_50MS            0x20
4938c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_V_ASYNC_100MS           0x30
4948c2ecf20Sopenharmony_ci#define MASK_HDMI_DET_NUM                     0x0f
4958c2ecf20Sopenharmony_ci
4968c2ecf20Sopenharmony_ci#define HDCP_MODE                             0x8560
4978c2ecf20Sopenharmony_ci#define MASK_MODE_RST_TN                      0x20
4988c2ecf20Sopenharmony_ci#define MASK_LINE_REKEY                       0x10
4998c2ecf20Sopenharmony_ci#define MASK_AUTO_CLR                         0x04
5008c2ecf20Sopenharmony_ci#define MASK_MANUAL_AUTHENTICATION            0x02 /* Not in REF_01 */
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci#define HDCP_REG1                             0x8563 /* Not in REF_01 */
5038c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL                  0x70
5048c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_12_FRAMES        0x70
5058c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_8_FRAMES         0x60
5068c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_4_FRAMES         0x50
5078c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_2_FRAMES         0x40
5088c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_64_FRAMES        0x30
5098c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_32_FRAMES        0x20
5108c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_16_FRAMES        0x10
5118c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_SEL_ONCE             0x00
5128c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH                      0x01
5138c2ecf20Sopenharmony_ci#define MASK_AUTH_UNAUTH_AUTO                 0x01
5148c2ecf20Sopenharmony_ci
5158c2ecf20Sopenharmony_ci#define HDCP_REG2                             0x8564 /* Not in REF_01 */
5168c2ecf20Sopenharmony_ci#define MASK_AUTO_P3_RESET                    0x0F
5178c2ecf20Sopenharmony_ci#define SET_AUTO_P3_RESET_FRAMES(n)          (n & MASK_AUTO_P3_RESET)
5188c2ecf20Sopenharmony_ci#define MASK_AUTO_P3_RESET_OFF                0x00
5198c2ecf20Sopenharmony_ci
5208c2ecf20Sopenharmony_ci#define VI_MODE                               0x8570
5218c2ecf20Sopenharmony_ci#define MASK_RGB_DVI                          0x08 /* Not in REF_01 */
5228c2ecf20Sopenharmony_ci
5238c2ecf20Sopenharmony_ci#define VOUT_SET2                             0x8573
5248c2ecf20Sopenharmony_ci#define MASK_SEL422                           0x80
5258c2ecf20Sopenharmony_ci#define MASK_VOUT_422FIL_100                  0x40
5268c2ecf20Sopenharmony_ci#define MASK_VOUTCOLORMODE                    0x03
5278c2ecf20Sopenharmony_ci#define MASK_VOUTCOLORMODE_THROUGH            0x00
5288c2ecf20Sopenharmony_ci#define MASK_VOUTCOLORMODE_AUTO               0x01
5298c2ecf20Sopenharmony_ci#define MASK_VOUTCOLORMODE_MANUAL             0x03
5308c2ecf20Sopenharmony_ci
5318c2ecf20Sopenharmony_ci#define VOUT_SET3                             0x8574
5328c2ecf20Sopenharmony_ci#define MASK_VOUT_EXTCNT                      0x08
5338c2ecf20Sopenharmony_ci
5348c2ecf20Sopenharmony_ci#define VI_REP                                0x8576
5358c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_SEL                   0xe0
5368c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_RGB_FULL              0x00
5378c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_RGB_LIMITED           0x20
5388c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_601_YCBCR_FULL        0x40
5398c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_601_YCBCR_LIMITED     0x60
5408c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_709_YCBCR_FULL        0x80
5418c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_709_YCBCR_LIMITED     0xa0
5428c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_FULL_TO_LIMITED       0xc0
5438c2ecf20Sopenharmony_ci#define MASK_VOUT_COLOR_LIMITED_TO_FULL       0xe0
5448c2ecf20Sopenharmony_ci#define MASK_IN_REP_HEN                       0x10
5458c2ecf20Sopenharmony_ci#define MASK_IN_REP                           0x0f
5468c2ecf20Sopenharmony_ci
5478c2ecf20Sopenharmony_ci#define VI_MUTE                               0x857F
5488c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE                        0xc0
5498c2ecf20Sopenharmony_ci#define MASK_VI_MUTE                          0x10
5508c2ecf20Sopenharmony_ci
5518c2ecf20Sopenharmony_ci#define DE_WIDTH_H_LO                         0x8582 /* Not in REF_01 */
5528c2ecf20Sopenharmony_ci#define DE_WIDTH_H_HI                         0x8583 /* Not in REF_01 */
5538c2ecf20Sopenharmony_ci#define DE_WIDTH_V_LO                         0x8588 /* Not in REF_01 */
5548c2ecf20Sopenharmony_ci#define DE_WIDTH_V_HI                         0x8589 /* Not in REF_01 */
5558c2ecf20Sopenharmony_ci#define H_SIZE_LO                             0x858A /* Not in REF_01 */
5568c2ecf20Sopenharmony_ci#define H_SIZE_HI                             0x858B /* Not in REF_01 */
5578c2ecf20Sopenharmony_ci#define V_SIZE_LO                             0x858C /* Not in REF_01 */
5588c2ecf20Sopenharmony_ci#define V_SIZE_HI                             0x858D /* Not in REF_01 */
5598c2ecf20Sopenharmony_ci#define FV_CNT_LO                             0x85A1 /* Not in REF_01 */
5608c2ecf20Sopenharmony_ci#define FV_CNT_HI                             0x85A2 /* Not in REF_01 */
5618c2ecf20Sopenharmony_ci
5628c2ecf20Sopenharmony_ci#define FH_MIN0                               0x85AA /* Not in REF_01 */
5638c2ecf20Sopenharmony_ci#define FH_MIN1                               0x85AB /* Not in REF_01 */
5648c2ecf20Sopenharmony_ci#define FH_MAX0                               0x85AC /* Not in REF_01 */
5658c2ecf20Sopenharmony_ci#define FH_MAX1                               0x85AD /* Not in REF_01 */
5668c2ecf20Sopenharmony_ci
5678c2ecf20Sopenharmony_ci#define HV_RST                                0x85AF /* Not in REF_01 */
5688c2ecf20Sopenharmony_ci#define MASK_H_PI_RST                         0x20
5698c2ecf20Sopenharmony_ci#define MASK_V_PI_RST                         0x10
5708c2ecf20Sopenharmony_ci
5718c2ecf20Sopenharmony_ci#define EDID_MODE                             0x85C7
5728c2ecf20Sopenharmony_ci#define MASK_EDID_SPEED                       0x40
5738c2ecf20Sopenharmony_ci#define MASK_EDID_MODE                        0x03
5748c2ecf20Sopenharmony_ci#define MASK_EDID_MODE_DISABLE                0x00
5758c2ecf20Sopenharmony_ci#define MASK_EDID_MODE_DDC2B                  0x01
5768c2ecf20Sopenharmony_ci#define MASK_EDID_MODE_E_DDC                  0x02
5778c2ecf20Sopenharmony_ci
5788c2ecf20Sopenharmony_ci#define EDID_LEN1                             0x85CA
5798c2ecf20Sopenharmony_ci#define EDID_LEN2                             0x85CB
5808c2ecf20Sopenharmony_ci
5818c2ecf20Sopenharmony_ci#define HDCP_REG3                             0x85D1 /* Not in REF_01 */
5828c2ecf20Sopenharmony_ci#define KEY_RD_CMD                            0x01
5838c2ecf20Sopenharmony_ci
5848c2ecf20Sopenharmony_ci#define FORCE_MUTE                            0x8600
5858c2ecf20Sopenharmony_ci#define MASK_FORCE_AMUTE                      0x10
5868c2ecf20Sopenharmony_ci#define MASK_FORCE_DMUTE                      0x01
5878c2ecf20Sopenharmony_ci
5888c2ecf20Sopenharmony_ci#define CMD_AUD                               0x8601
5898c2ecf20Sopenharmony_ci#define MASK_CMD_BUFINIT                      0x04
5908c2ecf20Sopenharmony_ci#define MASK_CMD_LOCKDET                      0x02
5918c2ecf20Sopenharmony_ci#define MASK_CMD_MUTE                         0x01
5928c2ecf20Sopenharmony_ci
5938c2ecf20Sopenharmony_ci#define AUTO_CMD0                             0x8602
5948c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE7                       0x80
5958c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE6                       0x40
5968c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE5                       0x20
5978c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE4                       0x10
5988c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE3                       0x08
5998c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE2                       0x04
6008c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE1                       0x02
6018c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE0                       0x01
6028c2ecf20Sopenharmony_ci
6038c2ecf20Sopenharmony_ci#define AUTO_CMD1                             0x8603
6048c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE10                      0x04
6058c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE9                       0x02
6068c2ecf20Sopenharmony_ci#define MASK_AUTO_MUTE8                       0x01
6078c2ecf20Sopenharmony_ci
6088c2ecf20Sopenharmony_ci#define AUTO_CMD2                             0x8604
6098c2ecf20Sopenharmony_ci#define MASK_AUTO_PLAY3                       0x08
6108c2ecf20Sopenharmony_ci#define MASK_AUTO_PLAY2                       0x04
6118c2ecf20Sopenharmony_ci
6128c2ecf20Sopenharmony_ci#define BUFINIT_START                         0x8606
6138c2ecf20Sopenharmony_ci#define SET_BUFINIT_START_MS(milliseconds)   ((milliseconds) / 100)
6148c2ecf20Sopenharmony_ci
6158c2ecf20Sopenharmony_ci#define FS_MUTE                               0x8607
6168c2ecf20Sopenharmony_ci#define MASK_FS_ELSE_MUTE                     0x80
6178c2ecf20Sopenharmony_ci#define MASK_FS22_MUTE                        0x40
6188c2ecf20Sopenharmony_ci#define MASK_FS24_MUTE                        0x20
6198c2ecf20Sopenharmony_ci#define MASK_FS88_MUTE                        0x10
6208c2ecf20Sopenharmony_ci#define MASK_FS96_MUTE                        0x08
6218c2ecf20Sopenharmony_ci#define MASK_FS176_MUTE                       0x04
6228c2ecf20Sopenharmony_ci#define MASK_FS192_MUTE                       0x02
6238c2ecf20Sopenharmony_ci#define MASK_FS_NO_MUTE                       0x01
6248c2ecf20Sopenharmony_ci
6258c2ecf20Sopenharmony_ci#define FS_IMODE                              0x8620
6268c2ecf20Sopenharmony_ci#define MASK_NLPCM_HMODE                      0x40
6278c2ecf20Sopenharmony_ci#define MASK_NLPCM_SMODE                      0x20
6288c2ecf20Sopenharmony_ci#define MASK_NLPCM_IMODE                      0x10
6298c2ecf20Sopenharmony_ci#define MASK_FS_HMODE                         0x08
6308c2ecf20Sopenharmony_ci#define MASK_FS_AMODE                         0x04
6318c2ecf20Sopenharmony_ci#define MASK_FS_SMODE                         0x02
6328c2ecf20Sopenharmony_ci#define MASK_FS_IMODE                         0x01
6338c2ecf20Sopenharmony_ci
6348c2ecf20Sopenharmony_ci#define FS_SET                                0x8621
6358c2ecf20Sopenharmony_ci#define MASK_FS                               0x0f
6368c2ecf20Sopenharmony_ci
6378c2ecf20Sopenharmony_ci#define LOCKDET_REF0                          0x8630
6388c2ecf20Sopenharmony_ci#define LOCKDET_REF1                          0x8631
6398c2ecf20Sopenharmony_ci#define LOCKDET_REF2                          0x8632
6408c2ecf20Sopenharmony_ci
6418c2ecf20Sopenharmony_ci#define ACR_MODE                              0x8640
6428c2ecf20Sopenharmony_ci#define MASK_ACR_LOAD                         0x10
6438c2ecf20Sopenharmony_ci#define MASK_N_MODE                           0x04
6448c2ecf20Sopenharmony_ci#define MASK_CTS_MODE                         0x01
6458c2ecf20Sopenharmony_ci
6468c2ecf20Sopenharmony_ci#define ACR_MDF0                              0x8641
6478c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF                        0x70
6488c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_0_PPM                  0x00
6498c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_61_PPM                 0x10
6508c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_122_PPM                0x20
6518c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_244_PPM                0x30
6528c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_488_PPM                0x40
6538c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_976_PPM                0x50
6548c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_1976_PPM               0x60
6558c2ecf20Sopenharmony_ci#define MASK_ACR_L2MDF_3906_PPM               0x70
6568c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF                        0x07
6578c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_0_PPM                  0x00
6588c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_61_PPM                 0x01
6598c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_122_PPM                0x02
6608c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_244_PPM                0x03
6618c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_488_PPM                0x04
6628c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_976_PPM                0x05
6638c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_1976_PPM               0x06
6648c2ecf20Sopenharmony_ci#define MASK_ACR_L1MDF_3906_PPM               0x07
6658c2ecf20Sopenharmony_ci
6668c2ecf20Sopenharmony_ci#define ACR_MDF1                              0x8642
6678c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF                        0x07
6688c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_0_PPM                  0x00
6698c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_61_PPM                 0x01
6708c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_122_PPM                0x02
6718c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_244_PPM                0x03
6728c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_488_PPM                0x04
6738c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_976_PPM                0x05
6748c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_1976_PPM               0x06
6758c2ecf20Sopenharmony_ci#define MASK_ACR_L3MDF_3906_PPM               0x07
6768c2ecf20Sopenharmony_ci
6778c2ecf20Sopenharmony_ci#define SDO_MODE1                             0x8652
6788c2ecf20Sopenharmony_ci#define MASK_SDO_BIT_LENG                     0x70
6798c2ecf20Sopenharmony_ci#define MASK_SDO_FMT                          0x03
6808c2ecf20Sopenharmony_ci#define MASK_SDO_FMT_RIGHT                    0x00
6818c2ecf20Sopenharmony_ci#define MASK_SDO_FMT_LEFT                     0x01
6828c2ecf20Sopenharmony_ci#define MASK_SDO_FMT_I2S                      0x02
6838c2ecf20Sopenharmony_ci
6848c2ecf20Sopenharmony_ci#define DIV_MODE                              0x8665 /* Not in REF_01 */
6858c2ecf20Sopenharmony_ci#define MASK_DIV_DLY                          0xf0
6868c2ecf20Sopenharmony_ci#define SET_DIV_DLY_MS(milliseconds)         ((((milliseconds) / 100) << 4) & \
6878c2ecf20Sopenharmony_ci						MASK_DIV_DLY)
6888c2ecf20Sopenharmony_ci#define MASK_DIV_MODE                         0x01
6898c2ecf20Sopenharmony_ci
6908c2ecf20Sopenharmony_ci#define NCO_F0_MOD                            0x8670
6918c2ecf20Sopenharmony_ci#define MASK_NCO_F0_MOD                       0x03
6928c2ecf20Sopenharmony_ci#define MASK_NCO_F0_MOD_42MHZ                 0x00
6938c2ecf20Sopenharmony_ci#define MASK_NCO_F0_MOD_27MHZ                 0x01
6948c2ecf20Sopenharmony_ci
6958c2ecf20Sopenharmony_ci#define PK_INT_MODE                           0x8709
6968c2ecf20Sopenharmony_ci#define MASK_ISRC2_INT_MODE                   0x80
6978c2ecf20Sopenharmony_ci#define MASK_ISRC_INT_MODE                    0x40
6988c2ecf20Sopenharmony_ci#define MASK_ACP_INT_MODE                     0x20
6998c2ecf20Sopenharmony_ci#define MASK_VS_INT_MODE                      0x10
7008c2ecf20Sopenharmony_ci#define MASK_SPD_INT_MODE                     0x08
7018c2ecf20Sopenharmony_ci#define MASK_MS_INT_MODE                      0x04
7028c2ecf20Sopenharmony_ci#define MASK_AUD_INT_MODE                     0x02
7038c2ecf20Sopenharmony_ci#define MASK_AVI_INT_MODE                     0x01
7048c2ecf20Sopenharmony_ci
7058c2ecf20Sopenharmony_ci#define NO_PKT_LIMIT                          0x870B
7068c2ecf20Sopenharmony_ci#define MASK_NO_ACP_LIMIT                     0xf0
7078c2ecf20Sopenharmony_ci#define SET_NO_ACP_LIMIT_MS(milliseconds)    ((((milliseconds) / 80) << 4) & \
7088c2ecf20Sopenharmony_ci						MASK_NO_ACP_LIMIT)
7098c2ecf20Sopenharmony_ci#define MASK_NO_AVI_LIMIT                     0x0f
7108c2ecf20Sopenharmony_ci#define SET_NO_AVI_LIMIT_MS(milliseconds)    (((milliseconds) / 80) & \
7118c2ecf20Sopenharmony_ci						MASK_NO_AVI_LIMIT)
7128c2ecf20Sopenharmony_ci
7138c2ecf20Sopenharmony_ci#define NO_PKT_CLR                            0x870C
7148c2ecf20Sopenharmony_ci#define MASK_NO_VS_CLR                        0x40
7158c2ecf20Sopenharmony_ci#define MASK_NO_SPD_CLR                       0x20
7168c2ecf20Sopenharmony_ci#define MASK_NO_ACP_CLR                       0x10
7178c2ecf20Sopenharmony_ci#define MASK_NO_AVI_CLR1                      0x02
7188c2ecf20Sopenharmony_ci#define MASK_NO_AVI_CLR0                      0x01
7198c2ecf20Sopenharmony_ci
7208c2ecf20Sopenharmony_ci#define ERR_PK_LIMIT                          0x870D
7218c2ecf20Sopenharmony_ci#define NO_PKT_LIMIT2                         0x870E
7228c2ecf20Sopenharmony_ci#define PK_AVI_0HEAD                          0x8710
7238c2ecf20Sopenharmony_ci#define PK_AVI_1HEAD                          0x8711
7248c2ecf20Sopenharmony_ci#define PK_AVI_2HEAD                          0x8712
7258c2ecf20Sopenharmony_ci#define PK_AVI_0BYTE                          0x8713
7268c2ecf20Sopenharmony_ci#define PK_AVI_1BYTE                          0x8714
7278c2ecf20Sopenharmony_ci#define PK_AVI_2BYTE                          0x8715
7288c2ecf20Sopenharmony_ci#define PK_AVI_3BYTE                          0x8716
7298c2ecf20Sopenharmony_ci#define PK_AVI_4BYTE                          0x8717
7308c2ecf20Sopenharmony_ci#define PK_AVI_5BYTE                          0x8718
7318c2ecf20Sopenharmony_ci#define PK_AVI_6BYTE                          0x8719
7328c2ecf20Sopenharmony_ci#define PK_AVI_7BYTE                          0x871A
7338c2ecf20Sopenharmony_ci#define PK_AVI_8BYTE                          0x871B
7348c2ecf20Sopenharmony_ci#define PK_AVI_9BYTE                          0x871C
7358c2ecf20Sopenharmony_ci#define PK_AVI_10BYTE                         0x871D
7368c2ecf20Sopenharmony_ci#define PK_AVI_11BYTE                         0x871E
7378c2ecf20Sopenharmony_ci#define PK_AVI_12BYTE                         0x871F
7388c2ecf20Sopenharmony_ci#define PK_AVI_13BYTE                         0x8720
7398c2ecf20Sopenharmony_ci#define PK_AVI_14BYTE                         0x8721
7408c2ecf20Sopenharmony_ci#define PK_AVI_15BYTE                         0x8722
7418c2ecf20Sopenharmony_ci#define PK_AVI_16BYTE                         0x8723
7428c2ecf20Sopenharmony_ci
7438c2ecf20Sopenharmony_ci#define BKSV                                  0x8800
7448c2ecf20Sopenharmony_ci
7458c2ecf20Sopenharmony_ci#define BCAPS                                 0x8840
7468c2ecf20Sopenharmony_ci#define MASK_HDMI_RSVD                        0x80
7478c2ecf20Sopenharmony_ci#define MASK_REPEATER                         0x40
7488c2ecf20Sopenharmony_ci#define MASK_READY                            0x20
7498c2ecf20Sopenharmony_ci#define MASK_FASTI2C                          0x10
7508c2ecf20Sopenharmony_ci#define MASK_1_1_FEA                          0x02
7518c2ecf20Sopenharmony_ci#define MASK_FAST_REAU                        0x01
7528c2ecf20Sopenharmony_ci
7538c2ecf20Sopenharmony_ci#define BSTATUS1                              0x8842
7548c2ecf20Sopenharmony_ci#define MASK_MAX_EXCED                        0x08
7558c2ecf20Sopenharmony_ci
7568c2ecf20Sopenharmony_ci#define EDID_RAM                              0x8C00
7578c2ecf20Sopenharmony_ci#define NO_GDB_LIMIT                          0x9007
7588c2ecf20Sopenharmony_ci
7598c2ecf20Sopenharmony_ci#endif
760