-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathir356xx.h
66 lines (56 loc) · 2.33 KB
/
ir356xx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef __IR356XX_H
#define __IR356XX_H
#include <stdint.h>
#include <stdbool.h>
#include "vrm.h"
#define IR356XX_I2C_BASE_ADDRESS_REG 0x12
#define IR356XX_LOADLINE_CALIBRATION_REG 0x38
#define IR356XX_SET_VOLTAGE_LOOP1_REG 0x6A
#define IR356XX_SET_VOLTAGE_LOOP2_REG 0x6C
#define IR356XX_VOLTAGE_OFFSET_LOOP1_REG 0x8D
#define IR356XX_VOLTAGE_OFFSET_LOOP2_REG 0x8E
#define IR356XX_IDENTIFICATION_REG 0x92
#define IR356XX_GET_VOLTAGE_LOOP1_REG 0x9A
#define IR356XX_GET_VOLTAGE_LOOP2_REG 0x9B
#define IR356XX_GET_CURRENT_LOOP1_REG 0x9C
#define IR356XX_GET_CURRENT_LOOP2_REG 0x9D
#define IR356XX_GET_TEMP_LOOP1_REG 0x9E
#define IR356XX_GET_TEMP_LOOP2_REG 0x9F
#define IR356XX_PMBUS_TEMP_CURLOOP 0x8D
#define IR356XX_PMBUS_TEMP_AUXLOOP 0x8E
#define IR356XX_PMBUS_SET_I2C 0xD6
#define IR356XX_PMBUS_READ_EFFICIENCY 0xD7
#define IR356XX_IDENTIFICATION_VALUE 0x43
#define IR356XX_MODEL_IR3563B 0x40
#define IR356XX_MODEL_IR3564B 0x41
#define IR356XX_MODEL_IR3565B 0x42
#define IR356XX_MODEL_IR3566B 0x43
#define IR356XX_MODEL_IR3567B 0x44
#define IR356XX_MODEL_IR3570B 0x45
#define IR356XX_MODEL_IR35201 0x4D
#define IR356XX_MODEL_IR35203 0x4F
#define IR356XX_MODEL_IR35204 0x50
#define IR356XX_MODEL_IR35211 0x54
#define IR356XX_MODEL_IR35217 0x5F
#define IR356XX_MODEL_IR38163 0x63
#define IR356XX_MODEL_IR38164 0x6D
#define IR356XX_MODEL_IR38165 0x64
#define IR356XX_MODEL_IR38263 0x65
#define IR356XX_MODEL_IR38363 0x67
#define IR356XX_MODEL_IR38365 0x68
#define IR356XX_SUPPORTED_MODEL_COUNT 0x03
const static uint8_t IR356XX_SUPPORTED_MODELS[IR356XX_SUPPORTED_MODEL_COUNT] =
{
IR356XX_MODEL_IR3565B, IR356XX_MODEL_IR3567B
};
bool IR356XXDetectOld(AMDGPU *GPU, int *ret);
uint32_t IR356XXDetect(AMDGPU *GPU, VRMController **VRMs);
uint32_t IR356XXGetTemp(VRMController *VRM, uint32_t *Temp);
uint32_t IR356XXSetVoltage(VRMController *VRM, float Voltage);
uint32_t IR356XXGetVoltage(VRMController *VRM, float *VDDC);
uint32_t IR356XXSetOutputIdx(VRMController *VRM, uint32_t Idx);
uint32_t IR356XXGetOutputIdx(VRMController *VRM, uint32_t *Idx);
uint32_t IR356XXSetOffset(VRMController *VRM, float Voltage);
uint32_t IR356XXGetOffset(VRMController *VRM, float *VoltOffset);
int IR356XXToggleVdroop(AMDGPU *GPU, bool Vdroop);
#endif