xref: /openbmc/qemu/include/hw/sensor/isl_pmbus_vr.h (revision 1c0c52f76208c648a70b115fc99ab558008466da)
1 /*
2  * PMBus device for Renesas Digital Multiphase Voltage Regulators
3  *
4  * Copyright 2022 Google LLC
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef HW_MISC_ISL_PMBUS_VR_H
10 #define HW_MISC_ISL_PMBUS_VR_H
11 
12 #include "hw/i2c/pmbus_device.h"
13 #include "qom/object.h"
14 
15 #define TYPE_ISL69260   "isl69260"
16 #define TYPE_RAA229004  "raa229004"
17 
18 struct ISLState {
19     PMBusDevice parent;
20 };
21 
22 OBJECT_DECLARE_SIMPLE_TYPE(ISLState, ISL69260)
23 
24 #define ISL_CAPABILITY_DEFAULT                 0x40
25 #define ISL_OPERATION_DEFAULT                  0x80
26 #define ISL_ON_OFF_CONFIG_DEFAULT              0x16
27 #define ISL_VOUT_MODE_DEFAULT                  0x40
28 #define ISL_VOUT_COMMAND_DEFAULT               0x0384
29 #define ISL_VOUT_MAX_DEFAULT                   0x08FC
30 #define ISL_VOUT_MARGIN_HIGH_DEFAULT           0x0640
31 #define ISL_VOUT_MARGIN_LOW_DEFAULT            0xFA
32 #define ISL_VOUT_TRANSITION_RATE_DEFAULT       0x64
33 #define ISL_VOUT_OV_FAULT_LIMIT_DEFAULT        0x076C
34 #define ISL_OT_FAULT_LIMIT_DEFAULT             0x7D
35 #define ISL_OT_WARN_LIMIT_DEFAULT              0x07D0
36 #define ISL_VIN_OV_WARN_LIMIT_DEFAULT          0x36B0
37 #define ISL_VIN_UV_WARN_LIMIT_DEFAULT          0x1F40
38 #define ISL_IIN_OC_FAULT_LIMIT_DEFAULT         0x32
39 #define ISL_TON_DELAY_DEFAULT                  0x14
40 #define ISL_TON_RISE_DEFAULT                   0x01F4
41 #define ISL_TOFF_FALL_DEFAULT                  0x01F4
42 #define ISL_REVISION_DEFAULT                   0x33
43 #define ISL_READ_VOUT_DEFAULT                  1000
44 #define ISL_READ_IOUT_DEFAULT                  40
45 #define ISL_READ_POUT_DEFAULT                  4
46 #define ISL_READ_TEMP_DEFAULT                  25
47 #define ISL_READ_VIN_DEFAULT                   1100
48 #define ISL_READ_IIN_DEFAULT                   40
49 #define ISL_READ_PIN_DEFAULT                   4
50 
51 #endif
52