• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2015 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
24 #ifndef PP_HWMGR_PPT_H
25 #define PP_HWMGR_PPT_H
26 
27 #include "hardwaremanager.h"
28 #include "smumgr.h"
29 #include "atom-types.h"
30 
31 struct phm_ppt_v1_clock_voltage_dependency_record {
32 	uint32_t clk;
33 	uint8_t vddInd;
34 	uint16_t vdd_offset;
35 	uint16_t vddc;
36 	uint16_t vddgfx;
37 	uint16_t vddci;
38 	uint16_t mvdd;
39 	uint8_t phases;
40 	uint8_t cks_enable;
41 	uint8_t cks_voffset;
42 	uint32_t sclk_offset;
43 };
44 
45 typedef struct phm_ppt_v1_clock_voltage_dependency_record phm_ppt_v1_clock_voltage_dependency_record;
46 
47 struct phm_ppt_v1_clock_voltage_dependency_table {
48 	uint32_t count;                                            /* Number of entries. */
49 	phm_ppt_v1_clock_voltage_dependency_record entries[1];     /* Dynamically allocate count entries. */
50 };
51 
52 typedef struct phm_ppt_v1_clock_voltage_dependency_table phm_ppt_v1_clock_voltage_dependency_table;
53 
54 
55 /* Multimedia Clock Voltage Dependency records and table */
56 struct phm_ppt_v1_mm_clock_voltage_dependency_record {
57 	uint32_t  dclk;                                              /* UVD D-clock */
58 	uint32_t  vclk;                                              /* UVD V-clock */
59 	uint32_t  eclk;                                              /* VCE clock */
60 	uint32_t  aclk;                                              /* ACP clock */
61 	uint32_t  samclock;                                          /* SAMU clock */
62 	uint8_t	vddcInd;
63 	uint16_t vddgfx_offset;
64 	uint16_t vddc;
65 	uint16_t vddgfx;
66 	uint8_t phases;
67 };
68 typedef struct phm_ppt_v1_mm_clock_voltage_dependency_record phm_ppt_v1_mm_clock_voltage_dependency_record;
69 
70 struct phm_ppt_v1_mm_clock_voltage_dependency_table {
71 	uint32_t count;													/* Number of entries. */
72 	phm_ppt_v1_mm_clock_voltage_dependency_record entries[1];		/* Dynamically allocate count entries. */
73 };
74 typedef struct phm_ppt_v1_mm_clock_voltage_dependency_table phm_ppt_v1_mm_clock_voltage_dependency_table;
75 
76 struct phm_ppt_v1_voltage_lookup_record {
77 	uint16_t us_calculated;
78 	uint16_t us_vdd;												/* Base voltage */
79 	uint16_t us_cac_low;
80 	uint16_t us_cac_mid;
81 	uint16_t us_cac_high;
82 };
83 typedef struct phm_ppt_v1_voltage_lookup_record phm_ppt_v1_voltage_lookup_record;
84 
85 struct phm_ppt_v1_voltage_lookup_table {
86 	uint32_t count;
87 	phm_ppt_v1_voltage_lookup_record entries[1];    /* Dynamically allocate count entries. */
88 };
89 typedef struct phm_ppt_v1_voltage_lookup_table phm_ppt_v1_voltage_lookup_table;
90 
91 /* PCIE records and Table */
92 
93 struct phm_ppt_v1_pcie_record {
94 	uint8_t gen_speed;
95 	uint8_t lane_width;
96 	uint16_t usreserved;
97 	uint32_t pcie_sclk;
98 };
99 typedef struct phm_ppt_v1_pcie_record phm_ppt_v1_pcie_record;
100 
101 struct phm_ppt_v1_pcie_table {
102 	uint32_t count;                                            /* Number of entries. */
103 	phm_ppt_v1_pcie_record entries[1];                         /* Dynamically allocate count entries. */
104 };
105 typedef struct phm_ppt_v1_pcie_table phm_ppt_v1_pcie_table;
106 
107 #endif
108 
109