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