xref: /linux/include/drm/display/drm_scdc.h (revision 644edf52b6305506ba7fd552323c1dfaa9cf6d8d)
1*644edf52SThomas Zimmermann /*
2*644edf52SThomas Zimmermann  * Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
3*644edf52SThomas Zimmermann  *
4*644edf52SThomas Zimmermann  * Permission is hereby granted, free of charge, to any person obtaining a
5*644edf52SThomas Zimmermann  * copy of this software and associated documentation files (the "Software"),
6*644edf52SThomas Zimmermann  * to deal in the Software without restriction, including without limitation
7*644edf52SThomas Zimmermann  * the rights to use, copy, modify, merge, publish, distribute, sub license,
8*644edf52SThomas Zimmermann  * and/or sell copies of the Software, and to permit persons to whom the
9*644edf52SThomas Zimmermann  * Software is furnished to do so, subject to the following conditions:
10*644edf52SThomas Zimmermann  *
11*644edf52SThomas Zimmermann  * The above copyright notice and this permission notice (including the
12*644edf52SThomas Zimmermann  * next paragraph) shall be included in all copies or substantial portions
13*644edf52SThomas Zimmermann  * of the Software.
14*644edf52SThomas Zimmermann  *
15*644edf52SThomas Zimmermann  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16*644edf52SThomas Zimmermann  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*644edf52SThomas Zimmermann  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18*644edf52SThomas Zimmermann  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19*644edf52SThomas Zimmermann  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20*644edf52SThomas Zimmermann  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21*644edf52SThomas Zimmermann  * DEALINGS IN THE SOFTWARE.
22*644edf52SThomas Zimmermann  */
23*644edf52SThomas Zimmermann 
24*644edf52SThomas Zimmermann #ifndef DRM_SCDC_H
25*644edf52SThomas Zimmermann #define DRM_SCDC_H
26*644edf52SThomas Zimmermann 
27*644edf52SThomas Zimmermann #define SCDC_SINK_VERSION 0x01
28*644edf52SThomas Zimmermann 
29*644edf52SThomas Zimmermann #define SCDC_SOURCE_VERSION 0x02
30*644edf52SThomas Zimmermann 
31*644edf52SThomas Zimmermann #define SCDC_UPDATE_0 0x10
32*644edf52SThomas Zimmermann #define  SCDC_READ_REQUEST_TEST (1 << 2)
33*644edf52SThomas Zimmermann #define  SCDC_CED_UPDATE (1 << 1)
34*644edf52SThomas Zimmermann #define  SCDC_STATUS_UPDATE (1 << 0)
35*644edf52SThomas Zimmermann 
36*644edf52SThomas Zimmermann #define SCDC_UPDATE_1 0x11
37*644edf52SThomas Zimmermann 
38*644edf52SThomas Zimmermann #define SCDC_TMDS_CONFIG 0x20
39*644edf52SThomas Zimmermann #define  SCDC_TMDS_BIT_CLOCK_RATIO_BY_40 (1 << 1)
40*644edf52SThomas Zimmermann #define  SCDC_TMDS_BIT_CLOCK_RATIO_BY_10 (0 << 1)
41*644edf52SThomas Zimmermann #define  SCDC_SCRAMBLING_ENABLE (1 << 0)
42*644edf52SThomas Zimmermann 
43*644edf52SThomas Zimmermann #define SCDC_SCRAMBLER_STATUS 0x21
44*644edf52SThomas Zimmermann #define  SCDC_SCRAMBLING_STATUS (1 << 0)
45*644edf52SThomas Zimmermann 
46*644edf52SThomas Zimmermann #define SCDC_CONFIG_0 0x30
47*644edf52SThomas Zimmermann #define  SCDC_READ_REQUEST_ENABLE (1 << 0)
48*644edf52SThomas Zimmermann 
49*644edf52SThomas Zimmermann #define SCDC_STATUS_FLAGS_0 0x40
50*644edf52SThomas Zimmermann #define  SCDC_CH2_LOCK (1 << 3)
51*644edf52SThomas Zimmermann #define  SCDC_CH1_LOCK (1 << 2)
52*644edf52SThomas Zimmermann #define  SCDC_CH0_LOCK (1 << 1)
53*644edf52SThomas Zimmermann #define  SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
54*644edf52SThomas Zimmermann #define  SCDC_CLOCK_DETECT (1 << 0)
55*644edf52SThomas Zimmermann 
56*644edf52SThomas Zimmermann #define SCDC_STATUS_FLAGS_1 0x41
57*644edf52SThomas Zimmermann 
58*644edf52SThomas Zimmermann #define SCDC_ERR_DET_0_L 0x50
59*644edf52SThomas Zimmermann #define SCDC_ERR_DET_0_H 0x51
60*644edf52SThomas Zimmermann #define SCDC_ERR_DET_1_L 0x52
61*644edf52SThomas Zimmermann #define SCDC_ERR_DET_1_H 0x53
62*644edf52SThomas Zimmermann #define SCDC_ERR_DET_2_L 0x54
63*644edf52SThomas Zimmermann #define SCDC_ERR_DET_2_H 0x55
64*644edf52SThomas Zimmermann #define  SCDC_CHANNEL_VALID (1 << 7)
65*644edf52SThomas Zimmermann 
66*644edf52SThomas Zimmermann #define SCDC_ERR_DET_CHECKSUM 0x56
67*644edf52SThomas Zimmermann 
68*644edf52SThomas Zimmermann #define SCDC_TEST_CONFIG_0 0xc0
69*644edf52SThomas Zimmermann #define  SCDC_TEST_READ_REQUEST (1 << 7)
70*644edf52SThomas Zimmermann #define  SCDC_TEST_READ_REQUEST_DELAY(x) ((x) & 0x7f)
71*644edf52SThomas Zimmermann 
72*644edf52SThomas Zimmermann #define SCDC_MANUFACTURER_IEEE_OUI 0xd0
73*644edf52SThomas Zimmermann #define SCDC_MANUFACTURER_IEEE_OUI_SIZE 3
74*644edf52SThomas Zimmermann 
75*644edf52SThomas Zimmermann #define SCDC_DEVICE_ID 0xd3
76*644edf52SThomas Zimmermann #define SCDC_DEVICE_ID_SIZE 8
77*644edf52SThomas Zimmermann 
78*644edf52SThomas Zimmermann #define SCDC_DEVICE_HARDWARE_REVISION 0xdb
79*644edf52SThomas Zimmermann #define  SCDC_GET_DEVICE_HARDWARE_REVISION_MAJOR(x) (((x) >> 4) & 0xf)
80*644edf52SThomas Zimmermann #define  SCDC_GET_DEVICE_HARDWARE_REVISION_MINOR(x) (((x) >> 0) & 0xf)
81*644edf52SThomas Zimmermann 
82*644edf52SThomas Zimmermann #define SCDC_DEVICE_SOFTWARE_MAJOR_REVISION 0xdc
83*644edf52SThomas Zimmermann #define SCDC_DEVICE_SOFTWARE_MINOR_REVISION 0xdd
84*644edf52SThomas Zimmermann 
85*644edf52SThomas Zimmermann #define SCDC_MANUFACTURER_SPECIFIC 0xde
86*644edf52SThomas Zimmermann #define SCDC_MANUFACTURER_SPECIFIC_SIZE 34
87*644edf52SThomas Zimmermann 
88*644edf52SThomas Zimmermann #endif
89