1 #ifndef __UAPI_CAM_LRME_H__
2 #define __UAPI_CAM_LRME_H__
3 
4 #include "cam_defs.h"
5 
6 /* LRME Resource Types */
7 
8 enum CAM_LRME_IO_TYPE {
9 	CAM_LRME_IO_TYPE_TAR,
10 	CAM_LRME_IO_TYPE_REF,
11 	CAM_LRME_IO_TYPE_RES,
12 	CAM_LRME_IO_TYPE_DS2,
13 };
14 
15 #define CAM_LRME_INPUT_PORT_TYPE_TAR (1 << 0)
16 #define CAM_LRME_INPUT_PORT_TYPE_REF (1 << 1)
17 
18 #define CAM_LRME_OUTPUT_PORT_TYPE_DS2 (1 << 0)
19 #define CAM_LRME_OUTPUT_PORT_TYPE_RES (1 << 1)
20 
21 #define CAM_LRME_DEV_MAX 1
22 
23 
24 struct cam_lrme_hw_version {
25 	uint32_t gen;
26 	uint32_t rev;
27 	uint32_t step;
28 };
29 
30 struct cam_lrme_dev_cap {
31 	struct cam_lrme_hw_version clc_hw_version;
32 	struct cam_lrme_hw_version bus_rd_hw_version;
33 	struct cam_lrme_hw_version bus_wr_hw_version;
34 	struct cam_lrme_hw_version top_hw_version;
35 	struct cam_lrme_hw_version top_titan_version;
36 };
37 
38 /**
39  * struct cam_lrme_query_cap_cmd - LRME query device capability payload
40  *
41  * @dev_iommu_handle: LRME iommu handles for secure/non secure
42  *      modes
43  * @cdm_iommu_handle: Iommu handles for secure/non secure modes
44  * @num_devices: number of hardware devices
45  * @dev_caps: Returned device capability array
46  */
47 struct cam_lrme_query_cap_cmd {
48 	struct cam_iommu_handle device_iommu;
49 	struct cam_iommu_handle cdm_iommu;
50 	uint32_t num_devices;
51 	struct cam_lrme_dev_cap dev_caps[CAM_LRME_DEV_MAX];
52 };
53 
54 struct cam_lrme_soc_info {
55 	uint64_t clock_rate;
56 	uint64_t bandwidth;
57 	uint64_t reserved[4];
58 };
59 
60 struct cam_lrme_acquire_args {
61 	struct cam_lrme_soc_info lrme_soc_info;
62 };
63 
64 #endif /* __UAPI_CAM_LRME_H__ */
65 
66