OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "plat_gpio.h"
#include "plat_i2c.h"
#include "plat_sensor_table.h"
#include "sensor.h"
#include "plat_class.h"
Classes | |
struct | ADC_INFO |
Macros | |
#define | NUMBER_OF_ADC_CHANNEL 16 |
#define | AST1030_ADC_BASE_ADDR 0x7e6e9000 |
Enumerations | |
enum | ADC_REF_VOL_SELECTION { REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 } |
Functions | |
LOG_MODULE_REGISTER (plat_class) | |
bool | get_adc_voltage (int channel, float *voltage) |
GT_STAGE_REVISION_ID | get_stage_by_rev_id () |
uint8_t | get_hsc_type () |
uint8_t | get_vr_type () |
uint8_t | get_power_moniter_ic_type () |
void | init_platform_hsc_config () |
void | init_platform_vr_config () |
void | init_platform_power_ic_config () |
void | init_platform_config () |
Variables | |
struct ADC_INFO | adc_info [NUMBER_OF_ADC_CHANNEL] |
#define AST1030_ADC_BASE_ADDR 0x7e6e9000 |
#define NUMBER_OF_ADC_CHANNEL 16 |
bool get_adc_voltage | ( | int | channel, |
float * | voltage | ||
) |
uint8_t get_hsc_type | ( | ) |
uint8_t get_power_moniter_ic_type | ( | ) |
GT_STAGE_REVISION_ID get_stage_by_rev_id | ( | ) |
uint8_t get_vr_type | ( | ) |
void init_platform_config | ( | ) |
void init_platform_hsc_config | ( | ) |
Follow the schematic diagram, the HSC device can be distinguished by ADC11 (HSC_TYPE_ADC_R). 0.0V(+/- 15%), the hotswap model is MP5990. 1.0V(+/- 15%), the hotswap model is LTC4282. 1.5V(+/- 15%), the hotswap model is LTC4286.
void init_platform_power_ic_config | ( | ) |
Follow the schematic diagram, the power monitor ic can be distinguished by ADC13 (ADC_TYPE_ADC_R). 0.0V(+/- 15%), the power monitor ic is ISL28022. 0.5V(+/- 15%), the power monitor ic is INA230.
void init_platform_vr_config | ( | ) |
Follow the schematic diagram, the VR chip can be distinguished by ADC12 (VR_TYPE_ADC_R). 0.0V(+/- 15%), the VR chip is ISL69259. 0.5V(+/- 15%), the VR chip is XDPE12284.
LOG_MODULE_REGISTER | ( | plat_class | ) |
struct ADC_INFO adc_info[NUMBER_OF_ADC_CHANNEL] |