xref: /openbmc/qemu/include/hw/sensor/isl_pmbus_vr.h (revision ffcdae677ebb6fab328f6ab913ed7929a3ffa8a8)
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 
17 struct ISLState {
18     PMBusDevice parent;
19 };
20 
21 OBJECT_DECLARE_SIMPLE_TYPE(ISLState, ISL69260)
22 
23 #define ISL_CAPABILITY_DEFAULT                 0x40
24 #define ISL_OPERATION_DEFAULT                  0x80
25 #define ISL_ON_OFF_CONFIG_DEFAULT              0x16
26 #define ISL_VOUT_MODE_DEFAULT                  0x40
27 #define ISL_VOUT_COMMAND_DEFAULT               0x0384
28 #define ISL_VOUT_MAX_DEFAULT                   0x08FC
29 #define ISL_VOUT_MARGIN_HIGH_DEFAULT           0x0640
30 #define ISL_VOUT_MARGIN_LOW_DEFAULT            0xFA
31 #define ISL_VOUT_TRANSITION_RATE_DEFAULT       0x64
32 #define ISL_VOUT_OV_FAULT_LIMIT_DEFAULT        0x076C
33 #define ISL_OT_FAULT_LIMIT_DEFAULT             0x7D
34 #define ISL_OT_WARN_LIMIT_DEFAULT              0x07D0
35 #define ISL_VIN_OV_WARN_LIMIT_DEFAULT          0x36B0
36 #define ISL_VIN_UV_WARN_LIMIT_DEFAULT          0x1F40
37 #define ISL_IIN_OC_FAULT_LIMIT_DEFAULT         0x32
38 #define ISL_TON_DELAY_DEFAULT                  0x14
39 #define ISL_TON_RISE_DEFAULT                   0x01F4
40 #define ISL_TOFF_FALL_DEFAULT                  0x01F4
41 #define ISL_REVISION_DEFAULT                   0x33
42 #define ISL_READ_VOUT_DEFAULT                  1000
43 #define ISL_READ_IOUT_DEFAULT                  40
44 #define ISL_READ_POUT_DEFAULT                  4
45 #define ISL_READ_TEMP_DEFAULT                  25
46 #define ISL_READ_VIN_DEFAULT                   1100
47 #define ISL_READ_IIN_DEFAULT                   40
48 #define ISL_READ_PIN_DEFAULT                   4
49 
50 #endif
51