/****************************************************************************\ * * File Name atomfirmware.h * Project This is an interface header file between atombios and OS GPU drivers for SoC15 products * * Description header file of general definitions for OS and pre-OS video drivers * * Copyright 2014 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *
\****************************************************************************/
/*IMPORTANT NOTES * If a change in VBIOS/Driver/Tool's interface is only needed for SoC15 and forward products, then the change is only needed in this atomfirmware.h header file. * If a change in VBIOS/Driver/Tool's interface is only needed for pre-SoC15 products, then the change is only needed in atombios.h header file. * If a change is needed for both pre and post SoC15 products, then the change has to be made separately and might be differently in both atomfirmware.h and atombios.h.
*/
/**************************************************************************** * Common header for all tables (Data table, Command function). * Every table pointed in _ATOM_MASTER_DATA_TABLE has this common header. * And the pointer actually points to this header.
****************************************************************************/
struct atom_common_table_header
{
uint16_t structuresize;
uint8_t format_revision; //mainly used for a hw function, when the parser is not backward compatible
uint8_t content_revision; //change it when a data table has a structure change, or a hw function has a input/output parameter change
};
/**************************************************************************** * Structure stores the ROM header.
****************************************************************************/ struct atom_rom_header_v2_2
{ struct atom_common_table_header table_header;
uint8_t atom_bios_string[4]; //enum atom_string_def atom_bios_string; //Signature to distinguish between Atombios and non-atombios,
uint16_t bios_segment_address;
uint16_t protectedmodeoffset;
uint16_t configfilenameoffset;
uint16_t crc_block_offset;
uint16_t vbios_bootupmessageoffset;
uint16_t int10_offset;
uint16_t pcibusdevinitcode;
uint16_t iobaseaddress;
uint16_t subsystem_vendor_id;
uint16_t subsystem_id;
uint16_t pci_info_offset;
uint16_t masterhwfunction_offset; //Offest for SW to get all command function offsets, Don't change the position
uint16_t masterdatatable_offset; //Offest for SW to get all data table offsets, Don't change the position
uint16_t reserved;
uint32_t pspdirtableoffset;
};
/*==============================hw function portion======================================================================*/
/**************************************************************************** * Structures used in Command.mtb, each function name is not given here since those function could change from time to time * The real functionality of each function is associated with the parameter structure version when defined * For all internal cmd function definitions, please reference to atomstruct.h
****************************************************************************/ struct atom_master_list_of_command_functions_v2_1{
uint16_t asic_init; //Function
uint16_t cmd_function1; //used as an internal one
uint16_t cmd_function2; //used as an internal one
uint16_t cmd_function3; //used as an internal one
uint16_t digxencodercontrol; //Function
uint16_t cmd_function5; //used as an internal one
uint16_t cmd_function6; //used as an internal one
uint16_t cmd_function7; //used as an internal one
uint16_t cmd_function8; //used as an internal one
uint16_t cmd_function9; //used as an internal one
uint16_t setengineclock; //Function
uint16_t setmemoryclock; //Function
uint16_t setpixelclock; //Function
uint16_t enabledisppowergating; //Function
uint16_t cmd_function14; //used as an internal one
uint16_t cmd_function15; //used as an internal one
uint16_t cmd_function16; //used as an internal one
uint16_t cmd_function17; //used as an internal one
uint16_t cmd_function18; //used as an internal one
uint16_t cmd_function19; //used as an internal one
uint16_t cmd_function20; //used as an internal one
uint16_t cmd_function21; //used as an internal one
uint16_t cmd_function22; //used as an internal one
uint16_t cmd_function23; //used as an internal one
uint16_t cmd_function24; //used as an internal one
uint16_t cmd_function25; //used as an internal one
uint16_t cmd_function26; //used as an internal one
uint16_t cmd_function27; //used as an internal one
uint16_t cmd_function28; //used as an internal one
uint16_t cmd_function29; //used as an internal one
uint16_t cmd_function30; //used as an internal one
uint16_t cmd_function31; //used as an internal one
uint16_t cmd_function32; //used as an internal one
uint16_t cmd_function33; //used as an internal one
uint16_t blankcrtc; //Function
uint16_t enablecrtc; //Function
uint16_t cmd_function36; //used as an internal one
uint16_t cmd_function37; //used as an internal one
uint16_t cmd_function38; //used as an internal one
uint16_t cmd_function39; //used as an internal one
uint16_t cmd_function40; //used as an internal one
uint16_t getsmuclockinfo; //Function
uint16_t selectcrtc_source; //Function
uint16_t cmd_function43; //used as an internal one
uint16_t cmd_function44; //used as an internal one
uint16_t cmd_function45; //used as an internal one
uint16_t setdceclock; //Function
uint16_t getmemoryclock; //Function
uint16_t getengineclock; //Function
uint16_t setcrtc_usingdtdtiming; //Function
uint16_t externalencodercontrol; //Function
uint16_t cmd_function51; //used as an internal one
uint16_t cmd_function52; //used as an internal one
uint16_t cmd_function53; //used as an internal one
uint16_t processi2cchanneltransaction;//Function
uint16_t cmd_function55; //used as an internal one
uint16_t cmd_function56; //used as an internal one
uint16_t cmd_function57; //used as an internal one
uint16_t cmd_function58; //used as an internal one
uint16_t cmd_function59; //used as an internal one
uint16_t computegpuclockparam; //Function
uint16_t cmd_function61; //used as an internal one
uint16_t cmd_function62; //used as an internal one
uint16_t dynamicmemorysettings; //Function function
uint16_t memorytraining; //Function function
uint16_t cmd_function65; //used as an internal one
uint16_t cmd_function66; //used as an internal one
uint16_t setvoltage; //Function
uint16_t cmd_function68; //used as an internal one
uint16_t readefusevalue; //Function
uint16_t cmd_function70; //used as an internal one
uint16_t cmd_function71; //used as an internal one
uint16_t cmd_function72; //used as an internal one
uint16_t cmd_function73; //used as an internal one
uint16_t cmd_function74; //used as an internal one
uint16_t cmd_function75; //used as an internal one
uint16_t dig1transmittercontrol; //Function
uint16_t cmd_function77; //used as an internal one
uint16_t processauxchanneltransaction;//Function
uint16_t cmd_function79; //used as an internal one
uint16_t getvoltageinfo; //Function
};
/**************************************************************************** * Structures used in every command function
****************************************************************************/ struct atom_function_attribute
{
uint16_t ws_in_bytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword),
uint16_t ps_in_bytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword),
uint16_t updated_by_util:1; //[15]=flag to indicate the function is updated by util
};
/**************************************************************************** * Common header for all hw functions. * Every function pointed by _master_list_of_hw_function has this common header. * And the pointer actually points to this header.
****************************************************************************/ struct atom_rom_hw_function_header
{ struct atom_common_table_header func_header; struct atom_function_attribute func_attrib;
};
/*==============================sw data table portion======================================================================*/ /**************************************************************************** * Structures used in data.mtb, each data table name is not given here since those data table could change from time to time * The real name of each table is given when its data structure version is defined
****************************************************************************/ struct atom_master_list_of_data_tables_v2_1{
uint16_t utilitypipeline; /* Offest for the utility to get parser info,Don't change this position!*/
uint16_t multimedia_info;
uint16_t smc_dpm_info;
uint16_t sw_datatable3;
uint16_t firmwareinfo; /* Shared by various SW components */
uint16_t sw_datatable5;
uint16_t lcd_info; /* Shared by various SW components */
uint16_t sw_datatable7;
uint16_t smu_info;
uint16_t sw_datatable9;
uint16_t sw_datatable10;
uint16_t vram_usagebyfirmware; /* Shared by various SW components */
uint16_t gpio_pin_lut; /* Shared by various SW components */
uint16_t sw_datatable13;
uint16_t gfx_info;
uint16_t powerplayinfo; /* Shared by various SW components */
uint16_t sw_datatable16;
uint16_t sw_datatable17;
uint16_t sw_datatable18;
uint16_t sw_datatable19;
uint16_t sw_datatable20;
uint16_t sw_datatable21;
uint16_t displayobjectinfo; /* Shared by various SW components */
uint16_t indirectioaccess; /* used as an internal one */
uint16_t umc_info; /* Shared by various SW components */
uint16_t sw_datatable25;
uint16_t sw_datatable26;
uint16_t dce_info; /* Shared by various SW components */
uint16_t vram_info; /* Shared by various SW components */
uint16_t sw_datatable29;
uint16_t integratedsysteminfo; /* Shared by various SW components */
uint16_t asic_profiling_info; /* Shared by various SW components */
uint16_t voltageobject_info; /* shared by various SW components */
uint16_t sw_datatable33;
uint16_t sw_datatable34;
};
/* utilitypipeline * when format_revision==1 && content_revision==1, then this an info table for atomworks to use during debug session, no structure is associated with it. * the location of it can't change
*/
/* *************************************************************************** Data Table firmwareinfo structure ***************************************************************************
*/
struct atom_firmware_info_v3_3
{ struct atom_common_table_header table_header;
uint32_t firmware_revision;
uint32_t bootup_sclk_in10khz;
uint32_t bootup_mclk_in10khz;
uint32_t firmware_capability; // enum atombios_firmware_capability
uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
uint16_t bootup_vddc_mv;
uint16_t bootup_vddci_mv;
uint16_t bootup_mvddc_mv;
uint16_t bootup_vddgfx_mv;
uint8_t mem_module_id;
uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
uint8_t reserved1[2];
uint32_t mc_baseaddr_high;
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
uint8_t board_i2c_feature_slave_addr;
uint8_t reserved3;
uint16_t bootup_mvddq_mv;
uint16_t bootup_mvpp_mv;
uint32_t zfbstartaddrin16mb;
uint32_t pplib_pptable_id; // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
uint32_t reserved2[2];
};
struct atom_firmware_info_v3_4 { struct atom_common_table_header table_header;
uint32_t firmware_revision;
uint32_t bootup_sclk_in10khz;
uint32_t bootup_mclk_in10khz;
uint32_t firmware_capability; // enum atombios_firmware_capability
uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
uint16_t bootup_vddc_mv;
uint16_t bootup_vddci_mv;
uint16_t bootup_mvddc_mv;
uint16_t bootup_vddgfx_mv;
uint8_t mem_module_id;
uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
uint8_t reserved1[2];
uint32_t mc_baseaddr_high;
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
uint8_t board_i2c_feature_slave_addr;
uint8_t ras_rom_i2c_slave_addr;
uint16_t bootup_mvddq_mv;
uint16_t bootup_mvpp_mv;
uint32_t zfbstartaddrin16mb;
uint32_t pplib_pptable_id; // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
uint32_t mvdd_ratio; // mvdd_raio = (real mvdd in power rail)*1000/(mvdd_output_from_svi2)
uint16_t hw_bootup_vddgfx_mv; // hw default vddgfx voltage level decide by board strap
uint16_t hw_bootup_vddc_mv; // hw default vddc voltage level decide by board strap
uint16_t hw_bootup_mvddc_mv; // hw default mvddc voltage level decide by board strap
uint16_t hw_bootup_vddci_mv; // hw default vddci voltage level decide by board strap
uint32_t maco_pwrlimit_mw; // bomaco mode power limit in unit of m-watt
uint32_t usb_pwrlimit_mw; // power limit when USB is enable in unit of m-watt
uint32_t fw_reserved_size_in_kb; // VBIOS reserved extra fw size in unit of kb.
uint32_t pspbl_init_done_reg_addr;
uint32_t pspbl_init_done_value;
uint32_t pspbl_init_done_check_timeout; // time out in unit of us when polling pspbl init done
uint32_t reserved[2];
};
struct atom_firmware_info_v3_5 { struct atom_common_table_header table_header;
uint32_t firmware_revision;
uint32_t bootup_clk_reserved[2];
uint32_t firmware_capability; // enum atombios_firmware_capability
uint32_t fw_protect_region_size_in_kb; /* FW allocate a write protect region at top of FB. */
uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
uint32_t bootup_voltage_reserved[2];
uint8_t mem_module_id;
uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
uint8_t hw_blt_mode; //0:HW_BLT_DMA_PIO_MODE; 1:HW_BLT_LITE_SDMA_MODE; 2:HW_BLT_PCI_IO_MODE
uint8_t reserved1;
uint32_t mc_baseaddr_high;
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
uint8_t board_i2c_feature_slave_addr;
uint8_t ras_rom_i2c_slave_addr;
uint32_t bootup_voltage_reserved1;
uint32_t zfb_reserved; // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
uint32_t pplib_pptable_id;
uint32_t hw_voltage_reserved[3];
uint32_t maco_pwrlimit_mw; // bomaco mode power limit in unit of m-watt
uint32_t usb_pwrlimit_mw; // power limit when USB is enable in unit of m-watt
uint32_t fw_reserved_size_in_kb; // VBIOS reserved extra fw size in unit of kb.
uint32_t pspbl_init_reserved[3];
uint32_t spi_rom_size; // GPU spi rom size
uint16_t support_dev_in_objinfo;
uint16_t disp_phy_tunning_size;
uint32_t reserved[16];
}; /* *************************************************************************** Data Table lcd_info structure ***************************************************************************
*/
/* atom_gpio_pin_assignment.gpio_id definition */ enum atom_gpio_pin_assignment_gpio_id {
I2C_HW_LANE_MUX =0x0f, /* only valid when bit7=1 */
I2C_HW_ENGINE_ID_MASK =0x70, /* only valid when bit7=1 */
I2C_HW_CAP =0x80, /*only when the I2C_HW_CAP is set, the pin ID is assigned to an I2C pin pair, otherwise, it's an generic GPIO pin */
/* gpio_id pre-define id for multiple usage */ /* GPIO use to control PCIE_VDDC in certain SLT board */
PCIE_VDDC_CONTROL_GPIO_PINID = 56, /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC swithing feature is enable */
PP_AC_DC_SWITCH_GPIO_PINID = 60, /* VDDC_REGULATOR_VRHOT_GPIO_PINID in Gpio_Pin_LutTable, VRHot feature is enable */
VDDC_VRHOT_GPIO_PINID = 61, /*if VDDC_PCC_GPIO_PINID in GPIO_LUTable, Peak Current Control feature is enabled */
VDDC_PCC_GPIO_PINID = 62, /* Only used on certain SLT/PA board to allow utility to cut Efuse. */
EFUSE_CUT_ENABLE_GPIO_PINID = 63, /* ucGPIO=DRAM_SELF_REFRESH_GPIO_PIND uses for memory self refresh (ucGPIO=0, DRAM self-refresh; ucGPIO= */
DRAM_SELF_REFRESH_GPIO_PINID = 64, /* Thermal interrupt output->system thermal chip GPIO pin */
THERMAL_INT_OUTPUT_GPIO_PINID =65,
};
struct atom_gpio_pin_lut_v2_1
{ struct atom_common_table_header table_header; /*the real number of this included in the structure is calcualted by using the (whole structure size - the header size)/size of atom_gpio_pin_lut */ struct atom_gpio_pin_assignment gpio_pin[];
};
/* * VBIOS/PRE-OS always reserve a FB region at the top of frame buffer. driver should not write * access that region. driver can allocate their own reservation region as long as it does not * overlap firwmare's reservation region. * if (pre-NV1X) atom data table firmwareInfoTable version < 3.3: * in this case, atom data table vram_usagebyfirmwareTable version always <= 2.1 * if VBIOS/UEFI GOP is posted: * VBIOS/UEFIGOP update used_by_firmware_in_kb = total reserved size by VBIOS * update start_address_in_kb = total_mem_size_in_kb - used_by_firmware_in_kb; * ( total_mem_size_in_kb = reg(CONFIG_MEMSIZE)<<10) * driver can allocate driver reservation region under firmware reservation, * used_by_driver_in_kb = driver reservation size * driver reservation start address = (start_address_in_kb - used_by_driver_in_kb) * Comment1[hchan]: There is only one reservation at the beginning of the FB reserved by * host driver. Host driver would overwrite the table with the following * used_by_firmware_in_kb = total reserved size for pf-vf info exchange and * set SRIOV_MSG_SHARE_RESERVATION mask start_address_in_kb = 0 * else there is no VBIOS reservation region: * driver must allocate driver reservation region at top of FB. * driver set used_by_driver_in_kb = driver reservation size * driver reservation start address = (total_mem_size_in_kb - used_by_driver_in_kb) * same as Comment1 * else (NV1X and after): * if VBIOS/UEFI GOP is posted: * VBIOS/UEFIGOP update: * used_by_firmware_in_kb = atom_firmware_Info_v3_3.fw_reserved_size_in_kb; * start_address_in_kb = total_mem_size_in_kb - used_by_firmware_in_kb; * (total_mem_size_in_kb = reg(CONFIG_MEMSIZE)<<10) * if vram_usagebyfirmwareTable version <= 2.1: * driver can allocate driver reservation region under firmware reservation, * driver set used_by_driver_in_kb = driver reservation size * driver reservation start address = start_address_in_kb - used_by_driver_in_kb * same as Comment1 * else driver can: * allocate it reservation any place as long as it does overlap pre-OS FW reservation area * set used_by_driver_region0_in_kb = driver reservation size * set driver_region0_start_address_in_kb = driver reservation region start address * Comment2[hchan]: Host driver can set used_by_firmware_in_kb and start_address_in_kb to * zero as the reservation for VF as it doesn’t exist. And Host driver should also * update atom_firmware_Info table to remove the same VBIOS reservation as well.
*/
struct atom_common_record_header
{
uint8_t record_type; //An emun to indicate the record type
uint8_t record_size; //The size of the whole record in byte
};
struct atom_i2c_record
{ struct atom_common_record_header record_header; //record_type = ATOM_I2C_RECORD_TYPE
uint8_t i2c_id;
uint8_t i2c_slave_addr; //The slave address, it's 0 when the record is attached to connector for DDC
};
struct atom_hpd_int_record
{ struct atom_common_record_header record_header; //record_type = ATOM_HPD_INT_RECORD_TYPE
uint8_t pin_id; //Corresponding block in GPIO_PIN_INFO table gives the pin info
uint8_t plugin_pin_state;
};
struct atom_connector_caps_record { struct atom_common_record_header
record_header; //record_type = ATOM_CONN_CAP_RECORD_TYPE
uint16_t connector_caps; //01b if internal display is checked; 10b if internal BL is checked; 0 of Not
};
struct atom_connector_speed_record { struct atom_common_record_header
record_header; //record_type = ATOM_CONN_SPEED_UPTO
uint32_t connector_max_speed; // connector Max speed attribute, it sets 8100 in Mhz when DP connector @8.1Ghz.
uint16_t reserved;
};
// Bit maps for ATOM_ENCODER_CAP_RECORD.usEncoderCap enum atom_encoder_caps_def
{
ATOM_ENCODER_CAP_RECORD_HBR2 =0x01, // DP1.2 HBR2 is supported by HW encoder, it is retired in NI. the real meaning from SI is MST_EN
ATOM_ENCODER_CAP_RECORD_MST_EN =0x01, // from SI, this bit means DP MST is enable or not.
ATOM_ENCODER_CAP_RECORD_HBR2_EN =0x02, // DP1.2 HBR2 setting is qualified and HBR2 can be enabled
ATOM_ENCODER_CAP_RECORD_HDMI6Gbps_EN =0x04, // HDMI2.0 6Gbps enable or not.
ATOM_ENCODER_CAP_RECORD_HBR3_EN =0x08, // DP1.3 HBR3 is supported by board.
ATOM_ENCODER_CAP_RECORD_DP2 =0x10, // DP2 is supported by ASIC/board.
ATOM_ENCODER_CAP_RECORD_UHBR10_EN =0x20, // DP2.0 UHBR10 settings is supported by board
ATOM_ENCODER_CAP_RECORD_UHBR13_5_EN =0x40, // DP2.0 UHBR13.5 settings is supported by board
ATOM_ENCODER_CAP_RECORD_UHBR20_EN =0x80, // DP2.0 UHBR20 settings is supported by board
ATOM_ENCODER_CAP_RECORD_USB_C_TYPE =0x100, // the DP connector is a USB-C type.
};
enum atom_connector_caps_def
{
ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY = 0x01, //a cap bit to indicate that this non-embedded display connector is an internal display
ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY_BL = 0x02, //a cap bit to indicate that this internal display requires BL control from GPU, refers to lcd_info for BL PWM freq
};
//The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually struct atom_gpio_pin_control_pair
{
uint8_t gpio_id; // GPIO_ID, find the corresponding ID in GPIO_LUT table
uint8_t gpio_pinstate; // Pin state showing how to set-up the pin
};
struct atom_object_gpio_cntl_record
{ struct atom_common_record_header record_header;
uint8_t flag; // Future expnadibility
uint8_t number_of_pins; // Number of GPIO pins used to control the object struct atom_gpio_pin_control_pair gpio[1]; // the real gpio pin pair determined by number of pins ucNumberOfPins
};
//Definitions for GPIO pin state enum atom_gpio_pin_control_pinstate_def
{
GPIO_PIN_TYPE_INPUT = 0x00,
GPIO_PIN_TYPE_OUTPUT = 0x10,
GPIO_PIN_TYPE_HW_CONTROL = 0x20,
//For GPIO_PIN_TYPE_OUTPUT the following is defined
GPIO_PIN_OUTPUT_STATE_MASK = 0x01,
GPIO_PIN_OUTPUT_STATE_SHIFT = 0,
GPIO_PIN_STATE_ACTIVE_LOW = 0x0,
GPIO_PIN_STATE_ACTIVE_HIGH = 0x1,
};
// Indexes to GPIO array in GLSync record // GLSync record is for Frame Lock/Gen Lock feature. enum atom_glsync_record_gpio_index_def
{
ATOM_GPIO_INDEX_GLSYNC_REFCLK = 0,
ATOM_GPIO_INDEX_GLSYNC_HSYNC = 1,
ATOM_GPIO_INDEX_GLSYNC_VSYNC = 2,
ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ = 3,
ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT = 4,
ATOM_GPIO_INDEX_GLSYNC_INTERRUPT = 5,
ATOM_GPIO_INDEX_GLSYNC_V_RESET = 6,
ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL = 7,
ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL = 8,
ATOM_GPIO_INDEX_GLSYNC_MAX = 9,
};
struct atom_connector_forced_tmds_cap_record
{ struct atom_common_record_header record_header; // override TMDS capability on this connector when it operate in TMDS mode. usMaxTmdsClkRate = max TMDS Clock in Mhz/2.5
uint8_t maxtmdsclkrate_in2_5mhz;
uint8_t reserved;
};
enum atom_display_device_tag_def{
ATOM_DISPLAY_LCD1_SUPPORT = 0x0002, //an embedded display is either an LVDS or eDP signal type of display
ATOM_DISPLAY_LCD2_SUPPORT = 0x0020, //second edp device tag 0x0020 for backward compability
ATOM_DISPLAY_DFP1_SUPPORT = 0x0008,
ATOM_DISPLAY_DFP2_SUPPORT = 0x0080,
ATOM_DISPLAY_DFP3_SUPPORT = 0x0200,
ATOM_DISPLAY_DFP4_SUPPORT = 0x0400,
ATOM_DISPLAY_DFP5_SUPPORT = 0x0800,
ATOM_DISPLAY_DFP6_SUPPORT = 0x0040,
ATOM_DISPLAY_DFPx_SUPPORT = 0x0ec8,
};
struct atom_display_object_path_v2
{
uint16_t display_objid; //Connector Object ID or Misc Object ID
uint16_t disp_recordoffset;
uint16_t encoderobjid; //first encoder closer to the connector, could be either an external or intenal encoder
uint16_t extencoderobjid; //2nd encoder after the first encoder, from the connector point of view;
uint16_t encoder_recordoffset;
uint16_t extencoder_recordoffset;
uint16_t device_tag; //a supported device vector, each display path starts with this.the paths are enumerated in the way of priority, a path appears first
uint8_t priority_id;
uint8_t reserved;
};
struct atom_display_object_path_v3 {
uint16_t display_objid; //Connector Object ID or Misc Object ID
uint16_t disp_recordoffset;
uint16_t encoderobjid; //first encoder closer to the connector, could be either an external or intenal encoder
uint16_t reserved1; //only on USBC case, otherwise always = 0
uint16_t reserved2; //reserved and always = 0
uint16_t reserved3; //reserved and always = 0 //a supported device vector, each display path starts with this.the paths are enumerated in the way of priority, //a path appears first
uint16_t device_tag;
uint16_t reserved4; //reserved and always = 0
};
struct display_object_info_table_v1_4
{ struct atom_common_table_header table_header;
uint16_t supporteddevices;
uint8_t number_of_path;
uint8_t reserved; struct atom_display_object_path_v2 display_path[]; //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
};
struct display_object_info_table_v1_5 { struct atom_common_table_header table_header;
uint16_t supporteddevices;
uint8_t number_of_path;
uint8_t reserved; // the real number of this included in the structure is calculated by using the // (whole structure size - the header size- number_of_path)/size of atom_display_object_path struct atom_display_object_path_v3 display_path[];
};
/* *************************************************************************** Data Table dce_info structure ***************************************************************************
*/ struct atom_display_controller_info_v4_1
{ struct atom_common_table_header table_header;
uint32_t display_caps;
uint32_t bootup_dispclk_10khz;
uint16_t dce_refclk_10khz;
uint16_t i2c_engine_refclk_10khz;
uint16_t dvi_ss_percentage; // in unit of 0.001%
uint16_t dvi_ss_rate_10hz;
uint16_t hdmi_ss_percentage; // in unit of 0.001%
uint16_t hdmi_ss_rate_10hz;
uint16_t dp_ss_percentage; // in unit of 0.001%
uint16_t dp_ss_rate_10hz;
uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t ss_reserved;
uint8_t hardcode_mode_num; // a hardcode mode number defined in StandardVESA_TimingTable when a CRT or DFP EDID is not available
uint8_t reserved1[3];
uint16_t dpphy_refclk_10khz;
uint16_t reserved2;
uint8_t dceip_min_ver;
uint8_t dceip_max_ver;
uint8_t max_disp_pipe_num;
uint8_t max_vbios_active_disp_pipe_num;
uint8_t max_ppll_num;
uint8_t max_disp_phy_num;
uint8_t max_aux_pairs;
uint8_t remotedisplayconfig;
uint8_t reserved3[8];
};
struct atom_display_controller_info_v4_2
{ struct atom_common_table_header table_header;
uint32_t display_caps;
uint32_t bootup_dispclk_10khz;
uint16_t dce_refclk_10khz;
uint16_t i2c_engine_refclk_10khz;
uint16_t dvi_ss_percentage; // in unit of 0.001%
uint16_t dvi_ss_rate_10hz;
uint16_t hdmi_ss_percentage; // in unit of 0.001%
uint16_t hdmi_ss_rate_10hz;
uint16_t dp_ss_percentage; // in unit of 0.001%
uint16_t dp_ss_rate_10hz;
uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t ss_reserved;
uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint16_t dpphy_refclk_10khz;
uint16_t reserved2;
uint8_t dcnip_min_ver;
uint8_t dcnip_max_ver;
uint8_t max_disp_pipe_num;
uint8_t max_vbios_active_disp_pipe_num;
uint8_t max_ppll_num;
uint8_t max_disp_phy_num;
uint8_t max_aux_pairs;
uint8_t remotedisplayconfig;
uint8_t reserved3[8];
};
struct atom_display_controller_info_v4_3
{ struct atom_common_table_header table_header;
uint32_t display_caps;
uint32_t bootup_dispclk_10khz;
uint16_t dce_refclk_10khz;
uint16_t i2c_engine_refclk_10khz;
uint16_t dvi_ss_percentage; // in unit of 0.001%
uint16_t dvi_ss_rate_10hz;
uint16_t hdmi_ss_percentage; // in unit of 0.001%
uint16_t hdmi_ss_rate_10hz;
uint16_t dp_ss_percentage; // in unit of 0.001%
uint16_t dp_ss_rate_10hz;
uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t ss_reserved;
uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint16_t dpphy_refclk_10khz;
uint16_t reserved2;
uint8_t dcnip_min_ver;
uint8_t dcnip_max_ver;
uint8_t max_disp_pipe_num;
uint8_t max_vbios_active_disp_pipe_num;
uint8_t max_ppll_num;
uint8_t max_disp_phy_num;
uint8_t max_aux_pairs;
uint8_t remotedisplayconfig;
uint8_t reserved3[8];
};
struct atom_display_controller_info_v4_4 { struct atom_common_table_header table_header;
uint32_t display_caps;
uint32_t bootup_dispclk_10khz;
uint16_t dce_refclk_10khz;
uint16_t i2c_engine_refclk_10khz;
uint16_t dvi_ss_percentage; // in unit of 0.001%
uint16_t dvi_ss_rate_10hz;
uint16_t hdmi_ss_percentage; // in unit of 0.001%
uint16_t hdmi_ss_rate_10hz;
uint16_t dp_ss_percentage; // in unit of 0.001%
uint16_t dp_ss_rate_10hz;
uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t ss_reserved;
uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint16_t dpphy_refclk_10khz;
uint16_t hw_chip_id;
uint8_t dcnip_min_ver;
uint8_t dcnip_max_ver;
uint8_t max_disp_pipe_num;
uint8_t max_vbios_active_disp_pipum;
uint8_t max_ppll_num;
uint8_t max_disp_phy_num;
uint8_t max_aux_pairs;
uint8_t remotedisplayconfig;
uint32_t dispclk_pll_vco_freq;
uint32_t dp_ref_clk_freq;
uint32_t max_mclk_chg_lat; // Worst case blackout duration for a memory clock frequency (p-state) change, units of 100s of ns (0.1 us)
uint32_t max_sr_exit_lat; // Worst case memory self refresh exit time, units of 100ns of ns (0.1us)
uint32_t max_sr_enter_exit_lat; // Worst case memory self refresh entry followed by immediate exit time, units of 100ns of ns (0.1us)
uint16_t dc_golden_table_offset; // point of struct of atom_dc_golden_table_vxx
uint16_t dc_golden_table_ver;
uint32_t reserved3[3];
};
enum dce_info_caps_def { // only for VBIOS
DCE_INFO_CAPS_FORCE_DISPDEV_CONNECTED = 0x02, // only for VBIOS
DCE_INFO_CAPS_DISABLE_DFP_DP_HBR2 = 0x04, // only for VBIOS
DCE_INFO_CAPS_ENABLE_INTERLAC_TIMING = 0x08, // only for VBIOS
DCE_INFO_CAPS_LTTPR_SUPPORT_ENABLE = 0x20,
DCE_INFO_CAPS_VBIOS_LTTPR_TRANSPARENT_ENABLE = 0x40,
};
struct atom_display_controller_info_v4_5
{ struct atom_common_table_header table_header;
uint32_t display_caps;
uint32_t bootup_dispclk_10khz;
uint16_t dce_refclk_10khz;
uint16_t i2c_engine_refclk_10khz;
uint16_t dvi_ss_percentage; // in unit of 0.001%
uint16_t dvi_ss_rate_10hz;
uint16_t hdmi_ss_percentage; // in unit of 0.001%
uint16_t hdmi_ss_rate_10hz;
uint16_t dp_ss_percentage; // in unit of 0.001%
uint16_t dp_ss_rate_10hz;
uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
uint8_t ss_reserved; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
uint8_t dfp_hardcode_mode_num; // DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
uint8_t dfp_hardcode_refreshrate; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
uint8_t vga_hardcode_refreshrate;
uint16_t dpphy_refclk_10khz;
uint16_t hw_chip_id;
uint8_t dcnip_min_ver;
uint8_t dcnip_max_ver;
uint8_t max_disp_pipe_num;
uint8_t max_vbios_active_disp_pipe_num;
uint8_t max_ppll_num;
uint8_t max_disp_phy_num;
uint8_t max_aux_pairs;
uint8_t remotedisplayconfig;
uint32_t dispclk_pll_vco_freq;
uint32_t dp_ref_clk_freq; // Worst case blackout duration for a memory clock frequency (p-state) change, units of 100s of ns (0.1 us)
uint32_t max_mclk_chg_lat; // Worst case memory self refresh exit time, units of 100ns of ns (0.1us)
uint32_t max_sr_exit_lat; // Worst case memory self refresh entry followed by immediate exit time, units of 100ns of ns (0.1us)
uint32_t max_sr_enter_exit_lat;
uint16_t dc_golden_table_offset; // point of struct of atom_dc_golden_table_vxx
uint16_t dc_golden_table_ver;
uint32_t aux_dphy_rx_control0_val;
uint32_t aux_dphy_tx_control_val;
uint32_t aux_dphy_rx_control1_val;
uint32_t dc_gpio_aux_ctrl_0_val;
uint32_t dc_gpio_aux_ctrl_1_val;
uint32_t dc_gpio_aux_ctrl_2_val;
uint32_t dc_gpio_aux_ctrl_3_val;
uint32_t dc_gpio_aux_ctrl_4_val;
uint32_t dc_gpio_aux_ctrl_5_val;
uint32_t reserved[26];
};
/* *************************************************************************** Data Table ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO structure ***************************************************************************
*/ struct atom_ext_display_path
{
uint16_t device_tag; //A bit vector to show what devices are supported
uint16_t device_acpi_enum; //16bit device ACPI id.
uint16_t connectorobjid; //A physical connector for displays to plug in, using object connector definitions
uint8_t auxddclut_index; //An index into external AUX/DDC channel LUT
uint8_t hpdlut_index; //An index into external HPD pin LUT
uint16_t ext_encoder_objid; //external encoder object id
uint8_t channelmapping; // if ucChannelMapping=0, using default one to one mapping
uint8_t chpninvert; // bit vector for up to 8 lanes, =0: P and N is not invert, =1 P and N is inverted
uint16_t caps;
uint16_t reserved;
};
struct atom_external_display_connection_info
{ struct atom_common_table_header table_header;
uint8_t guid[16]; // a GUID is a 16 byte long string struct atom_ext_display_path path[7]; // total of fixed 7 entries.
uint8_t checksum; // a simple Checksum of the sum of whole structure equal to 0x0.
uint8_t stereopinid; // use for eDP panel
uint8_t remotedisplayconfig;
uint8_t edptolvdsrxid;
uint8_t fixdpvoltageswing; // usCaps[1]=1, this indicate DP_LANE_SET value
uint8_t reserved[3]; // for potential expansion
};
/* *************************************************************************** Data Table integratedsysteminfo structure ***************************************************************************
*/
struct atom_camera_module_info
{
uint8_t module_id; // 0: Rear, 1: Front right of user, 2: Front left of user
uint8_t module_name[8]; struct atom_camera_dphy_timing_param timingparam[6]; // Exact number is under estimation and confirmation from sensor vendor
};
struct atom_integrated_system_info_v2_2
{ struct atom_common_table_header table_header;
uint32_t vbios_misc; //enum of atom_system_vbiosmisc_def
uint32_t gpucapinfo; //enum of atom_system_gpucapinf_def
uint32_t system_config;
uint32_t cpucapinfo;
uint16_t gpuclk_ss_percentage; //unit of 0.001%, 1000 mean 1%
uint16_t gpuclk_ss_type;
uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
uint8_t umachannelnumber; // number of memory channels
uint8_t htc_hyst_limit;
uint8_t htc_tmp_limit;
uint8_t reserved1;
uint8_t reserved2; struct edp_info_table edp1_info; struct edp_info_table edp2_info;
uint32_t reserved3[8]; struct atom_external_display_connection_info extdispconninfo;
uint32_t reserved4[189];
};
struct uma_carveout_option { char optionName[29]; //max length of string is 28chars + '\0'. Current design is for "minimum", "Medium", "High". This makes entire struct size 64bits
uint8_t memoryCarvedGb; //memory carved out with setting
uint8_t memoryRemainingGb; //memory remaining on system union { struct _flags {
uint8_t Auto : 1;
uint8_t Custom : 1;
uint8_t Reserved : 6;
} flags;
uint8_t all8;
} uma_carveout_option_flags;
};
struct atom_integrated_system_info_v2_3 { struct atom_common_table_header table_header;
uint32_t vbios_misc; // enum of atom_system_vbiosmisc_def
uint32_t gpucapinfo; // enum of atom_system_gpucapinf_def
uint32_t system_config;
uint32_t cpucapinfo;
uint16_t gpuclk_ss_percentage; // unit of 0.001%, 1000 mean 1%
uint16_t gpuclk_ss_type;
uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
uint8_t umachannelnumber; // number of memory channels
uint8_t htc_hyst_limit;
uint8_t htc_tmp_limit;
uint8_t reserved1; // dp_ss_control
uint8_t gpu_package_id; struct edp_info_table edp1_info; struct edp_info_table edp2_info;
uint32_t reserved2[8]; struct atom_external_display_connection_info extdispconninfo;
uint8_t UMACarveoutVersion;
uint8_t UMACarveoutIndexMax;
uint8_t UMACarveoutTypeDefault;
uint8_t UMACarveoutIndexDefault;
uint8_t UMACarveoutType; //Auto or Custom
uint8_t UMACarveoutIndex; struct uma_carveout_option UMASizeControlOption[20];
uint8_t reserved3[110];
};
//memorytype DMI Type 17 offset 12h - Memory Type enum atom_dmi_t17_mem_type_def{
OtherMemType = 0x01, ///< Assign 01 to Other
UnknownMemType, ///< Assign 02 to Unknown
DramMemType, ///< Assign 03 to DRAM
EdramMemType, ///< Assign 04 to EDRAM
VramMemType, ///< Assign 05 to VRAM
SramMemType, ///< Assign 06 to SRAM
RamMemType, ///< Assign 07 to RAM
RomMemType, ///< Assign 08 to ROM
FlashMemType, ///< Assign 09 to Flash
EepromMemType, ///< Assign 10 to EEPROM
FepromMemType, ///< Assign 11 to FEPROM
EpromMemType, ///< Assign 12 to EPROM
CdramMemType, ///< Assign 13 to CDRAM
ThreeDramMemType, ///< Assign 14 to 3DRAM
SdramMemType, ///< Assign 15 to SDRAM
SgramMemType, ///< Assign 16 to SGRAM
RdramMemType, ///< Assign 17 to RDRAM
DdrMemType, ///< Assign 18 to DDR
Ddr2MemType, ///< Assign 19 to DDR2
Ddr2FbdimmMemType, ///< Assign 20 to DDR2 FB-DIMM
Ddr3MemType = 0x18, ///< Assign 24 to DDR3
Fbd2MemType, ///< Assign 25 to FBD2
Ddr4MemType, ///< Assign 26 to DDR4
LpDdrMemType, ///< Assign 27 to LPDDR
LpDdr2MemType, ///< Assign 28 to LPDDR2
LpDdr3MemType, ///< Assign 29 to LPDDR3
LpDdr4MemType, ///< Assign 30 to LPDDR4
GDdr6MemType, ///< Assign 31 to GDDR6
HbmMemType, ///< Assign 32 to HBM
Hbm2MemType, ///< Assign 33 to HBM2
Ddr5MemType, ///< Assign 34 to DDR5
LpDdr5MemType, ///< Assign 35 to LPDDR5
};
// this Table is used starting from NL/AM, used by SBIOS and pass the IntegratedSystemInfoTable/PowerPlayInfoTable/SystemCameraInfoTable struct atom_fusion_system_info_v4
{ struct atom_integrated_system_info_v1_11 sysinfo; // refer to ATOM_INTEGRATED_SYSTEM_INFO_V1_8 definition
uint32_t powerplayinfo[256]; // Reserve 1024 bytes space for PowerPlayInfoTable
};
/* *************************************************************************** Data Table gfx_info structure ***************************************************************************
*/
/* *************************************************************************** Data Table smu_info structure ***************************************************************************
*/ struct atom_smu_info_v3_1
{ struct atom_common_table_header table_header;
uint8_t smuip_min_ver;
uint8_t smuip_max_ver;
uint8_t smu_rsd1;
uint8_t gpuclk_ss_mode; // enum of atom_spread_spectrum_mode
uint16_t sclk_ss_percentage;
uint16_t sclk_ss_rate_10hz;
uint16_t gpuclk_ss_percentage; // in unit of 0.001%
uint16_t gpuclk_ss_rate_10hz;
uint32_t core_refclk_10khz;
uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
uint8_t fw_ctf_polarity; // GPIO polarity for CTF
};
struct atom_smu_info_v3_2 { struct atom_common_table_header table_header;
uint8_t smuip_min_ver;
uint8_t smuip_max_ver;
uint8_t smu_rsd1;
uint8_t gpuclk_ss_mode;
uint16_t sclk_ss_percentage;
uint16_t sclk_ss_rate_10hz;
uint16_t gpuclk_ss_percentage; // in unit of 0.001%
uint16_t gpuclk_ss_rate_10hz;
uint32_t core_refclk_10khz;
uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
uint8_t fw_ctf_polarity; // GPIO polarity for CTF
uint8_t pcc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for PCC, =0xff means invalid
uint8_t pcc_gpio_polarity; // GPIO polarity for CTF
uint16_t smugoldenoffset;
uint32_t gpupll_vco_freq_10khz;
uint32_t bootup_smnclk_10khz;
uint32_t bootup_socclk_10khz;
uint32_t bootup_mp0clk_10khz;
uint32_t bootup_mp1clk_10khz;
uint32_t bootup_lclk_10khz;
uint32_t bootup_dcefclk_10khz;
uint32_t ctf_threshold_override_value;
uint32_t reserved[5];
};
struct atom_smu_info_v3_3 { struct atom_common_table_header table_header;
uint8_t smuip_min_ver;
uint8_t smuip_max_ver;
uint8_t waflclk_ss_mode;
uint8_t gpuclk_ss_mode;
uint16_t sclk_ss_percentage;
uint16_t sclk_ss_rate_10hz;
uint16_t gpuclk_ss_percentage; // in unit of 0.001%
uint16_t gpuclk_ss_rate_10hz;
uint32_t core_refclk_10khz;
uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
uint8_t fw_ctf_polarity; // GPIO polarity for CTF
uint8_t pcc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for PCC, =0xff means invalid
uint8_t pcc_gpio_polarity; // GPIO polarity for CTF
uint16_t smugoldenoffset;
uint32_t gpupll_vco_freq_10khz;
uint32_t bootup_smnclk_10khz;
uint32_t bootup_socclk_10khz;
uint32_t bootup_mp0clk_10khz;
uint32_t bootup_mp1clk_10khz;
uint32_t bootup_lclk_10khz;
uint32_t bootup_dcefclk_10khz;
uint32_t ctf_threshold_override_value;
uint32_t syspll3_0_vco_freq_10khz;
uint32_t syspll3_1_vco_freq_10khz;
uint32_t bootup_fclk_10khz;
uint32_t bootup_waflclk_10khz;
uint32_t smu_info_caps;
uint16_t waflclk_ss_percentage; // in unit of 0.001%
uint16_t smuinitoffset;
uint32_t reserved;
};
// SVI2 Board Parameters
uint16_t MaxVoltageStepGfx; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
uint16_t MaxVoltageStepSoc; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t ExternalSensorPresent; // External RDI connected to TMON (aka TEMP IN)
uint8_t Padding8_V;
// Telemetry Settings
uint16_t GfxMaxCurrent; // in Amps
uint8_t GfxOffset; // in Amps
uint8_t Padding_TelemetryGfx;
uint16_t SocMaxCurrent; // in Amps
uint8_t SocOffset; // in Amps
uint8_t Padding_TelemetrySoc;
uint16_t Mem0MaxCurrent; // in Amps
uint8_t Mem0Offset; // in Amps
uint8_t Padding_TelemetryMem0;
uint16_t Mem1MaxCurrent; // in Amps
uint8_t Mem1Offset; // in Amps
uint8_t Padding_TelemetryMem1;
// GPIO Settings
uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
uint8_t GthrGpio; // GPIO pin configured for GTHR Event
uint8_t GthrPolarity; // replace GPIO polarity for GTHR
// LED Display Settings
uint8_t LedPin0; // GPIO number for LedPin[0]
uint8_t LedPin1; // GPIO number for LedPin[1]
uint8_t LedPin2; // GPIO number for LedPin[2]
uint8_t padding8_4;
// GFXCLK PLL Spread Spectrum
uint8_t PllGfxclkSpreadEnabled; // on or off
uint8_t PllGfxclkSpreadPercent; // Q4.4
uint16_t PllGfxclkSpreadFreq; // kHz
// GFXCLK DFLL Spread Spectrum
uint8_t DfllGfxclkSpreadEnabled; // on or off
uint8_t DfllGfxclkSpreadPercent; // Q4.4
uint16_t DfllGfxclkSpreadFreq; // kHz
// UCLK Spread Spectrum
uint8_t UclkSpreadEnabled; // on or off
uint8_t UclkSpreadPercent; // Q4.4
uint16_t UclkSpreadFreq; // kHz
// SOCCLK Spread Spectrum
uint8_t SoclkSpreadEnabled; // on or off
uint8_t SocclkSpreadPercent; // Q4.4
uint16_t SocclkSpreadFreq; // kHz
// Total board power
uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
uint16_t BoardPadding;
// Mvdd Svi2 Div Ratio Setting
uint32_t MvddRatio; // This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16)
uint32_t BoardReserved[9];
};
struct atom_smc_dpm_info_v4_6
{ struct atom_common_table_header table_header; // section: board parameters
uint32_t i2c_padding[3]; // old i2c control are moved to new area
uint16_t maxvoltagestepgfx; // in mv(q2) max voltage step that smu will request. multiple steps are taken if voltage change exceeds this value.
uint16_t maxvoltagestepsoc; // in mv(q2) max voltage step that smu will request. multiple steps are taken if voltage change exceeds this value.
uint8_t vddgfxvrmapping; // use vr_mapping* bitfields
uint8_t vddsocvrmapping; // use vr_mapping* bitfields
uint8_t vddmemvrmapping; // use vr_mapping* bitfields
uint8_t boardvrmapping; // use vr_mapping* bitfields
uint8_t gfxulvphasesheddingmask; // set this to 1 to set psi0/1 to 1 in ulv mode
uint8_t externalsensorpresent; // external rdi connected to tmon (aka temp in)
uint8_t padding8_v[2];
// telemetry settings
uint16_t gfxmaxcurrent; // in amps
uint8_t gfxoffset; // in amps
uint8_t padding_telemetrygfx;
uint16_t socmaxcurrent; // in amps
uint8_t socoffset; // in amps
uint8_t padding_telemetrysoc;
uint16_t memmaxcurrent; // in amps
uint8_t memoffset; // in amps
uint8_t padding_telemetrymem;
uint16_t boardmaxcurrent; // in amps
uint8_t boardoffset; // in amps
uint8_t padding_telemetryboardinput;
// gpio settings
uint8_t vr0hotgpio; // gpio pin configured for vr0 hot event
uint8_t vr0hotpolarity; // gpio polarity for vr0 hot event
uint8_t vr1hotgpio; // gpio pin configured for vr1 hot event
uint8_t vr1hotpolarity; // gpio polarity for vr1 hot event
// gfxclk pll spread spectrum
uint8_t pllgfxclkspreadenabled; // on or off
uint8_t pllgfxclkspreadpercent; // q4.4
uint16_t pllgfxclkspreadfreq; // khz
// uclk spread spectrum
uint8_t uclkspreadenabled; // on or off
uint8_t uclkspreadpercent; // q4.4
uint16_t uclkspreadfreq; // khz
// fclk spread spectrum
uint8_t fclkspreadenabled; // on or off
uint8_t fclkspreadpercent; // q4.4
uint16_t fclkspreadfreq; // khz
// gfxclk fll spread spectrum
uint8_t fllgfxclkspreadenabled; // on or off
uint8_t fllgfxclkspreadpercent; // q4.4
uint16_t fllgfxclkspreadfreq; // khz
// SVI2 Board Parameters
uint16_t MaxVoltageStepGfx; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
uint16_t MaxVoltageStepSoc; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t ExternalSensorPresent; // External RDI connected to TMON (aka TEMP IN)
uint8_t Padding8_V;
// Telemetry Settings
uint16_t GfxMaxCurrent; // in Amps
uint8_t GfxOffset; // in Amps
uint8_t Padding_TelemetryGfx;
uint16_t SocMaxCurrent; // in Amps
uint8_t SocOffset; // in Amps
uint8_t Padding_TelemetrySoc;
uint16_t Mem0MaxCurrent; // in Amps
uint8_t Mem0Offset; // in Amps
uint8_t Padding_TelemetryMem0;
uint16_t Mem1MaxCurrent; // in Amps
uint8_t Mem1Offset; // in Amps
uint8_t Padding_TelemetryMem1;
// GPIO Settings
uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
uint8_t GthrGpio; // GPIO pin configured for GTHR Event
uint8_t GthrPolarity; // replace GPIO polarity for GTHR
// LED Display Settings
uint8_t LedPin0; // GPIO number for LedPin[0]
uint8_t LedPin1; // GPIO number for LedPin[1]
uint8_t LedPin2; // GPIO number for LedPin[2]
uint8_t padding8_4;
// GFXCLK PLL Spread Spectrum
uint8_t PllGfxclkSpreadEnabled; // on or off
uint8_t PllGfxclkSpreadPercent; // Q4.4
uint16_t PllGfxclkSpreadFreq; // kHz
// GFXCLK DFLL Spread Spectrum
uint8_t DfllGfxclkSpreadEnabled; // on or off
uint8_t DfllGfxclkSpreadPercent; // Q4.4
uint16_t DfllGfxclkSpreadFreq; // kHz
// UCLK Spread Spectrum
uint8_t UclkSpreadEnabled; // on or off
uint8_t UclkSpreadPercent; // Q4.4
uint16_t UclkSpreadFreq; // kHz
// SOCCLK Spread Spectrum
uint8_t SoclkSpreadEnabled; // on or off
uint8_t SocclkSpreadPercent; // Q4.4
uint16_t SocclkSpreadFreq; // kHz
// Total board power
uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
uint16_t BoardPadding;
// Mvdd Svi2 Div Ratio Setting
uint32_t MvddRatio; // This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16)
// GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence
uint8_t GpioI2cScl; // Serial Clock
uint8_t GpioI2cSda; // Serial Data
uint16_t GpioPadding;
// Additional LED Display Settings
uint8_t LedPin3; // GPIO number for LedPin[3] - PCIE GEN Speed
uint8_t LedPin4; // GPIO number for LedPin[4] - PMFW Error Status
uint16_t LedEnableMask;
// Power Limit Scalars
uint8_t PowerLimitScalar[4]; //[PPT_THROTTLER_COUNT]
// SECTION: I2C Control struct smudpm_i2c_controller_config_v3 I2cControllers[16];
uint8_t GpioScl; // GPIO Number for SCL Line, used only for CKSVII2C1
uint8_t GpioSda; // GPIO Number for SDA Line, used only for CKSVII2C1
uint8_t FchUsbPdSlaveAddr; //For requesting USB PD controller S-states via FCH I2C when entering PME turn off
uint8_t I2cSpare;
// SECTION: SVI2 Board Parameters
uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t VddciUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
uint8_t MvddUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
// SECTION: Telemetry Settings
uint16_t GfxMaxCurrent; // in Amps
uint8_t GfxOffset; // in Amps
uint8_t Padding_TelemetryGfx;
uint16_t SocMaxCurrent; // in Amps
uint8_t SocOffset; // in Amps
uint8_t Padding_TelemetrySoc;
uint16_t Mem0MaxCurrent; // in Amps
uint8_t Mem0Offset; // in Amps
uint8_t Padding_TelemetryMem0;
uint16_t Mem1MaxCurrent; // in Amps
uint8_t Mem1Offset; // in Amps
uint8_t Padding_TelemetryMem1;
uint32_t MvddRatio; // This is used for MVDD Svi2 Div Ratio workaround. It has 16 fractional bits (Q16.16)
// SECTION: GPIO Settings
uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
uint8_t GthrGpio; // GPIO pin configured for GTHR Event
uint8_t GthrPolarity; // replace GPIO polarity for GTHR
// LED Display Settings
uint8_t LedPin0; // GPIO number for LedPin[0]
uint8_t LedPin1; // GPIO number for LedPin[1]
uint8_t LedPin2; // GPIO number for LedPin[2]
uint8_t LedEnableMask;
uint8_t LedPcie; // GPIO number for PCIE results
uint8_t LedError; // GPIO number for Error Cases
uint8_t LedSpare1[2];
// SECTION: Clock Spread Spectrum
// GFXCLK PLL Spread Spectrum
uint8_t PllGfxclkSpreadEnabled; // on or off
uint8_t PllGfxclkSpreadPercent; // Q4.4
uint16_t PllGfxclkSpreadFreq; // kHz
// GFXCLK DFLL Spread Spectrum
uint8_t DfllGfxclkSpreadEnabled; // on or off
uint8_t DfllGfxclkSpreadPercent; // Q4.4
uint16_t DfllGfxclkSpreadFreq; // kHz
// UCLK Spread Spectrum
uint8_t UclkSpreadEnabled; // on or off
uint8_t UclkSpreadPercent; // Q4.4
uint16_t UclkSpreadFreq; // kHz
// FCLK Spread Spectrum
uint8_t FclkSpreadEnabled; // on or off
uint8_t FclkSpreadPercent; // Q4.4
uint16_t FclkSpreadFreq; // kHz
// Section: Memory Config
uint32_t MemoryChannelEnabled; // For DRAM use only, Max 32 channels enabled bit mask.
uint8_t DramBitWidth; // For DRAM use only. See Dram Bit width type defines
uint8_t PaddingMem1[3];
// Section: Total Board Power
uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
uint16_t BoardPowerPadding;
// SECTION: XGMI Training
uint8_t XgmiLinkSpeed [4];
uint8_t XgmiLinkWidth [4];
// GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence
uint8_t GpioI2cScl; // Serial Clock
uint8_t GpioI2cSda; // Serial Data
uint16_t spare5;
/* *************************************************************************** Data Table vram_info structure ***************************************************************************
*/ struct atom_vram_module_v9 { // Design Specific Values
uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
uint32_t max_mem_clk; // max memory clock of this memory in unit of 10kHz, =0 means it is not defined
uint16_t reserved[3];
uint16_t mem_voltage; // mem_voltage
uint16_t vram_module_size; // Size of atom_vram_module_v9
uint8_t ext_memory_id; // Current memory module ID
uint8_t memory_type; // enum of atom_dgpu_vram_type
uint8_t channel_num; // Number of mem. channels supported in this module
uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
uint8_t tunningset_id; // MC phy registers set per.
uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
uint8_t hbm_ven_rev_id; // hbm_ven_rev_id
uint8_t vram_rsd2; // reserved char dram_pnstring[20]; // part number end with '0'.
};
struct atom_vram_info_header_v2_3 { struct atom_common_table_header table_header;
uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust setting
uint16_t mem_clk_patch_tbloffset; // offset of atom_umc_init_reg_block structure for memory clock specific UMC setting
uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
uint16_t dram_data_remap_tbloffset; // reserved for now
uint16_t tmrs_seq_offset; // offset of HBM tmrs
uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
uint16_t vram_rsd2;
uint8_t vram_module_num; // indicate number of VRAM module
uint8_t umcip_min_ver;
uint8_t umcip_max_ver;
uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset struct atom_vram_module_v9 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
};
union atom_umc_reg_setting_id_config_access
{ struct atom_umc_reg_setting_id_config umc_id_access;
uint32_t u32umc_id_access;
};
struct atom_umc_reg_setting_data_block{ union atom_umc_reg_setting_id_config_access block_id;
uint32_t u32umc_reg_data[1];
};
struct atom_umc_init_reg_block{
uint16_t umc_reg_num;
uint16_t reserved; union atom_umc_register_addr_info_access umc_reg_list[1]; //for allocation purpose, the real number come from umc_reg_num; struct atom_umc_reg_setting_data_block umc_reg_setting_list[1];
};
struct atom_vram_module_v10 { // Design Specific Values
uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
uint32_t max_mem_clk; // max memory clock of this memory in unit of 10kHz, =0 means it is not defined
uint16_t reserved[3];
uint16_t mem_voltage; // mem_voltage
uint16_t vram_module_size; // Size of atom_vram_module_v9
uint8_t ext_memory_id; // Current memory module ID
uint8_t memory_type; // enum of atom_dgpu_vram_type
uint8_t channel_num; // Number of mem. channels supported in this module
uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
uint8_t tunningset_id; // MC phy registers set per
uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
uint8_t vram_flags; // bit0= bankgroup enable
uint8_t vram_rsd2; // reserved
uint16_t gddr6_mr10; // gddr6 mode register10 value
uint16_t gddr6_mr1; // gddr6 mode register1 value
uint16_t gddr6_mr2; // gddr6 mode register2 value
uint16_t gddr6_mr7; // gddr6 mode register7 value char dram_pnstring[20]; // part number end with '0'
};
struct atom_vram_info_header_v2_4 { struct atom_common_table_header table_header;
uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust setting
uint16_t mem_clk_patch_tbloffset; // offset of atom_umc_init_reg_block structure for memory clock specific UMC setting
uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
uint16_t dram_data_remap_tbloffset; // reserved for now
uint16_t reserved; // offset of reserved
uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
uint16_t vram_rsd2;
uint8_t vram_module_num; // indicate number of VRAM module
uint8_t umcip_min_ver;
uint8_t umcip_max_ver;
uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset struct atom_vram_module_v10 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
};
struct atom_vram_module_v11 { // Design Specific Values
uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
uint16_t mem_voltage; // mem_voltage
uint16_t vram_module_size; // Size of atom_vram_module_v9
uint8_t ext_memory_id; // Current memory module ID
uint8_t memory_type; // enum of atom_dgpu_vram_type
uint8_t channel_num; // Number of mem. channels supported in this module
uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
uint8_t tunningset_id; // MC phy registers set per.
uint16_t reserved[4]; // reserved
uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
uint8_t vram_flags; // bit0= bankgroup enable
uint8_t vram_rsd2; // reserved
uint16_t gddr6_mr10; // gddr6 mode register10 value
uint16_t gddr6_mr0; // gddr6 mode register0 value
uint16_t gddr6_mr1; // gddr6 mode register1 value
uint16_t gddr6_mr2; // gddr6 mode register2 value
uint16_t gddr6_mr4; // gddr6 mode register4 value
uint16_t gddr6_mr7; // gddr6 mode register7 value
uint16_t gddr6_mr8; // gddr6 mode register8 value char dram_pnstring[40]; // part number end with '0'.
};
struct atom_vram_info_header_v2_5 { struct atom_common_table_header table_header;
uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust settings
uint16_t gddr6_ac_timing_offset; // offset of atom_gddr6_ac_timing_v2_5 structure for memory clock specific UMC settings
uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
uint16_t dram_data_remap_tbloffset; // offset of atom_gddr6_dram_data_remap array to indicate DRAM data lane to GPU mapping
uint16_t reserved; // offset of reserved
uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
uint16_t strobe_mode_patch_tbloffset; // offset of atom_umc_init_reg_block structure for Strobe Mode memory clock specific UMC settings
uint8_t vram_module_num; // indicate number of VRAM module
uint8_t umcip_min_ver;
uint8_t umcip_max_ver;
uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset struct atom_vram_module_v11 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
};
struct atom_vram_info_header_v2_6 { struct atom_common_table_header table_header;
uint16_t mem_adjust_tbloffset;
uint16_t mem_clk_patch_tbloffset;
uint16_t mc_adjust_pertile_tbloffset;
uint16_t mc_phyinit_tbloffset;
uint16_t dram_data_remap_tbloffset;
uint16_t tmrs_seq_offset;
uint16_t post_ucode_init_offset;
uint16_t vram_rsd2;
uint8_t vram_module_num;
uint8_t umcip_min_ver;
uint8_t umcip_max_ver;
uint8_t mc_phy_tile_num; struct atom_vram_module_v9 vram_module[16];
}; /* *************************************************************************** Data Table voltageobject_info structure ***************************************************************************
*/ struct atom_i2c_data_entry
{
uint16_t i2c_reg_index; // i2c register address, can be up to 16bit
uint16_t i2c_reg_data; // i2c register data, can be up to 16bit
};
// atom_voltage_object_header_v4.voltage_mode enum atom_voltage_object_mode
{
VOLTAGE_OBJ_GPIO_LUT = 0, //VOLTAGE and GPIO Lookup table ->atom_gpio_voltage_object_v4
VOLTAGE_OBJ_VR_I2C_INIT_SEQ = 3, //VOLTAGE REGULATOR INIT sequece through I2C -> atom_i2c_voltage_object_v4
VOLTAGE_OBJ_PHASE_LUT = 4, //Set Vregulator Phase lookup table ->atom_gpio_voltage_object_v4
VOLTAGE_OBJ_SVID2 = 7, //Indicate voltage control by SVID2 ->atom_svid2_voltage_object_v4
VOLTAGE_OBJ_EVV = 8,
VOLTAGE_OBJ_MERGED_POWER = 9,
};
struct atom_i2c_voltage_object_v4
{ struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_VR_I2C_INIT_SEQ
uint8_t regulator_id; //Indicate Voltage Regulator Id
uint8_t i2c_id;
uint8_t i2c_slave_addr;
uint8_t i2c_control_offset;
uint8_t i2c_flag; // Bit0: 0 - One byte data; 1 - Two byte data
uint8_t i2c_speed; // =0, use default i2c speed, otherwise use it in unit of kHz.
uint8_t reserved[2]; struct atom_i2c_data_entry i2cdatalut[1]; // end with 0xff
};
struct atom_voltage_gpio_map_lut
{
uint32_t voltage_gpio_reg_val; // The Voltage ID which is used to program GPIO register
uint16_t voltage_level_mv; // The corresponding Voltage Value, in mV
};
struct atom_gpio_voltage_object_v4
{ struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_GPIO_LUT or VOLTAGE_OBJ_PHASE_LUT
uint8_t gpio_control_id; // default is 0 which indicate control through CG VID mode
uint8_t gpio_entry_num; // indiate the entry numbers of Votlage/Gpio value Look up table
uint8_t phase_delay_us; // phase delay in unit of micro second
uint8_t reserved;
uint32_t gpio_mask_val; // GPIO Mask value struct atom_voltage_gpio_map_lut voltage_gpio_lut[] __counted_by(gpio_entry_num);
};
struct atom_svid2_voltage_object_v4
{ struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_SVID2
uint8_t loadline_psi1; // bit4:0= loadline setting ( Core Loadline trim and offset trim ), bit5=0:PSI1_L disable =1: PSI1_L enable
uint8_t psi0_l_vid_thresd; // VR PSI0_L VID threshold
uint8_t psi0_enable; //
uint8_t maxvstep;
uint8_t telemetry_offset;
uint8_t telemetry_gain;
uint16_t reserved1;
};
struct atom_voltage_objects_info_v4_1
{ struct atom_common_table_header table_header; union atom_voltage_object_v4 voltage_object[1]; //Info for Voltage control
};
/* *************************************************************************** All Command Function structure definition ***************************************************************************
*/
/* *************************************************************************** Structures used by asic_init ***************************************************************************
*/
/* *************************************************************************** Structures used by setengineclock ***************************************************************************
*/
enum atom_set_engine_mem_clock_flag
{
b3NORMAL_CHANGE_CLOCK = 0,
b3FIRST_TIME_CHANGE_CLOCK = 0x08,
b3STORE_DPM_TRAINGING = 0x40, //Applicable to memory clock change,when set, it store specific DPM mode training result
};
/* *************************************************************************** Structures used by getengineclock ***************************************************************************
*/ struct get_engine_clock_parameter
{
uint32_t sclk_10khz; // current engine speed in 10KHz unit
uint32_t reserved;
};
/* *************************************************************************** Structures used by getmemoryclock ***************************************************************************
*/ struct get_memory_clock_parameter
{
uint32_t mclk_10khz; // current engine speed in 10KHz unit
uint32_t reserved;
};
/* *************************************************************************** Structures used by setvoltage ***************************************************************************
*/
struct set_voltage_parameters_v1_4
{
uint8_t voltagetype; /* enum atom_voltage_type */
uint8_t command; /* Indicate action: Set voltage level, enum atom_set_voltage_command */
uint16_t vlevel_mv; /* real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) */
};
/* *************************************************************************** Structures used by computegpuclockparam ***************************************************************************
*/
struct compute_gpu_clock_output_parameter_v1_8
{
uint32_t gpuclock_10khz:24; //Input= target clock, output = actual clock
uint32_t dfs_did:8; //return parameter: DFS divider which is used to program to register directly
uint32_t pll_fb_mult; //Feedback Multiplier, bit 8:0 int, bit 15:12 post_div, bit 31:16 frac
uint32_t pll_ss_fbsmult; // Spread FB Mult: bit 8:0 int, bit 31:16 frac
uint16_t pll_ss_slew_frac;
uint8_t pll_ss_enable;
uint8_t reserved;
uint32_t reserved1[2];
};
/* *************************************************************************** Structures used by ReadEfuseValue ***************************************************************************
*/
/* *************************************************************************** Structures used by dynamicmemorysettings ***************************************************************************
*/
union dynamic_memory_settings_parameters_v2_1
{ struct dynamic_mclk_settings_parameters_v2_1 mclk_setting; struct dynamic_sclk_settings_parameters_v2_1 sclk_setting;
};
/* *************************************************************************** Structures used by memorytraining ***************************************************************************
*/
/* *************************************************************************** Structures used by setpixelclock ***************************************************************************
*/
struct set_pixel_clock_parameter_v1_7
{
uint32_t pixclk_100hz; // target the pixel clock to drive the CRTC timing in unit of 100Hz.
uint8_t pll_id; // ATOM_PHY_PLL0/ATOM_PHY_PLL1/ATOM_PPLL0
uint8_t encoderobjid; // ASIC encoder id defined in objectId.h, // indicate which graphic encoder will be used.
uint8_t encoder_mode; // Encoder mode:
uint8_t miscinfo; // enum atom_set_pixel_clock_v1_7_misc_info
uint8_t crtc_id; // enum of atom_crtc_def
uint8_t deep_color_ratio; // HDMI panel bit depth: enum atom_set_pixel_clock_v1_7_deepcolor_ratio
uint8_t reserved1[2];
uint32_t reserved2;
};
/* deep_color_ratio */ enum atom_set_pixel_clock_v1_7_deepcolor_ratio
{
PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_DIS = 0x00, //00 - DCCG_DEEP_COLOR_DTO_DISABLE: Disable Deep Color DTO
PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_5_4 = 0x01, //01 - DCCG_DEEP_COLOR_DTO_5_4_RATIO: Set Deep Color DTO to 5:4
PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_3_2 = 0x02, //02 - DCCG_DEEP_COLOR_DTO_3_2_RATIO: Set Deep Color DTO to 3:2
PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_2_1 = 0x03, //03 - DCCG_DEEP_COLOR_DTO_2_1_RATIO: Set Deep Color DTO to 2:1
};
/* *************************************************************************** Structures used by setdceclock ***************************************************************************
*/
// SetDCEClock input parameter for DCE11.2( ELM and BF ) and above struct set_dce_clock_parameters_v2_1
{
uint32_t dceclk_10khz; // target DCE frequency in unit of 10KHZ, return real DISPCLK/DPREFCLK frequency.
uint8_t dceclktype; // =0: DISPCLK =1: DPREFCLK =2: PIXCLK
uint8_t dceclksrc; // ATOM_PLL0 or ATOM_GCK_DFS or ATOM_FCH_CLK or ATOM_COMBOPHY_PLLx
uint8_t dceclkflag; // Bit [1:0] = PPLL ref clock source ( when ucDCEClkSrc= ATOM_PPLL0 )
uint8_t crtc_id; // ucDisp Pipe Id, ATOM_CRTC0/1/2/..., use only when ucDCEClkType = PIXCLK
};
//ucDCEClkType enum atom_set_dce_clock_clock_type
{
DCE_CLOCK_TYPE_DISPCLK = 0,
DCE_CLOCK_TYPE_DPREFCLK = 1,
DCE_CLOCK_TYPE_PIXELCLK = 2, // used by VBIOS internally, called by SetPixelClock
};
//ucDCEClkFlag when ucDCEClkType == PIXCLK enum atom_set_dce_clock_pixclk_flag
{
DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_MASK = 0x03,
DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_DIS = 0x00, //00 - DCCG_DEEP_COLOR_DTO_DISABLE: Disable Deep Color DTO
DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_5_4 = 0x01, //01 - DCCG_DEEP_COLOR_DTO_5_4_RATIO: Set Deep Color DTO to 5:4
DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_3_2 = 0x02, //02 - DCCG_DEEP_COLOR_DTO_3_2_RATIO: Set Deep Color DTO to 3:2
DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_2_1 = 0x03, //03 - DCCG_DEEP_COLOR_DTO_2_1_RATIO: Set Deep Color DTO to 2:1
DCE_CLOCK_FLAG_PIXCLK_YUV420_MODE = 0x04,
};
/****************************************************************************/ // Structures used by processauxchanneltransaction /****************************************************************************/
/****************************************************************************/ // Structures used by selectcrtc_source /****************************************************************************/
/****************************************************************************/ // Structures used by digxencodercontrol /****************************************************************************/
/****************************************************************************/ // Structures used by ExternalEncoderControl V2.4 /****************************************************************************/
struct external_encoder_control_parameters_v2_4
{
uint16_t pixelclock_10khz; // pixel clock in 10Khz, valid when ucAction=SETUP/ENABLE_OUTPUT
uint8_t config; // indicate which encoder, and DP link rate when ucAction = SETUP/ENABLE_OUTPUT
uint8_t action; //
uint8_t encodermode; // encoder mode, only used when ucAction = SETUP/ENABLE_OUTPUT
uint8_t lanenum; // lane number, only used when ucAction = SETUP/ENABLE_OUTPUT
uint8_t bitpercolor; // output bit per color, only valid when ucAction = SETUP/ENABLE_OUTPUT and ucEncodeMode= DP
uint8_t hpd_id;
};
struct uefi_acpi_vfct{ struct amd_acpi_description_header sheader;
uint8_t tableUUID[16]; //0x24
uint32_t vbiosimageoffset; //0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the stucture.
uint32_t lib1Imageoffset; //0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the stucture.
uint32_t reserved[4]; //0x3C
};
/* *************************************************************************** Scratch Register definitions Each number below indicates which scratch regiser request, Active and Connect all share the same definitions as display_device_tag defines ***************************************************************************
*/
enum scratch_register_def{
ATOM_DEVICE_CONNECT_INFO_DEF = 0,
ATOM_BL_BRI_LEVEL_INFO_DEF = 2,
ATOM_ACTIVE_INFO_DEF = 3,
ATOM_LCD_INFO_DEF = 4,
ATOM_DEVICE_REQ_INFO_DEF = 5,
ATOM_ACC_CHANGE_INFO_DEF = 6,
ATOM_PRE_OS_MODE_INFO_DEF = 7,
ATOM_PRE_OS_ASSERTION_DEF = 8, //For GOP to record a 32bit assertion code, this is enabled by default in prodution GOP drivers.
ATOM_INTERNAL_TIMER_INFO_DEF = 10,
};
/* *************************************************************************** ATOM firmware ID header file !! Please keep it at end of the atomfirmware.h !! ***************************************************************************
*/ #include"atomfirmwareid.h" #pragmapack()
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.100 Sekunden
(vorverarbeitet am 2026-04-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.