Lines Matching full:vid

18 #include "vid.h"
103 printf("VID: failed to read core voltage\n"); in read_voltage_from_INA220()
108 printf("VID: Core voltage sensor error\n"); in read_voltage_from_INA220()
111 debug("VID: bus voltage reads 0x%04x\n", vol_mon); in read_voltage_from_INA220()
136 printf("VID: failed to read vcpu\n"); in read_voltage_from_IR()
141 printf("VID: Core voltage sensor error\n"); in read_voltage_from_IR()
144 debug("VID: bus voltage reads 0x%02x\n", vol_mon); in read_voltage_from_IR()
158 * SoC before converting into an IR VID value in read_voltage_from_IR()
194 * VID voltage also means that this function will always complete in wait_for_new_voltage()
204 printf("VID: Voltage adjustment timeout\n"); in wait_for_new_voltage()
244 u8 vid; in set_voltage_to_IR() local
247 * SoC before converting into an IR VID value in set_voltage_to_IR()
251 vid = DIV_ROUND_UP(vdd - 265, 5); in set_voltage_to_IR()
253 vid = DIV_ROUND_UP(vdd - 245, 5); in set_voltage_to_IR()
257 1, (void *)&vid, sizeof(vid)); in set_voltage_to_IR()
259 printf("VID: failed to write VID\n"); in set_voltage_to_IR()
265 debug("VID: Waited %d us\n", wait * NUM_READINGS * WAIT_FOR_ADC); in set_voltage_to_IR()
270 debug("VID: Current voltage is %d mV\n", vdd_last); in set_voltage_to_IR()
293 u8 vid, buf; in adjust_vdd() local
333 u8 vid; in adjust_vdd() member
339 debug("VID: I2C failed to switch channel\n"); in adjust_vdd()
345 printf("VID: Could not find voltage regulator on I2C.\n"); in adjust_vdd()
350 debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); in adjust_vdd()
358 printf("VID: failed to read IR chip mode.\n"); in adjust_vdd()
363 printf("VID: IR Chip is not used in Intel mode.\n"); in adjust_vdd()
370 vid = (fusesr >> FSL_CHASSIS3_DCFG_FUSESR_ALTVID_SHIFT) & in adjust_vdd()
372 if ((vid == 0) || (vid == FSL_CHASSIS3_DCFG_FUSESR_ALTVID_MASK)) { in adjust_vdd()
373 vid = (fusesr >> FSL_CHASSIS3_DCFG_FUSESR_VID_SHIFT) & in adjust_vdd()
376 vdd_target = vdd[vid]; in adjust_vdd()
394 debug("VID: VID not used\n"); in adjust_vdd()
399 printf("VID: Target VID %d mV is not in range.\n", in adjust_vdd()
404 debug("VID: vid = %d mV\n", vdd_target); in adjust_vdd()
412 printf("VID: Couldn't read sensor abort VID adjustment\n"); in adjust_vdd()
417 debug("VID: Core voltage is currently at %d mV\n", vdd_last); in adjust_vdd()
436 printf("VID: Core voltage after adjustment is at %d mV\n", in adjust_vdd()
457 u8 vid, buf; in adjust_vdd() local
491 u8 vid; in adjust_vdd() member
497 debug("VID: I2C failed to switch channel\n"); in adjust_vdd()
503 printf("VID: Could not find voltage regulator on I2C.\n"); in adjust_vdd()
508 debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); in adjust_vdd()
516 printf("VID: failed to read IR chip mode.\n"); in adjust_vdd()
521 printf("VID: IR Chip is not used in Intel mode.\n"); in adjust_vdd()
529 * VID is used according to the table below in adjust_vdd()
535 * | D | 5b00000 | NO VID | VID = DA_V | NO VID | in adjust_vdd()
537 * | _ | 5b00001 |VID = | VID = |VID = | in adjust_vdd()
541 * | L | 5b11111 | No VID | VID = DA_V | NO VID | in adjust_vdd()
546 vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_ALTVID_SHIFT) & in adjust_vdd()
548 if ((vid == 0) || (vid == FSL_CHASSIS2_DCFG_FUSESR_ALTVID_MASK)) { in adjust_vdd()
549 vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_VID_SHIFT) & in adjust_vdd()
553 vid = (fusesr >> FSL_CORENET_DCFG_FUSESR_ALTVID_SHIFT) & in adjust_vdd()
555 if ((vid == 0) || (vid == FSL_CORENET_DCFG_FUSESR_ALTVID_MASK)) { in adjust_vdd()
556 vid = (fusesr >> FSL_CORENET_DCFG_FUSESR_VID_SHIFT) & in adjust_vdd()
560 vdd_target = vdd[vid]; in adjust_vdd()
574 debug("VID: VID not used\n"); in adjust_vdd()
580 debug("VID: vid = %d mV\n", vdd_target); in adjust_vdd()
588 printf("VID: Couldn't read sensor abort VID adjustment\n"); in adjust_vdd()
593 debug("VID: Core voltage is currently at %d mV\n", vdd_last); in adjust_vdd()
612 printf("VID: Core voltage after adjustment is at %d mV\n", in adjust_vdd()
632 debug("VID : I2c failed to switch channel\n"); in print_vdd()
637 printf("VID: Could not find voltage regulator on I2C.\n"); in print_vdd()
641 debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); in print_vdd()
649 printf("VID: Couldn't read sensor abort VID adjustment\n"); in print_vdd()
652 printf("VID: Core voltage is at %d mV\n", vdd_last); in print_vdd()