xref: /openbmc/linux/drivers/misc/mei/hdcp/mei_hdcp.h (revision 6a99099fe1d6c46cbcd74298eeb386c4b9048f77)
1514c37e3STomas Winkler /* SPDX-License-Identifier: GPL-2.0 */
2cf8ecce2SRamalingam C /*
3cf8ecce2SRamalingam C  * Copyright © 2019 Intel Corporation
4cf8ecce2SRamalingam C  *
5cf8ecce2SRamalingam C  * Authors:
6cf8ecce2SRamalingam C  * Ramalingam C <ramalingam.c@intel.com>
7cf8ecce2SRamalingam C  */
8cf8ecce2SRamalingam C 
9cf8ecce2SRamalingam C #ifndef __MEI_HDCP_H__
10cf8ecce2SRamalingam C #define __MEI_HDCP_H__
11cf8ecce2SRamalingam C 
12*6a99099fSThomas Zimmermann #include <drm/display/drm_hdcp.h>
13cf8ecce2SRamalingam C 
14cf8ecce2SRamalingam C /* me_hdcp_status: Enumeration of all HDCP Status Codes */
15cf8ecce2SRamalingam C enum me_hdcp_status {
16cf8ecce2SRamalingam C 	ME_HDCP_STATUS_SUCCESS			= 0x0000,
17cf8ecce2SRamalingam C 
18cf8ecce2SRamalingam C 	/* WiDi Generic Status Codes */
19cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INTERNAL_ERROR		= 0x1000,
20cf8ecce2SRamalingam C 	ME_HDCP_STATUS_UNKNOWN_ERROR		= 0x1001,
21cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INCORRECT_API_VERSION	= 0x1002,
22cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_FUNCTION		= 0x1003,
23cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_BUFFER_LENGTH	= 0x1004,
24cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_PARAMS		= 0x1005,
25cf8ecce2SRamalingam C 	ME_HDCP_STATUS_AUTHENTICATION_FAILED	= 0x1006,
26cf8ecce2SRamalingam C 
27cf8ecce2SRamalingam C 	/* WiDi Status Codes */
28cf8ecce2SRamalingam C 	ME_HDCP_INVALID_SESSION_STATE		= 0x6000,
29cf8ecce2SRamalingam C 	ME_HDCP_SRM_FRAGMENT_UNEXPECTED		= 0x6001,
30cf8ecce2SRamalingam C 	ME_HDCP_SRM_INVALID_LENGTH		= 0x6002,
31cf8ecce2SRamalingam C 	ME_HDCP_SRM_FRAGMENT_OFFSET_INVALID	= 0x6003,
32cf8ecce2SRamalingam C 	ME_HDCP_SRM_VERIFICATION_FAILED		= 0x6004,
33cf8ecce2SRamalingam C 	ME_HDCP_SRM_VERSION_TOO_OLD		= 0x6005,
34cf8ecce2SRamalingam C 	ME_HDCP_RX_CERT_VERIFICATION_FAILED	= 0x6006,
35cf8ecce2SRamalingam C 	ME_HDCP_RX_REVOKED			= 0x6007,
36cf8ecce2SRamalingam C 	ME_HDCP_H_VERIFICATION_FAILED		= 0x6008,
37cf8ecce2SRamalingam C 	ME_HDCP_REPEATER_CHECK_UNEXPECTED	= 0x6009,
38cf8ecce2SRamalingam C 	ME_HDCP_TOPOLOGY_MAX_EXCEEDED		= 0x600A,
39cf8ecce2SRamalingam C 	ME_HDCP_V_VERIFICATION_FAILED		= 0x600B,
40cf8ecce2SRamalingam C 	ME_HDCP_L_VERIFICATION_FAILED		= 0x600C,
41cf8ecce2SRamalingam C 	ME_HDCP_STREAM_KEY_ALLOC_FAILED		= 0x600D,
42cf8ecce2SRamalingam C 	ME_HDCP_BASE_KEY_RESET_FAILED		= 0x600E,
43cf8ecce2SRamalingam C 	ME_HDCP_NONCE_GENERATION_FAILED		= 0x600F,
44cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_E_KEY_STATE	= 0x6010,
45cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_CS_ICV		= 0x6011,
46cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_KB_KEY_STATE	= 0x6012,
47cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_PAVP_MODE_ICV	= 0x6013,
48cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_PAVP_MODE	= 0x6014,
49cf8ecce2SRamalingam C 	ME_HDCP_STATUS_LC_MAX_ATTEMPTS		= 0x6015,
50cf8ecce2SRamalingam C 
51cf8ecce2SRamalingam C 	/* New status for HDCP 2.1 */
52cf8ecce2SRamalingam C 	ME_HDCP_STATUS_MISMATCH_IN_M		= 0x6016,
53cf8ecce2SRamalingam C 
54cf8ecce2SRamalingam C 	/* New status code for HDCP 2.2 Rx */
55cf8ecce2SRamalingam C 	ME_HDCP_STATUS_RX_PROV_NOT_ALLOWED	= 0x6017,
56cf8ecce2SRamalingam C 	ME_HDCP_STATUS_RX_PROV_WRONG_SUBJECT	= 0x6018,
57cf8ecce2SRamalingam C 	ME_HDCP_RX_NEEDS_PROVISIONING		= 0x6019,
58cf8ecce2SRamalingam C 	ME_HDCP_BKSV_ICV_AUTH_FAILED		= 0x6020,
59cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_STREAM_ID	= 0x6021,
60cf8ecce2SRamalingam C 	ME_HDCP_STATUS_CHAIN_NOT_INITIALIZED	= 0x6022,
61cf8ecce2SRamalingam C 	ME_HDCP_FAIL_NOT_EXPECTED		= 0x6023,
62cf8ecce2SRamalingam C 	ME_HDCP_FAIL_HDCP_OFF			= 0x6024,
63cf8ecce2SRamalingam C 	ME_HDCP_FAIL_INVALID_PAVP_MEMORY_MODE	= 0x6025,
64cf8ecce2SRamalingam C 	ME_HDCP_FAIL_AES_ECB_FAILURE		= 0x6026,
65cf8ecce2SRamalingam C 	ME_HDCP_FEATURE_NOT_SUPPORTED		= 0x6027,
66cf8ecce2SRamalingam C 	ME_HDCP_DMA_READ_ERROR			= 0x6028,
67cf8ecce2SRamalingam C 	ME_HDCP_DMA_WRITE_ERROR			= 0x6029,
68cf8ecce2SRamalingam C 	ME_HDCP_FAIL_INVALID_PACKET_SIZE	= 0x6030,
69cf8ecce2SRamalingam C 	ME_HDCP_H264_PARSING_ERROR		= 0x6031,
70cf8ecce2SRamalingam C 	ME_HDCP_HDCP2_ERRATA_VIDEO_VIOLATION	= 0x6032,
71cf8ecce2SRamalingam C 	ME_HDCP_HDCP2_ERRATA_AUDIO_VIOLATION	= 0x6033,
72cf8ecce2SRamalingam C 	ME_HDCP_TX_ACTIVE_ERROR			= 0x6034,
73cf8ecce2SRamalingam C 	ME_HDCP_MODE_CHANGE_ERROR		= 0x6035,
74cf8ecce2SRamalingam C 	ME_HDCP_STREAM_TYPE_ERROR		= 0x6036,
75cf8ecce2SRamalingam C 	ME_HDCP_STREAM_MANAGE_NOT_POSSIBLE	= 0x6037,
76cf8ecce2SRamalingam C 
77cf8ecce2SRamalingam C 	ME_HDCP_STATUS_PORT_INVALID_COMMAND	= 0x6038,
78cf8ecce2SRamalingam C 	ME_HDCP_STATUS_UNSUPPORTED_PROTOCOL	= 0x6039,
79cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_PORT_INDEX	= 0x603a,
80cf8ecce2SRamalingam C 	ME_HDCP_STATUS_TX_AUTH_NEEDED		= 0x603b,
81cf8ecce2SRamalingam C 	ME_HDCP_STATUS_NOT_INTEGRATED_PORT	= 0x603c,
82cf8ecce2SRamalingam C 	ME_HDCP_STATUS_SESSION_MAX_REACHED	= 0x603d,
83cf8ecce2SRamalingam C 
84cf8ecce2SRamalingam C 	/* hdcp capable bit is not set in rx_caps(error is unique to DP) */
85cf8ecce2SRamalingam C 	ME_HDCP_STATUS_NOT_HDCP_CAPABLE		= 0x6041,
86cf8ecce2SRamalingam C 
87cf8ecce2SRamalingam C 	ME_HDCP_STATUS_INVALID_STREAM_COUNT	= 0x6042,
88cf8ecce2SRamalingam C };
89cf8ecce2SRamalingam C 
90cf8ecce2SRamalingam C #define HDCP_API_VERSION				0x00010000
91cf8ecce2SRamalingam C 
92cf8ecce2SRamalingam C #define HDCP_M_LEN					16
93cf8ecce2SRamalingam C #define HDCP_KH_LEN					16
94cf8ecce2SRamalingam C 
95cf8ecce2SRamalingam C /* Payload Buffer size(Excluding Header) for CMDs and corresponding response */
96cf8ecce2SRamalingam C /* Wired_Tx_AKE  */
97cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN	(4 + 1)
98cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_OUT	(4 + 8 + 3)
99cf8ecce2SRamalingam C 
100cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN	(4 + 522 + 8 + 3)
101cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_MIN_OUT	(4 + 1 + 3 + 16 + 16)
102cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_MAX_OUT	(4 + 1 + 3 + 128)
103cf8ecce2SRamalingam C 
104cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN		(4 + 32)
105cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_OUT		(4)
106cf8ecce2SRamalingam C 
107cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN		(4 + 16)
108cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_OUT		(4)
109cf8ecce2SRamalingam C 
110cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN		(4)
111cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_CLOSE_SESSION_OUT		(4)
112cf8ecce2SRamalingam C 
113cf8ecce2SRamalingam C /* Wired_Tx_LC */
114cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN	(4)
115cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_OUT	(4 + 8)
116cf8ecce2SRamalingam C 
117cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN		(4 + 32)
118cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_OUT		(4)
119cf8ecce2SRamalingam C 
120cf8ecce2SRamalingam C /* Wired_Tx_SKE */
121cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN		(4)
122cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_GET_SESSION_KEY_OUT		(4 + 16 + 8)
123cf8ecce2SRamalingam C 
124cf8ecce2SRamalingam C /* Wired_Tx_SKE */
125cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN		(4 + 1)
126cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_ENABLE_AUTH_OUT		(4)
127cf8ecce2SRamalingam C 
128cf8ecce2SRamalingam C /* Wired_Tx_Repeater */
129cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN		(4 + 2 + 3 + 16 + 155)
130cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_VERIFY_REPEATER_OUT		(4 + 1 + 16)
131cf8ecce2SRamalingam C 
132cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_REPEATER_AUTH_STREAM_REQ_MIN_IN	(4 + 3 + \
133cf8ecce2SRamalingam C 								32 + 2 + 2)
134cf8ecce2SRamalingam C 
135cf8ecce2SRamalingam C #define	WIRED_CMD_BUF_LEN_REPEATER_AUTH_STREAM_REQ_OUT		(4)
136cf8ecce2SRamalingam C 
137cf8ecce2SRamalingam C /* hdcp_command_id: Enumeration of all WIRED HDCP Command IDs */
138cf8ecce2SRamalingam C enum hdcp_command_id {
139cf8ecce2SRamalingam C 	_WIDI_COMMAND_BASE		= 0x00030000,
140cf8ecce2SRamalingam C 	WIDI_INITIATE_HDCP2_SESSION	= _WIDI_COMMAND_BASE,
141cf8ecce2SRamalingam C 	HDCP_GET_SRM_STATUS,
142cf8ecce2SRamalingam C 	HDCP_SEND_SRM_FRAGMENT,
143cf8ecce2SRamalingam C 
144cf8ecce2SRamalingam C 	/* The wired HDCP Tx commands */
145cf8ecce2SRamalingam C 	_WIRED_COMMAND_BASE		= 0x00031000,
146cf8ecce2SRamalingam C 	WIRED_INITIATE_HDCP2_SESSION	= _WIRED_COMMAND_BASE,
147cf8ecce2SRamalingam C 	WIRED_VERIFY_RECEIVER_CERT,
148cf8ecce2SRamalingam C 	WIRED_AKE_SEND_HPRIME,
149cf8ecce2SRamalingam C 	WIRED_AKE_SEND_PAIRING_INFO,
150cf8ecce2SRamalingam C 	WIRED_INIT_LOCALITY_CHECK,
151cf8ecce2SRamalingam C 	WIRED_VALIDATE_LOCALITY,
152cf8ecce2SRamalingam C 	WIRED_GET_SESSION_KEY,
153cf8ecce2SRamalingam C 	WIRED_ENABLE_AUTH,
154cf8ecce2SRamalingam C 	WIRED_VERIFY_REPEATER,
155cf8ecce2SRamalingam C 	WIRED_REPEATER_AUTH_STREAM_REQ,
156cf8ecce2SRamalingam C 	WIRED_CLOSE_SESSION,
157cf8ecce2SRamalingam C 
158cf8ecce2SRamalingam C 	_WIRED_COMMANDS_COUNT,
159cf8ecce2SRamalingam C };
160cf8ecce2SRamalingam C 
161cf8ecce2SRamalingam C union encrypted_buff {
162cf8ecce2SRamalingam C 	u8		e_kpub_km[HDCP_2_2_E_KPUB_KM_LEN];
163cf8ecce2SRamalingam C 	u8		e_kh_km_m[HDCP_2_2_E_KH_KM_M_LEN];
164cf8ecce2SRamalingam C 	struct {
165cf8ecce2SRamalingam C 		u8	e_kh_km[HDCP_KH_LEN];
166cf8ecce2SRamalingam C 		u8	m[HDCP_M_LEN];
167cf8ecce2SRamalingam C 	} __packed;
168cf8ecce2SRamalingam C };
169cf8ecce2SRamalingam C 
170cf8ecce2SRamalingam C /* HDCP HECI message header. All header values are little endian. */
171cf8ecce2SRamalingam C struct hdcp_cmd_header {
172cf8ecce2SRamalingam C 	u32			api_version;
173cf8ecce2SRamalingam C 	u32			command_id;
174cf8ecce2SRamalingam C 	enum me_hdcp_status	status;
175cf8ecce2SRamalingam C 	/* Length of the HECI message (excluding the header) */
176cf8ecce2SRamalingam C 	u32			buffer_len;
177cf8ecce2SRamalingam C } __packed;
178cf8ecce2SRamalingam C 
179cf8ecce2SRamalingam C /* Empty command request or response. No data follows the header. */
180cf8ecce2SRamalingam C struct hdcp_cmd_no_data {
181cf8ecce2SRamalingam C 	struct hdcp_cmd_header header;
182cf8ecce2SRamalingam C } __packed;
183cf8ecce2SRamalingam C 
184cf8ecce2SRamalingam C /* Uniquely identifies the hdcp port being addressed for a given command. */
185cf8ecce2SRamalingam C struct hdcp_port_id {
186cf8ecce2SRamalingam C 	u8	integrated_port_type;
1872d15cf1bSRamalingam C 	/* physical_port is used until Gen11.5. Must be zero for Gen11.5+ */
188cf8ecce2SRamalingam C 	u8	physical_port;
1892d15cf1bSRamalingam C 	/* attached_transcoder is for Gen11.5+. Set to zero for <Gen11.5 */
1902d15cf1bSRamalingam C 	u8	attached_transcoder;
1912d15cf1bSRamalingam C 	u8	reserved;
192cf8ecce2SRamalingam C } __packed;
193cf8ecce2SRamalingam C 
194cf8ecce2SRamalingam C /*
195cf8ecce2SRamalingam C  * Data structures for integrated wired HDCP2 Tx in
196cf8ecce2SRamalingam C  * support of the AKE protocol
197cf8ecce2SRamalingam C  */
198cf8ecce2SRamalingam C /* HECI struct for integrated wired HDCP Tx session initiation. */
199cf8ecce2SRamalingam C struct wired_cmd_initiate_hdcp2_session_in {
200cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
201cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
202cf8ecce2SRamalingam C 	u8			protocol; /* for HDMI vs DP */
203cf8ecce2SRamalingam C } __packed;
204cf8ecce2SRamalingam C 
205cf8ecce2SRamalingam C struct wired_cmd_initiate_hdcp2_session_out {
206cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
207cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
208cf8ecce2SRamalingam C 	u8			r_tx[HDCP_2_2_RTX_LEN];
209cf8ecce2SRamalingam C 	struct hdcp2_tx_caps	tx_caps;
210cf8ecce2SRamalingam C } __packed;
211cf8ecce2SRamalingam C 
212cf8ecce2SRamalingam C /* HECI struct for ending an integrated wired HDCP Tx session. */
213cf8ecce2SRamalingam C struct wired_cmd_close_session_in {
214cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
215cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
216cf8ecce2SRamalingam C } __packed;
217cf8ecce2SRamalingam C 
218cf8ecce2SRamalingam C struct wired_cmd_close_session_out {
219cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
220cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
221cf8ecce2SRamalingam C } __packed;
222cf8ecce2SRamalingam C 
223cf8ecce2SRamalingam C /* HECI struct for integrated wired HDCP Tx Rx Cert verification. */
224cf8ecce2SRamalingam C struct wired_cmd_verify_receiver_cert_in {
225cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
226cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
227cf8ecce2SRamalingam C 	struct hdcp2_cert_rx	cert_rx;
228cf8ecce2SRamalingam C 	u8			r_rx[HDCP_2_2_RRX_LEN];
229cf8ecce2SRamalingam C 	u8			rx_caps[HDCP_2_2_RXCAPS_LEN];
230cf8ecce2SRamalingam C } __packed;
231cf8ecce2SRamalingam C 
232cf8ecce2SRamalingam C struct wired_cmd_verify_receiver_cert_out {
233cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
234cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
235cf8ecce2SRamalingam C 	u8			km_stored;
236cf8ecce2SRamalingam C 	u8			reserved[3];
237cf8ecce2SRamalingam C 	union encrypted_buff	ekm_buff;
238cf8ecce2SRamalingam C } __packed;
239cf8ecce2SRamalingam C 
240cf8ecce2SRamalingam C /* HECI struct for verification of Rx's Hprime in a HDCP Tx session */
241cf8ecce2SRamalingam C struct wired_cmd_ake_send_hprime_in {
242cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
243cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
244cf8ecce2SRamalingam C 	u8			h_prime[HDCP_2_2_H_PRIME_LEN];
245cf8ecce2SRamalingam C } __packed;
246cf8ecce2SRamalingam C 
247cf8ecce2SRamalingam C struct wired_cmd_ake_send_hprime_out {
248cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
249cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
250cf8ecce2SRamalingam C } __packed;
251cf8ecce2SRamalingam C 
252cf8ecce2SRamalingam C /*
253cf8ecce2SRamalingam C  * HECI struct for sending in AKE pairing data generated by the Rx in an
254cf8ecce2SRamalingam C  * integrated wired HDCP Tx session.
255cf8ecce2SRamalingam C  */
256cf8ecce2SRamalingam C struct wired_cmd_ake_send_pairing_info_in {
257cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
258cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
259cf8ecce2SRamalingam C 	u8			e_kh_km[HDCP_2_2_E_KH_KM_LEN];
260cf8ecce2SRamalingam C } __packed;
261cf8ecce2SRamalingam C 
262cf8ecce2SRamalingam C struct wired_cmd_ake_send_pairing_info_out {
263cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
264cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
265cf8ecce2SRamalingam C } __packed;
266cf8ecce2SRamalingam C 
267cf8ecce2SRamalingam C /* Data structures for integrated wired HDCP2 Tx in support of the LC protocol*/
268cf8ecce2SRamalingam C /*
269cf8ecce2SRamalingam C  * HECI struct for initiating locality check with an
270cf8ecce2SRamalingam C  * integrated wired HDCP Tx session.
271cf8ecce2SRamalingam C  */
272cf8ecce2SRamalingam C struct wired_cmd_init_locality_check_in {
273cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
274cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
275cf8ecce2SRamalingam C } __packed;
276cf8ecce2SRamalingam C 
277cf8ecce2SRamalingam C struct wired_cmd_init_locality_check_out {
278cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
279cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
280cf8ecce2SRamalingam C 	u8			r_n[HDCP_2_2_RN_LEN];
281cf8ecce2SRamalingam C } __packed;
282cf8ecce2SRamalingam C 
283cf8ecce2SRamalingam C /*
284cf8ecce2SRamalingam C  * HECI struct for validating an Rx's LPrime value in an
285cf8ecce2SRamalingam C  * integrated wired HDCP Tx session.
286cf8ecce2SRamalingam C  */
287cf8ecce2SRamalingam C struct wired_cmd_validate_locality_in {
288cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
289cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
290cf8ecce2SRamalingam C 	u8			l_prime[HDCP_2_2_L_PRIME_LEN];
291cf8ecce2SRamalingam C } __packed;
292cf8ecce2SRamalingam C 
293cf8ecce2SRamalingam C struct wired_cmd_validate_locality_out {
294cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
295cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
296cf8ecce2SRamalingam C } __packed;
297cf8ecce2SRamalingam C 
298cf8ecce2SRamalingam C /*
299cf8ecce2SRamalingam C  * Data structures for integrated wired HDCP2 Tx in support of the
300cf8ecce2SRamalingam C  * SKE protocol
301cf8ecce2SRamalingam C  */
302cf8ecce2SRamalingam C /* HECI struct for creating session key */
303cf8ecce2SRamalingam C struct wired_cmd_get_session_key_in {
304cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
305cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
306cf8ecce2SRamalingam C } __packed;
307cf8ecce2SRamalingam C 
308cf8ecce2SRamalingam C struct wired_cmd_get_session_key_out {
309cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
310cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
311cf8ecce2SRamalingam C 	u8			e_dkey_ks[HDCP_2_2_E_DKEY_KS_LEN];
312cf8ecce2SRamalingam C 	u8			r_iv[HDCP_2_2_RIV_LEN];
313cf8ecce2SRamalingam C } __packed;
314cf8ecce2SRamalingam C 
315cf8ecce2SRamalingam C /* HECI struct for the Tx enable authentication command */
316cf8ecce2SRamalingam C struct wired_cmd_enable_auth_in {
317cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
318cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
319cf8ecce2SRamalingam C 	u8			stream_type;
320cf8ecce2SRamalingam C } __packed;
321cf8ecce2SRamalingam C 
322cf8ecce2SRamalingam C struct wired_cmd_enable_auth_out {
323cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
324cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
325cf8ecce2SRamalingam C } __packed;
326cf8ecce2SRamalingam C 
327cf8ecce2SRamalingam C /*
328cf8ecce2SRamalingam C  * Data structures for integrated wired HDCP2 Tx in support of
329cf8ecce2SRamalingam C  * the repeater protocols
330cf8ecce2SRamalingam C  */
331cf8ecce2SRamalingam C /*
332cf8ecce2SRamalingam C  * HECI struct for verifying the downstream repeater's HDCP topology in an
333cf8ecce2SRamalingam C  * integrated wired HDCP Tx session.
334cf8ecce2SRamalingam C  */
335cf8ecce2SRamalingam C struct wired_cmd_verify_repeater_in {
336cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
337cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
338cf8ecce2SRamalingam C 	u8			rx_info[HDCP_2_2_RXINFO_LEN];
339cf8ecce2SRamalingam C 	u8			seq_num_v[HDCP_2_2_SEQ_NUM_LEN];
340cf8ecce2SRamalingam C 	u8			v_prime[HDCP_2_2_V_PRIME_HALF_LEN];
341cf8ecce2SRamalingam C 	u8			receiver_ids[HDCP_2_2_RECEIVER_IDS_MAX_LEN];
342cf8ecce2SRamalingam C } __packed;
343cf8ecce2SRamalingam C 
344cf8ecce2SRamalingam C struct wired_cmd_verify_repeater_out {
345cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
346cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
347cf8ecce2SRamalingam C 	u8			content_type_supported;
348cf8ecce2SRamalingam C 	u8			v[HDCP_2_2_V_PRIME_HALF_LEN];
349cf8ecce2SRamalingam C } __packed;
350cf8ecce2SRamalingam C 
351cf8ecce2SRamalingam C /*
352cf8ecce2SRamalingam C  * HECI struct in support of stream management in an
353cf8ecce2SRamalingam C  * integrated wired HDCP Tx session.
354cf8ecce2SRamalingam C  */
355cf8ecce2SRamalingam C struct wired_cmd_repeater_auth_stream_req_in {
356cf8ecce2SRamalingam C 	struct hdcp_cmd_header		header;
357cf8ecce2SRamalingam C 	struct hdcp_port_id		port;
358cf8ecce2SRamalingam C 	u8				seq_num_m[HDCP_2_2_SEQ_NUM_LEN];
359cf8ecce2SRamalingam C 	u8				m_prime[HDCP_2_2_MPRIME_LEN];
360cf8ecce2SRamalingam C 	__be16				k;
361c56967d6SGustavo A. R. Silva 	struct hdcp2_streamid_type	streams[];
362cf8ecce2SRamalingam C } __packed;
363cf8ecce2SRamalingam C 
364cf8ecce2SRamalingam C struct wired_cmd_repeater_auth_stream_req_out {
365cf8ecce2SRamalingam C 	struct hdcp_cmd_header	header;
366cf8ecce2SRamalingam C 	struct hdcp_port_id	port;
367cf8ecce2SRamalingam C } __packed;
368cf8ecce2SRamalingam C #endif /* __MEI_HDCP_H__ */
369