Skip to contentSkip to conversation

Fixups for PMBus and new sensors

PATCH Superseded Titus Rwantare 5 participants 13 messages Jan 6, 2022 – Feb 24, 2022 Arm/Amlogic Meson SoC support

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Fixups for PMBus and new sensors

This patch series contains updates to PMBus in QEMU along with some PMBus device models for Renesas regulators.
I have also added myself to MAINTAINERS as this code is in use daily, where I am responsible for it.

Shengtan Mao (1):
hw/i2c: Added linear mode translation for pmbus devices

Titus Rwantare (4):
hw/i2c: pmbus updates
hw/sensor: add Intersil ISL69260 device model
hw/sensor: add Renesas raa229004 PMBus device
hw/misc: add Renesas raa228000 device

 MAINTAINERS                   |  15 +-
 hw/arm/Kconfig                |   1 +
 hw/i2c/pmbus_device.c         | 106 +++++++-
 hw/sensor/Kconfig             |   5 +
 hw/sensor/isl_pmbus.c         | 278 ++++++++++++++++++++
 hw/sensor/meson.build         |   1 +
 include/hw/i2c/pmbus_device.h |  23 +-
 include/hw/sensor/isl_pmbus.h |  52 ++++
 tests/qtest/isl_pmbus-test.c  | 460 ++++++++++++++++++++++++++++++++++
 tests/qtest/meson.build       |   1 +
 10 files changed, 930 insertions(+), 12 deletions(-)
 create mode 100644 hw/sensor/isl_pmbus.c
 create mode 100644 include/hw/sensor/isl_pmbus.h
 create mode 100644 tests/qtest/isl_pmbus-test.c
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#1 lore raw

PATCH 1/5 hw/i2c: pmbus updates

- add vout min register
- add PEC unsupported warning to pmbus_device class
- guard against out of range pmbus page accesses

---
 MAINTAINERS                   | 12 ++++-
 hw/i2c/pmbus_device.c         | 88 +++++++++++++++++++++++++++++++----
 include/hw/i2c/pmbus_device.h |  3 ++
 3 files changed, 92 insertions(+), 11 deletions(-)
MAINTAINERS +11 -1
index f871d759fd..6349e3da1f 100644
@@ -2790,7 +2790,7 @@ R: Paolo Bonzini <[email protected]>
 R: Bandan Das <[email protected]>
 R: Stefan Hajnoczi <[email protected]>
 R: Thomas Huth <[email protected]>
-R: Darren Kenny <[email protected]> 
+R: Darren Kenny <[email protected]>
 R: Qiuhao Li <[email protected]>
 S: Maintained
 F: tests/qtest/fuzz/
@@ -3029,6 +3029,16 @@ F: include/hw/i2c/smbus_master.h
 F: include/hw/i2c/smbus_slave.h
 F: include/hw/i2c/smbus_eeprom.h
 
+PMBus
+M: Titus Rwantare <[email protected]>
+S: Maintained
+F: hw/i2c/pmbus_device.c
+F: hw/sensor/adm1272.c
+F: hw/sensor/max34451.c
+F: include/hw/i2c/pmbus_device.h
+F: tests/qtest/adm1272-test.c
+F: tests/qtest/max34451-test.c
+
 Firmware schema specifications
 M: Philippe Mathieu-Daudé <[email protected]>
 R: Daniel P. Berrange <[email protected]>
hw/i2c/pmbus_device.c +78 -10

182 lines not on this page · raw message

