File: isl_pmbus_vr.h

package info (click to toggle)
qemu 1%3A7.2%2Bdfsg-7%2Bdeb12u13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 288,192 kB
  • sloc: ansic: 2,701,923; pascal: 112,708; python: 62,697; sh: 50,281; asm: 48,732; makefile: 17,260; cpp: 9,441; perl: 8,084; xml: 2,911; objc: 1,870; php: 1,299; tcl: 1,188; yacc: 604; lex: 363; sql: 71; awk: 35; sed: 11; javascript: 7
file content (57 lines) | stat: -rw-r--r-- 1,997 bytes parent folder | download | duplicates (9)
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
/*
 * PMBus device for Renesas Digital Multiphase Voltage Regulators
 *
 * Copyright 2022 Google LLC
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef HW_MISC_ISL_PMBUS_VR_H
#define HW_MISC_ISL_PMBUS_VR_H

#include "hw/i2c/pmbus_device.h"
#include "qom/object.h"

#define TYPE_ISL69259   "isl69259"
#define TYPE_ISL69260   "isl69260"
#define TYPE_RAA228000  "raa228000"
#define TYPE_RAA229004  "raa229004"
#define ISL_MAX_IC_DEVICE_ID_LEN 16

struct ISLState {
    PMBusDevice parent;

    uint8_t ic_device_id[ISL_MAX_IC_DEVICE_ID_LEN];
    uint8_t ic_device_id_len;
};

OBJECT_DECLARE_SIMPLE_TYPE(ISLState, ISL69260)

#define ISL_CAPABILITY_DEFAULT                 0x40
#define ISL_OPERATION_DEFAULT                  0x80
#define ISL_ON_OFF_CONFIG_DEFAULT              0x16
#define ISL_VOUT_MODE_DEFAULT                  0x40
#define ISL_VOUT_COMMAND_DEFAULT               0x0384
#define ISL_VOUT_MAX_DEFAULT                   0x08FC
#define ISL_VOUT_MARGIN_HIGH_DEFAULT           0x0640
#define ISL_VOUT_MARGIN_LOW_DEFAULT            0xFA
#define ISL_VOUT_TRANSITION_RATE_DEFAULT       0x64
#define ISL_VOUT_OV_FAULT_LIMIT_DEFAULT        0x076C
#define ISL_OT_FAULT_LIMIT_DEFAULT             0x7D
#define ISL_OT_WARN_LIMIT_DEFAULT              0x07D0
#define ISL_VIN_OV_WARN_LIMIT_DEFAULT          0x36B0
#define ISL_VIN_UV_WARN_LIMIT_DEFAULT          0x1F40
#define ISL_IIN_OC_FAULT_LIMIT_DEFAULT         0x32
#define ISL_TON_DELAY_DEFAULT                  0x14
#define ISL_TON_RISE_DEFAULT                   0x01F4
#define ISL_TOFF_FALL_DEFAULT                  0x01F4
#define ISL_REVISION_DEFAULT                   0x33
#define ISL_READ_VOUT_DEFAULT                  1000
#define ISL_READ_IOUT_DEFAULT                  40
#define ISL_READ_POUT_DEFAULT                  4
#define ISL_READ_TEMP_DEFAULT                  25
#define ISL_READ_VIN_DEFAULT                   1100
#define ISL_READ_IIN_DEFAULT                   40
#define ISL_READ_PIN_DEFAULT                   4

#endif