blob: 52c72d638920669ef22d1f2553ad61663a95aed3 [file] [log] [blame]
Ziyuan Xu4060cfd2017-02-10 11:54:52 +08001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef CDN_DP_H
8#define CDN_DP_H
9
Ziyuan Xu4060cfd2017-02-10 11:54:52 +080010#include <plat_private.h>
11
12enum {
13 CDN_DP_HDCP_1X_KSV_LEN = 5,
14 CDN_DP_HDCP_KSV_LEN = 8,
15 CDN_DP_HDCP_RESERVED_LEN = 10,
16 CDN_DP_HDCP_UID_LEN = 16,
17 CDN_DP_HDCP_SHA_LEN = 20,
18 CDN_DP_HDCP_DPK_LEN = 280,
19 CDN_DP_HDCP_1X_KEYS_LEN = 285,
20 CDN_DP_HDCP_KEY_LEN = 326,
21};
22
23struct cdn_dp_hdcp_key_1x {
24 uint8_t ksv[CDN_DP_HDCP_KSV_LEN];
25 uint8_t device_key[CDN_DP_HDCP_DPK_LEN];
26 uint8_t sha1[CDN_DP_HDCP_SHA_LEN];
27 uint8_t uid[CDN_DP_HDCP_UID_LEN];
28 uint16_t seed;
29 uint8_t reserved[CDN_DP_HDCP_RESERVED_LEN];
30};
31
32#define HDCP_KEY_DATA_START_TRANSFER 0
33#define HDCP_KEY_DATA_START_DECRYPT 1
34#define HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE (6 * 64) / 8
35
36/* Checks the cdn_dp_hdcp_key_1x must be aligned on 6 x 64-bit word boundary */
Elyes Haouas183638f2023-02-13 10:05:41 +010037CASSERT(sizeof(struct cdn_dp_hdcp_key_1x) % HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE,
Ziyuan Xu4060cfd2017-02-10 11:54:52 +080038 assert_hdcp_key_1x_store_data_align_size_mismatch);
39
40uint64_t dp_hdcp_ctrl(uint64_t type);
41
42uint64_t dp_hdcp_store_key(uint64_t x1,
43 uint64_t x2,
44 uint64_t x3,
45 uint64_t x4,
46 uint64_t x5,
47 uint64_t x6);
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000048
49#endif /* CDN_DP_H */