include/hw/i2c/pmbus_device.h +3 -0
index 62bd38c83f..72c0483149 100644
@@ -43,6 +43,7 @@ enum pmbus_registers {
     PMBUS_VOUT_DROOP                = 0x28, /* R/W word */
     PMBUS_VOUT_SCALE_LOOP           = 0x29, /* R/W word */
     PMBUS_VOUT_SCALE_MONITOR        = 0x2A, /* R/W word */
+    PMBUS_VOUT_MIN                  = 0x2B, /* R/W word */
     PMBUS_COEFFICIENTS              = 0x30, /* Read-only block 5 bytes */
     PMBUS_POUT_MAX                  = 0x31, /* R/W word */
     PMBUS_MAX_DUTY                  = 0x32, /* R/W word */
@@ -255,6 +256,7 @@ OBJECT_DECLARE_TYPE(PMBusDevice, PMBusDeviceClass,
 #define PB_HAS_TEMP3               BIT_ULL(42)
 #define PB_HAS_TEMP_RATING         BIT_ULL(43)
 #define PB_HAS_MFR_INFO            BIT_ULL(50)
+#define PB_HAS_STATUS_MFR_SPECIFIC BIT_ULL(51)
 
 struct PMBusDeviceClass {
     SMBusDeviceClass parent_class;
@@ -295,6 +297,7 @@ typedef struct PMBusPage {
     uint16_t vout_droop;               /* R/W word */
     uint16_t vout_scale_loop;          /* R/W word */
     uint16_t vout_scale_monitor;       /* R/W word */
+    uint16_t vout_min;                 /* R/W word */
     uint8_t coefficients[5];           /* Read-only block 5 bytes */
     uint16_t pout_max;                 /* R/W word */
     uint16_t max_duty;                 /* R/W word */
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#2 lore raw

Re: [PATCH 1/5] hw/i2c: pmbus updates

Quoted 7 lines · Titus Rwantare

- add vout min register
- add PEC unsupported warning to pmbus_device class
- guard against out of range pmbus page accesses

Hi; these different changes should be split up into separate patches, please. Each patch should do one thing and only one.

Quoted 11 lines
---
 MAINTAINERS                   | 12 ++++-
 hw/i2c/pmbus_device.c         | 88 +++++++++++++++++++++++++++++++----
 include/hw/i2c/pmbus_device.h |  3 ++
 3 files changed, 92 insertions(+), 11 deletions(-)
MAINTAINERS +0 -0
index f871d759fd..6349e3da1f 100644

MAINTAINERS R: Paolo Bonzini <[email protected]> · line 2796

Quoted 8 lines
MAINTAINERS +1 -1
@@ -2790,7 +2790,7 @@ R: Paolo Bonzini <[email protected]>
 R: Bandan Das <[email protected]>
 R: Stefan Hajnoczi <[email protected]>
 R: Thomas Huth <[email protected]>
-R: Darren Kenny <[email protected]>
+R: Darren Kenny <[email protected]>
 R: Qiuhao Li <[email protected]>
 S: Maintained
 F: tests/qtest/fuzz/

Looks like the whitespace-change again, same as the other patch.

thanks
-- PMM

#3 lore raw

PATCH 2/5 hw/i2c: Added linear mode translation for pmbus devices

In reply to Titus Rwantare

From: Shengtan Mao <[email protected]>

---
 hw/i2c/pmbus_device.c         | 18 ++++++++++++++++++
 include/hw/i2c/pmbus_device.h | 20 +++++++++++++++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)
hw/i2c/pmbus_device.c +18 -0
index 3beb02afad..1036c41c49 100644
@@ -28,6 +28,24 @@ uint32_t pmbus_direct_mode2data(PMBusCoefficients c, uint16_t value)
     return x;
 }
 
+uint16_t pmbus_data2linear_mode(uint16_t value, int exp)
+{
+    /* L = D * 2^(-e) */
+    if (exp < 0) {
+        return value << (-exp);
+    }
+    return value >> exp;
+}
+
+uint16_t pmbus_linear_mode2data(uint16_t value, int exp)
+{
+    /* D = L * 2^e */
+    if (exp < 0) {
+        return value >> (-exp);
+    }
+    return value << exp;
+}
+
 void pmbus_send(PMBusDevice *pmdev, const uint8_t *data, uint16_t len)
 {
     if (pmdev->out_buf_len + len > SMBUS_DATA_MAX_LEN) {
include/hw/i2c/pmbus_device.h +19 -1
index 72c0483149..9a274247ab 100644
@@ -446,7 +446,7 @@ typedef struct PMBusCoefficients {
  *
  * Y = (m * x - b) * 10^R
  *
- * @return uint32_t
+ * @return uint16_t
  */
 uint16_t pmbus_data2direct_mode(PMBusCoefficients c, uint32_t value);
 
@@ -459,6 +459,24 @@ uint16_t pmbus_data2direct_mode(PMBusCoefficients c, uint32_t value);
  */
 uint32_t pmbus_direct_mode2data(PMBusCoefficients c, uint16_t value);
 
+/**
+ * Convert sensor values to linear mode format
+ *
+ * L = D * 2^(-e)
+ *
+ * @return uint16
+ */
+uint16_t pmbus_data2linear_mode(uint16_t value, int exp);
+
+/**
+ * Convert linear mode formatted data into sensor reading
+ *
+ * D = L * 2^e
+ *
+ * @return uint16
+ */
+uint16_t pmbus_linear_mode2data(uint16_t value, int exp);
+
 /**
  * @brief Send a block of data over PMBus
  * Assumes that the bytes in the block are already ordered correctly,
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
Reviewed-by on v1 2/5
#4 lore raw

Re: [PATCH 2/5] hw/i2c: Added linear mode translation for pmbus devices

Quoted 8 lines · Titus Rwantare

From: Shengtan Mao <[email protected]>

---
  hw/i2c/pmbus_device.c         | 18 ++++++++++++++++++
  include/hw/i2c/pmbus_device.h | 20 +++++++++++++++++++-
  2 files changed, 37 insertions(+), 1 deletion(-)
#5 lore raw

PATCH 3/5 hw/sensor: add Intersil ISL69260 device model

In reply to Titus Rwantare
---
 MAINTAINERS                   |   3 +
 hw/arm/Kconfig                |   1 +
 hw/sensor/Kconfig             |   5 +
 hw/sensor/isl_pmbus.c         | 210 +++++++++++++++++++
 hw/sensor/meson.build         |   1 +
 include/hw/sensor/isl_pmbus.h |  50 +++++
 tests/qtest/isl_pmbus-test.c  | 381 ++++++++++++++++++++++++++++++++++
 tests/qtest/meson.build       |   1 +
 8 files changed, 652 insertions(+)
 create mode 100644 hw/sensor/isl_pmbus.c
 create mode 100644 include/hw/sensor/isl_pmbus.h
 create mode 100644 tests/qtest/isl_pmbus-test.c
MAINTAINERS +3 -0
index 6349e3da1f..156c5812a8 100644
@@ -3034,10 +3034,13 @@ M: Titus Rwantare <[email protected]>
 S: Maintained
 F: hw/i2c/pmbus_device.c
 F: hw/sensor/adm1272.c
+F: hw/sensor/isl_pmbus.c
 F: hw/sensor/max34451.c
 F: include/hw/i2c/pmbus_device.h
+F: include/hw/sensor/isl_pmbus.h
 F: tests/qtest/adm1272-test.c
 F: tests/qtest/max34451-test.c
+F: tests/qtest/isl_pmbus-test.c
 
 Firmware schema specifications
 M: Philippe Mathieu-Daudé <[email protected]>
hw/arm/Kconfig +1 -0
index e652590943..019099df96 100644
@@ -393,6 +393,7 @@ config NPCM7XX
     select SMBUS
     select AT24C  # EEPROM
     select MAX34451
+    select ISL_PMBUS
     select PL310  # cache controller
     select PMBUS
     select SERIAL
hw/sensor/Kconfig +5 -0
index 9c8a049b06..f935d9cccb 100644
@@ -21,3 +21,8 @@ config ADM1272
 config MAX34451
     bool
     depends on I2C
+
+config ISL_PMBUS
+    bool
+    depends on I2C
+
hw/sensor/isl_pmbus.c new file +210 -0

210 lines not on this page · raw message

hw/sensor/meson.build +1 -0
index 059c4ca935..d511994d0c 100644
@@ -4,3 +4,4 @@ softmmu_ss.add(when: 'CONFIG_DPS310', if_true: files('dps310.c'))
 softmmu_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c'))
 softmmu_ss.add(when: 'CONFIG_ADM1272', if_true: files('adm1272.c'))
 softmmu_ss.add(when: 'CONFIG_MAX34451', if_true: files('max34451.c'))
+softmmu_ss.add(when: 'CONFIG_ISL_PMBUS', if_true: files('isl_pmbus.c'))
include/hw/sensor/isl_pmbus.h new file +50 -0

50 lines not on this page · raw message

tests/qtest/isl_pmbus-test.c new file +381 -0

381 lines not on this page · raw message

tests/qtest/meson.build +1 -0
index 37e1eaa449..7a580d6d9f 100644
@@ -242,6 +242,7 @@ qos_test_ss.add(
   'eepro100-test.c',
   'es1370-test.c',
   'ipoctal232-test.c',
+  'isl_pmbus-test.c',
   'max34451-test.c',
   'megasas-test.c',
   'ne2000-test.c',
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#6 lore raw

Re: [PATCH 3/5] hw/sensor: add Intersil ISL69260 device model

Quoted 26 lines · Titus Rwantare
---
 MAINTAINERS                   |   3 +
 hw/arm/Kconfig                |   1 +
 hw/sensor/Kconfig             |   5 +
 hw/sensor/isl_pmbus.c         | 210 +++++++++++++++++++
 hw/sensor/meson.build         |   1 +
 include/hw/sensor/isl_pmbus.h |  50 +++++
 tests/qtest/isl_pmbus-test.c  | 381 ++++++++++++++++++++++++++++++++++
 tests/qtest/meson.build       |   1 +
 8 files changed, 652 insertions(+)
 create mode 100644 hw/sensor/isl_pmbus.c
 create mode 100644 include/hw/sensor/isl_pmbus.h
 create mode 100644 tests/qtest/isl_pmbus-test.c
hw/sensor/isl_pmbus.c new file +6 -0
+static uint8_t isl_pmbus_read_byte(PMBusDevice *pmdev)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
+                  "%s: reading from unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;

hw/sensor/isl_pmbus.c line 31

Quoted 10 lines
hw/sensor/isl_pmbus.c new file +10 -0
+}
+
+static int isl_pmbus_write_data(PMBusDevice *pmdev, const uint8_t *buf,
+                              uint8_t len)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
+                  "%s: write to unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;
+}

This device appears to have no implemented guest visible interface at all, and yet it has a lot of object properties. What's going on here ?

thanks
-- PMM

#7 lore raw

Re: [PATCH 3/5] hw/sensor: add Intersil ISL69260 device model

Quoted 25 lines · Peter Maydell
Quoted 8 lines · Titus Rwantare
hw/sensor/isl_pmbus.c new file +6 -0
+static uint8_t isl_pmbus_read_byte(PMBusDevice *pmdev)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
+                  "%s: reading from unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;

hw/sensor/isl_pmbus.c line 31

Quoted 10 lines
hw/sensor/isl_pmbus.c new file +10 -0
+}
+
+static int isl_pmbus_write_data(PMBusDevice *pmdev, const uint8_t *buf,
+                              uint8_t len)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
+                  "%s: write to unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;
+}

This device appears to have no implemented guest visible interface at all, and yet it has a lot of object properties. What's going on here ?

Quoted 2 lines

thanks
-- PMM

This device relies on read_byte and write_data implemented in pmbus_device.c. Those generic implementations fall through to the device specific implementations for registers not in the standard. This qemu model happens not to include additional registers. However, I must change these to LOG_UNIMP which is more appropriate to what's going on.

Thanks,
Titus

#8 lore raw

Re: [PATCH 3/5] hw/sensor: add Intersil ISL69260 device model

Quoted 27 lines · Titus Rwantare
Quoted 16 lines · Peter Maydell
Quoted 14 lines · Titus Rwantare
hw/sensor/isl_pmbus.c new file +12 -0
+static uint8_t isl_pmbus_read_byte(PMBusDevice *pmdev)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
+                  "%s: reading from unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;
+}
+
+static int isl_pmbus_write_data(PMBusDevice *pmdev, const uint8_t *buf,
+                              uint8_t len)
+{
+    qemu_log_mask(LOG_GUEST_ERROR,
Quoted 8 lines

hw/sensor/isl_pmbus.c line 31

Quoted 4 lines
hw/sensor/isl_pmbus.c new file +4 -0
+                  "%s: write to unsupported register: 0x%02x\n",
+                  __func__, pmdev->code);
+    return 0xFF;
+}

This device appears to have no implemented guest visible interface at all, and yet it has a lot of object properties. What's going on here ?

Quoted 6 lines

This device relies on read_byte and write_data implemented in pmbus_device.c. Those generic implementations fall through to the device specific implementations for registers not in the standard. This qemu model happens not to include additional registers. However, I must change these to LOG_UNIMP which is more appropriate to what's going on.

Ah, right. A comment noting something like that might also be helpful.

Something I forgot to note -- the filenames isl_pmbus.[ch] seem a bit overly generic for "PMBus device for Renesas Digital Multiphase Voltage Regulators" -- could you rename to something a bit more specific? This will help to avoid in future people lumping lots of different unrelated device models into the same source file.

thanks
-- PMM

#9 lore raw

PATCH 4/5 hw/sensor: add Renesas raa229004 PMBus device

In reply to Titus Rwantare

The Renesas RAA229004 is a PMBus Multiphase Voltage Regulator

---
 hw/sensor/isl_pmbus.c         | 18 ++++++++++++++++++
 include/hw/sensor/isl_pmbus.h |  1 +
 tests/qtest/isl_pmbus-test.c  |  7 +++++++
 3 files changed, 26 insertions(+)
hw/sensor/isl_pmbus.c +18 -0
index 8cc7220a57..4ff848f663 100644
@@ -194,6 +194,15 @@ static void isl69260_class_init(ObjectClass *klass, void *data)
     isl_pmbus_class_init(klass, data, 2);
 }
 
+static void raa229004_class_init(ObjectClass *klass, void *data)
+{
+    ResettableClass *rc = RESETTABLE_CLASS(klass);
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    dc->desc = "Renesas 229004 Digital Multiphase Voltage Regulator";
+    rc->phases.exit = isl_pmbus_exit_reset;
+    isl_pmbus_class_init(klass, data, 2);
+}
+
 static const TypeInfo isl69260_info = {
     .name = TYPE_ISL69260,
     .parent = TYPE_PMBUS_DEVICE,
@@ -202,9 +211,18 @@ static const TypeInfo isl69260_info = {
     .class_init = isl69260_class_init,
 };
 
+static const TypeInfo raa229004_info = {
+    .name = TYPE_RAA229004,
+    .parent = TYPE_PMBUS_DEVICE,
+    .instance_size = sizeof(ISLState),
+    .instance_init = raa22xx_init,
+    .class_init = raa229004_class_init,
+};
+
 static void isl_pmbus_register_types(void)
 {
     type_register_static(&isl69260_info);
+    type_register_static(&raa229004_info);
 }
 
 type_init(isl_pmbus_register_types)
include/hw/sensor/isl_pmbus.h +1 -0
index 8115aaa698..a947fd3903 100644
@@ -13,6 +13,7 @@
 #include "qom/object.h"
 
 #define TYPE_ISL69260   "isl69260"
+#define TYPE_RAA229004  "raa229004"
 
 struct ISLState {
     PMBusDevice parent;
tests/qtest/isl_pmbus-test.c +7 -0
index 3e956f912c..5bdc247428 100644
@@ -372,10 +372,17 @@ static void isl_pmbus_register_nodes(void)
     qos_node_create_driver("isl69260", i2c_device_create);
     qos_node_consumes("isl69260", "i2c-bus", &opts);
 
+    qos_node_create_driver("raa229004", i2c_device_create);
+    qos_node_consumes("raa229004", "i2c-bus", &opts);
+
     qos_add_test("test_defaults", "isl69260", test_defaults, NULL);
     qos_add_test("test_tx_rx", "isl69260", test_tx_rx, NULL);
     qos_add_test("test_rw_regs", "isl69260", test_rw_regs, NULL);
     qos_add_test("test_ro_regs", "isl69260", test_ro_regs, NULL);
     qos_add_test("test_ov_faults", "isl69260", test_voltage_faults, NULL);
+
+    qos_add_test("test_tx_rx", "raa229004", test_tx_rx, NULL);
+    qos_add_test("test_rw_regs", "raa229004", test_rw_regs, NULL);
+    qos_add_test("test_ov_faults", "raa229004", test_voltage_faults, NULL);
 }
 libqos_init(isl_pmbus_register_nodes);
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#10 lore raw

PATCH 5/5 hw/misc: add Renesas raa228000 device

In reply to Titus Rwantare
---
 hw/sensor/isl_pmbus.c         | 50 ++++++++++++++++++++++
 include/hw/sensor/isl_pmbus.h |  1 +
 tests/qtest/isl_pmbus-test.c  | 78 +++++++++++++++++++++++++++++++++--
 3 files changed, 126 insertions(+), 3 deletions(-)
hw/sensor/isl_pmbus.c +50 -0
index 4ff848f663..e3b42b119e 100644
@@ -89,6 +89,24 @@ static void isl_pmbus_exit_reset(Object *obj)
     }
 }
 
+/* The raa228000 uses different direct mode coefficents from most isl devices */
+static void raa228000_exit_reset(Object *obj)
+{
+    isl_pmbus_exit_reset(obj);
+
+    PMBusDevice *pmdev = PMBUS_DEVICE(obj);
+
+    pmdev->pages[0].read_vout = 0;
+    pmdev->pages[0].read_iout = 0;
+    pmdev->pages[0].read_pout = 0;
+    pmdev->pages[0].read_vin = 0;
+    pmdev->pages[0].read_iin = 0;
+    pmdev->pages[0].read_pin = 0;
+    pmdev->pages[0].read_temperature_1 = 0;
+    pmdev->pages[0].read_temperature_2 = 0;
+    pmdev->pages[0].read_temperature_3 = 0;
+}
+
 static void isl_pmbus_add_props(Object *obj, uint64_t *flags, uint8_t pages)
 {
     PMBusDevice *pmdev = PMBUS_DEVICE(obj);
@@ -177,6 +195,20 @@ static void raa22xx_init(Object *obj)
     isl_pmbus_add_props(obj, flags, 2);
 }
 
+static void raa228000_init(Object *obj)
+{
+    PMBusDevice *pmdev = PMBUS_DEVICE(obj);
+    uint64_t flags[1];
+
+    flags[0] = PB_HAS_VIN | PB_HAS_VOUT | PB_HAS_VOUT_MODE |
+               PB_HAS_VOUT_RATING | PB_HAS_VOUT_MARGIN | PB_HAS_IIN |
+               PB_HAS_IOUT | PB_HAS_PIN | PB_HAS_POUT | PB_HAS_TEMPERATURE |
+               PB_HAS_TEMP2 | PB_HAS_TEMP3 | PB_HAS_STATUS_MFR_SPECIFIC;
+
+    pmbus_page_config(pmdev, 0, flags[0]);
+    isl_pmbus_add_props(obj, flags, 1);
+}
+
 static void isl_pmbus_class_init(ObjectClass *klass, void *data, uint8_t pages)
 {
     PMBusDeviceClass *k = PMBUS_DEVICE_CLASS(klass);
@@ -194,6 +226,15 @@ static void isl69260_class_init(ObjectClass *klass, void *data)
     isl_pmbus_class_init(klass, data, 2);
 }
 
+static void raa228000_class_init(ObjectClass *klass, void *data)
+{
+    ResettableClass *rc = RESETTABLE_CLASS(klass);
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    dc->desc = "Renesas 228000 Digital Multiphase Voltage Regulator";
+    rc->phases.exit = raa228000_exit_reset;
+    isl_pmbus_class_init(klass, data, 1);
+}
+
 static void raa229004_class_init(ObjectClass *klass, void *data)
 {
     ResettableClass *rc = RESETTABLE_CLASS(klass);
@@ -219,9 +260,18 @@ static const TypeInfo raa229004_info = {
     .class_init = raa229004_class_init,
 };
 
+static const TypeInfo raa228000_info = {
+    .name = TYPE_RAA228000,
+    .parent = TYPE_PMBUS_DEVICE,
+    .instance_size = sizeof(ISLState),
+    .instance_init = raa228000_init,
+    .class_init = raa228000_class_init,
+};
+
 static void isl_pmbus_register_types(void)
 {
     type_register_static(&isl69260_info);
+    type_register_static(&raa228000_info);
     type_register_static(&raa229004_info);
 }
 
include/hw/sensor/isl_pmbus.h +1 -0
index a947fd3903..7ead1dc4a2 100644
@@ -13,6 +13,7 @@
 #include "qom/object.h"
 
 #define TYPE_ISL69260   "isl69260"
+#define TYPE_RAA228000  "raa228000"
 #define TYPE_RAA229004  "raa229004"
 
 struct ISLState {
tests/qtest/isl_pmbus-test.c +75 -3

98 lines not on this page · raw message

Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#11 lore raw
In reply to Titus Rwantare
Quoted 14 lines · Titus Rwantare

This patch series contains updates to PMBus in QEMU along with some PMBus device models for Renesas regulators.
I have also added myself to MAINTAINERS as this code is in use daily, where I am responsible for it.

Shengtan Mao (1):
hw/i2c: Added linear mode translation for pmbus devices

Titus Rwantare (4):
hw/i2c: pmbus updates
hw/sensor: add Intersil ISL69260 device model
hw/sensor: add Renesas raa229004 PMBus device
hw/misc: add Renesas raa228000 device

Quoted 16 lines
 MAINTAINERS                   |  15 +-
 hw/arm/Kconfig                |   1 +
 hw/i2c/pmbus_device.c         | 106 +++++++-
 hw/sensor/Kconfig             |   5 +
 hw/sensor/isl_pmbus.c         | 278 ++++++++++++++++++++
 hw/sensor/meson.build         |   1 +
 include/hw/i2c/pmbus_device.h |  23 +-
 include/hw/sensor/isl_pmbus.h |  52 ++++
 tests/qtest/isl_pmbus-test.c  | 460 ++++++++++++++++++++++++++++++++++
 tests/qtest/meson.build       |   1 +
 10 files changed, 930 insertions(+), 12 deletions(-)
 create mode 100644 hw/sensor/isl_pmbus.c
 create mode 100644 include/hw/sensor/isl_pmbus.h
 create mode 100644 tests/qtest/isl_pmbus-test.c

Friendly ping - I believe I saw some of these have picked up Reviewer tags, but ideally this will get into 7.0 before next month's soft-freeze.

Quoted 4 lines

--
2.34.1.448.ga2b2bfdf31-goog

#12 lore raw
Quoted 32 lines · Patrick Venture
Quoted 14 lines · Titus Rwantare

This patch series contains updates to PMBus in QEMU along with some PMBus device models for Renesas regulators.
I have also added myself to MAINTAINERS as this code is in use daily, where I am responsible for it.

Shengtan Mao (1):
hw/i2c: Added linear mode translation for pmbus devices

Titus Rwantare (4):
hw/i2c: pmbus updates
hw/sensor: add Intersil ISL69260 device model
hw/sensor: add Renesas raa229004 PMBus device
hw/misc: add Renesas raa228000 device

Quoted 16 lines
 MAINTAINERS                   |  15 +-
 hw/arm/Kconfig                |   1 +
 hw/i2c/pmbus_device.c         | 106 +++++++-
 hw/sensor/Kconfig             |   5 +
 hw/sensor/isl_pmbus.c         | 278 ++++++++++++++++++++
 hw/sensor/meson.build         |   1 +
 include/hw/i2c/pmbus_device.h |  23 +-
 include/hw/sensor/isl_pmbus.h |  52 ++++
 tests/qtest/isl_pmbus-test.c  | 460 ++++++++++++++++++++++++++++++++++
 tests/qtest/meson.build       |   1 +
 10 files changed, 930 insertions(+), 12 deletions(-)
 create mode 100644 hw/sensor/isl_pmbus.c
 create mode 100644 include/hw/sensor/isl_pmbus.h
 create mode 100644 tests/qtest/isl_pmbus-test.c
Quoted 2 lines

Friendly ping - I believe I saw some of these have picked up Reviewer tags, but ideally this will get into 7.0 before next month's soft-freeze.

Did you split up patch 1 as Peter requested?

-corey

Quoted 6 lines
Quoted 6 lines

--
2.34.1.448.ga2b2bfdf31-goog