Re: [PATCH v3 0/8] PMBus fixes and new functions

2023-10-24 Thread Titus Rwantare
On Tue, 24 Oct 2023 at 04:50, Philippe Mathieu-Daudé wrote: > > On 24/10/23 12:06, Alex Bennée wrote: > > > A pull request is really just a GPG signed tag that you push to a repo. > > You can use the existing git tooling to create the cover letter for it. > > > > I've included my exact steps at

Re: [PATCH v3 0/8] PMBus fixes and new functions

2023-10-23 Thread Titus Rwantare
On Mon, 23 Oct 2023 at 12:16, Alex Bennée wrote: > You seem to have missed a number of tags from previous postings: > > > https://qemu.readthedocs.io/en/master/devel/submitting-a-patch.html#proper-use-of-reviewed-by-tags-can-aid-review > > (although I notice we only mention Reviewed-by in the

[PATCH v3 7/8] hw/i2c: pmbus: immediately clear faults on request

2023-10-23 Thread Titus Rwantare
The probing process of the generic pmbus driver generates faults to determine if functions are available. These faults were not always cleared resulting in probe failures. Signed-off-by: Titus Rwantare Reviewed-by: Patrick Venture --- hw/i2c/pmbus_device.c | 5 + 1 file changed, 5

[PATCH v3 4/8] hw/i2c: pmbus: add VCAP register

2023-10-23 Thread Titus Rwantare
VCAP is a register for devices with energy storage capacitors. Reviewed-by: Benjamin Streb Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 8 include/hw/i2c/pmbus_device.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c

[PATCH v3 8/8] hw/i2c: pmbus: reset page register for out of range reads

2023-10-23 Thread Titus Rwantare
. Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/i2c/pmbus_device.c | 18 +- tests/qtest/max34451-test.c | 24 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 481e158380

[PATCH v3 2/8] hw/i2c: pmbus: add vout mode bitfields

2023-10-23 Thread Titus Rwantare
to scale the voltage readings. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- include/hw/i2c/pmbus_device.h | 8 1 file changed, 8 insertions(+) diff --git a/include/hw/i2c/pmbus_device.h b/include/hw/i2c/pmbus_device.h index 7dc00cc4d9..2e95164aa1 100644 --- a/include/hw/i2c

[PATCH v3 5/8] hw/sensor: add ADM1266 device model

2023-10-23 Thread Titus Rwantare
The ADM1266 is a cascadable super sequencer with margin control and fault recording. This commit adds basic support for its PMBus commands and models the identification registers that can be modified in a firmware update. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/arm

[PATCH v3 6/8] tests/qtest: add tests for ADM1266

2023-10-23 Thread Titus Rwantare
The ADM1266 can have string fields written by the driver, so it's worth specifically testing. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- tests/qtest/adm1266-test.c | 123 + tests/qtest/meson.build| 1 + 2 files changed, 124 insertions

[PATCH v3 3/8] hw/i2c: pmbus: add fan support

2023-10-23 Thread Titus Rwantare
PMBus devices may integrate fans whose operation is configurable over PMBus. This commit allows the driver to read and write the fan control registers but does not model the operation of fans. Reviewed-by: Stephen Longfield Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 176

[PATCH v3 1/8] hw/i2c: pmbus add support for block receive

2023-10-23 Thread Titus Rwantare
-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 30 +- include/hw/i2c/pmbus_device.h | 7 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index cef51663d0..ea15490720 100644 --- a/hw/i2c

[PATCH v3 0/8] PMBus fixes and new functions

2023-10-23 Thread Titus Rwantare
: - Added fixes to PMBus: page resets and fault clearing Changes in v2: - Expanded commit descriptions - Added the ADM1266 device model that uses new functions Titus Rwantare (8): hw/i2c: pmbus add support for block receive hw/i2c: pmbus: add vout mode bitfields hw/i2c: pmbus: add

[PATCH 2/7] hw/i2c: pmbus: add vout mode bitfields

2023-03-30 Thread Titus Rwantare
to scale the voltage readings. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- include/hw/i2c/pmbus_device.h | 8 1 file changed, 8 insertions(+) diff --git a/include/hw/i2c/pmbus_device.h b/include/hw/i2c/pmbus_device.h index 7dc00cc4d9..2e95164aa1 100644 --- a/include/hw/i2c

[PATCH 5/7] hw/i2c: pmbus: add VCAP register

2023-03-30 Thread Titus Rwantare
VCAP is a register for devices with energy storage capacitors. Reviewed-by: Benjamin Streb Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 8 include/hw/i2c/pmbus_device.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c

[PATCH 1/7] hw/i2c: pmbus add support for block receive

2023-03-30 Thread Titus Rwantare
-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 30 +- include/hw/i2c/pmbus_device.h | 7 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c3d6046784..02647769cd 100644 --- a/hw/i2c

[PATCH 4/7] hw/i2c: pmbus: block uninitialised string reads

2023-03-30 Thread Titus Rwantare
Devices models calling pmbus_send_string can't be relied upon to send a non-zero pointer. This logs an error and doesn't segfault. Reviewed-by: Patrick Venture Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/i2c

[PATCH 3/7] hw/i2c: pmbus: add fan support

2023-03-30 Thread Titus Rwantare
PMBus devices may integrate fans whose operation is configurable over PMBus. This commit allows the driver to read and write the fan control registers but does not model the operation of fans. Reviewed-by: Stephen Longfield Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 176

[PATCH 7/7] tests/qtest: add tests for ADM1266

2023-03-30 Thread Titus Rwantare
The ADM1266 can have string fields written by the driver, so it's worth specifically testing. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- tests/qtest/adm1266-test.c | 123 + tests/qtest/meson.build| 1 + 2 files changed, 124 insertions

[PATCH 6/7] hw/sensor: add ADM1266 device model

2023-03-30 Thread Titus Rwantare
The ADM1266 is a cascadable super sequencer with margin control and fault recording. This commit adds basic support for its PMBus commands and models the identification registers that can be modified in a firmware update. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/arm

[PATCH 0/7] PMBus fixes and new functions

2023-03-30 Thread Titus Rwantare
: - Expanded commit descriptions - Added the ADM1266 device model that uses new functions Titus Rwantare (7): hw/i2c: pmbus add support for block receive hw/i2c: pmbus: add vout mode bitfields hw/i2c: pmbus: add fan support hw/i2c: pmbus: block uninitialised string reads hw/i2c

Re: [PATCH 1/5] hw/i2c: pmbus add support for block receive

2023-03-30 Thread Titus Rwantare
pon to have empty descriptions, some rationale > would be helpful. For instance, you remove a length check from the send > string, why did you do that? > > Any why is this being added? What's it supporting? > > -corey > > On Wed, Mar 22, 2023 at 05:55:09PM +, Titus R

[PATCH 1/5] hw/i2c: pmbus add support for block receive

2023-03-22 Thread Titus Rwantare
Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 30 +- include/hw/i2c/pmbus_device.h | 7 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c3d6046784

[PATCH 4/5] hw/i2c: pmbus: block uninitialised string reads

2023-03-22 Thread Titus Rwantare
Devices models calling pmbus_send_string can't be relied upon to send a non-zero pointer. This logs an error and doesn't segfault. Reviewed-by: Patrick Venture Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/i2c

[PATCH 3/5] hw/i2c: pmbus: add fan support

2023-03-22 Thread Titus Rwantare
Reviewed-by: Stephen Longfield Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 176 ++ include/hw/i2c/pmbus_device.h | 1 + 2 files changed, 177 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 02647769cd

[PATCH 5/5] hw/i2c: pmbus: add VCAP register

2023-03-22 Thread Titus Rwantare
VCAP is a register for devices with energy storage capacitors. Reviewed-by: Benjamin Streb Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 8 include/hw/i2c/pmbus_device.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c

[PATCH 0/5] PMBus fixes and new functions

2023-03-22 Thread Titus Rwantare
, whose bits determine the formatting of several read commands in PMBus Fixes: - String read now handles now logs an error when passed an empty string This series is in preparation for some additional sensors that exercise this functionality that will be incoming shortly. Thanks Titus Rwantare

[PATCH 2/5] hw/i2c: pmbus: add vout mode bitfields

2023-03-22 Thread Titus Rwantare
Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- include/hw/i2c/pmbus_device.h | 8 1 file changed, 8 insertions(+) diff --git a/include/hw/i2c/pmbus_device.h b/include/hw/i2c/pmbus_device.h index 7dc00cc4d9..2e95164aa1 100644 --- a/include/hw/i2c/pmbus_device.h +++ b/include/hw

[PATCH v3 1/5] bitops.h: add deposit16 function

2023-03-20 Thread Titus Rwantare
Makes it more explicit that 16 bit values are being used Signed-off-by: Titus Rwantare --- include/qemu/bitops.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 03213ce952..887b8f8ce8 100644 --- a/include/qemu

[PATCH v3 3/5] hw/gpio: add PCA9536 i2c gpio expander

2023-03-20 Thread Titus Rwantare
This device has the same register layout as the pca9538, but 4 fewer gpio pins. This commit lowers the number of pins initialised, and reuses the pca9538 logic. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 18

[PATCH v3 0/5] PCA I2C GPIO expanders

2023-03-20 Thread Titus Rwantare
asymmetric 16-bit test values - add patch to imply I2C devices on NPCM7xx boards Since v1: - addressed comments - fixed typos in commit messages Titus Rwantare (5): bitops.h: add deposit16 function hw/gpio: add PCA953x i2c GPIO expanders hw/gpio: add PCA9536 i2c gpio expander hw/i2c: add cano

[PATCH v3 2/5] hw/gpio: add PCA953x i2c GPIO expanders

2023-03-20 Thread Titus Rwantare
The PCA6416 is an i2c device with 16 GPIO pins, the PCA9538 has 8 pins. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/Kconfig | 5 + hw/gpio/meson.build | 1 + hw/gpio/pca_i2c_gpio.c | 392

[PATCH v3 5/5] hw/arm: imply I2C_DEVICES on NPCM7xx

2023-03-20 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index b5aed4aff5..548c10d7fc 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -406,6 +406,7 @@ config XLNX_VERSAL config NPCM7XX bool +imply

[PATCH v3 4/5] hw/i2c: add canonical path to i2c event traces

2023-03-20 Thread Titus Rwantare
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Titus Rwantare --- hw/i2c/core.c | 8 +--- hw/i2c/trace-events | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/i2c/core.c b/hw/i2c/core.c index bed594fe59..896da359f5 100644 --- a/hw/i2c/core.c +++ b/hw/i2c

[PATCH v2 1/4] hw/gpio: add PCA6416 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
The PCA6416 is an i2c device with 16 GPIOs. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/arm/Kconfig | 1 + hw/gpio/Kconfig | 4 + hw/gpio/meson.build | 1 + hw/gpio/pca_i2c_gpio.c | 388

[PATCH v2 3/4] hw/gpio: add PCA9536 i2c gpio expander

2023-02-08 Thread Titus Rwantare
This device has the same register layout as the pca9538, but 4 fewer gpio pins. This commit lowers the number of pins initialised, and reuses the pca9538 logic. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 18 ++ include/hw/gpio

[PATCH v2 2/4] hw/gpio: add PCA9538 8-bit GPIO expander

2023-02-08 Thread Titus Rwantare
The 8-bit expander has different register offsets than the 16-bit one, making them incompatible. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 94 ++ include/hw/gpio/pca_i2c_gpio.h | 7 +++ 2 files changed, 101

[PATCH v2 0/4] PCA I2C GPIO expanders

2023-02-08 Thread Titus Rwantare
io_input", 0x0F00, _abort); We currently use these to test hardware presence and LEDs in simulation. Thanks Since v1: - addressed comments - fixed typos in commit messages Titus Rwantare (4): hw/gpio: add PCA6416 i2c GPIO expander hw/gpio: add PCA9538 8-bit GPIO expander hw/gpio: add

[PATCH v2 4/4] hw/i2c: add canonical path to i2c event traces

2023-02-08 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/core.c | 8 +--- hw/i2c/trace-events | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/i2c/core.c b/hw/i2c/core.c index d4ba8146bf..c583c1497a 100644 --- a/hw/i2c/core.c +++ b/hw/i2c/core.c @@ -161,7 +161,8 @@ static int

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 14:27, Corey Minyard wrote: > > On Mon, Feb 06, 2023 at 07:49:34PM +, Titus Rwantare wrote: > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > > > Reviewed-by: Hao Wu > > Signed-off-by: Titus R

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 13:38, Philippe Mathieu-Daudé wrote: > > Hi Titus, > > On 6/2/23 20:49, Titus Rwantare wrote: > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > > > Reviewed-by: Hao Wu > > Signed-off-by: Ti

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 17:29, Dong, Eddie wrote: > > -Original Message- > > From: qemu-devel-bounces+eddie.dong=intel@nongnu.org > devel-bounces+eddie.dong=intel@nongnu.org> On Behalf Of Titus > > Rwantare > > Sent: Monday, February 6, 20

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 19:43, Joel Stanley wrote: > > On Mon, 6 Feb 2023 at 19:51, Titus Rwantare wrote: > > > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > Nice. > > In Linux this is supported by a driver called pca953x.

[PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-06 Thread Titus Rwantare
This is a simple i2c device that allows i2c capable devices to have GPIOs. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/arm/Kconfig | 1 + hw/gpio/meson.build | 1 + hw/gpio/pca_i2c_gpio.c | 362 hw/gpio

[PATCH 2/3] hw/gpio: add PCA9538 8-bit GPIO expander

2023-02-06 Thread Titus Rwantare
The 8-bit expander has different register offsets than the 16-bit one, making them incompatible. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 98 ++ include/hw/gpio/pca_i2c_gpio.h | 7 +++ 2 files changed, 105

[PATCH 3/3] hw/gpio: add PCA9536 i2c gpio expander

2023-02-06 Thread Titus Rwantare
This device has the same register layout as the pca9538, but 4 fewer gpio pins. This commit lowers the number of pins intialised, and reuses the pca9539 logic. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 22 ++ include/hw/gpio

[PATCH 0/3] PCA I2C GPIO expanders

2023-02-06 Thread Titus Rwantare
io_input", 0x0F00, _abort); We currently use these to test hardware presence and LEDs in simulation. Thanks Titus Rwantare (3): hw/gpio: add PCA6414 i2c GPIO expander hw/gpio: add PCA9538 8-bit GPIO expander hw/gpio: add PCA9536 i2c gpio expander hw/arm/Kconfig

[RFC PATCH v2 3/3] hw/peci: add support for EndPointConfig reads

2022-09-13 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/peci/peci-client.c | 63 ++ hw/peci/peci-core.c| 44 +++-- include/hw/peci/peci.h | 23 +++ 3 files changed, 128 insertions(+), 2 deletions(-) diff --git

[RFC PATCH v2 2/3] hw/peci: add PECI support for NPCM7xx BMCs

2022-09-13 Thread Titus Rwantare
This allows BMC firmware for npcm7xx BMCs to talk to a PECI client in qemu. Signed-off-by: Titus Rwantare Reviewed-by: Patrick Venture Reviewed-by: Peter Delevoryas --- MAINTAINERS| 1 + hw/arm/Kconfig | 1 + hw/arm/npcm7xx.c | 9 ++ hw

Re: [RFC PATCH 3/3] hw/peci: add support for EndPointConfig reads

2022-09-13 Thread Titus Rwantare
On Fri, 9 Sept 2022 at 12:48, Peter Delevoryas wrote: > > On Tue, Sep 06, 2022 at 10:05:52PM +, Titus Rwantare wrote: > > Signed-off-by: Titus Rwantare > > Reviewed-by: Hao Wu > > --- ... > > +++ b/include/hw/peci/peci.h > > @@ -112,6 +112

Re: [RFC PATCH 1/3] hw/peci: add initial support for PECI

2022-09-13 Thread Titus Rwantare
On Fri, 9 Sept 2022 at 12:58, Peter Delevoryas wrote: > > +/* > > + * PECI Client device > > + * Copyright 2021 Google LLC > > + * > > + * SPDX-License-Identifier: GPL-2.0-or-later > > Not sure, but I think the SPDX license identifier is supposed to be in > the first line? Maybe not though. I

Re: [RFC PATCH 0/3] Initial PECI bus support

2022-09-13 Thread Titus Rwantare
On Fri, 9 Sept 2022 at 12:54, Peter Delevoryas wrote: > > On Tue, Sep 06, 2022 at 10:05:49PM +, Titus Rwantare wrote: ... > > > > This is something that can also be extended as other parameters arise that > > need > > to differ between platforms. So far you can

[RFC PATCH v2 0/3] Initial PECI bus support

2022-09-13 Thread Titus Rwantare
are hard coded, see hw/peci/peci-client.c. I'd like to gauge interest in what potential users would like to be adjustable at runtime. I've not written QEMU models that read config files at runtime, something I'd appreciate guidance on. Thanks all Changes in v2: - rename EndPt to EndPoint Titus Rwa

[RFC PATCH v2 1/3] hw/peci: add initial support for PECI

2022-09-13 Thread Titus Rwantare
config space is exposed due to Intel posting various platform configuration in PCI config space. Commands implemented: - Ping - GetDIB - GetTemp - GetPkgConfig (partial) Commands not implemented: - RdIAMSR - RdPCIConfig - RdPCIConfigLocal Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu Reviewed

[RFC PATCH 2/3] hw/peci: add PECI support for NPCM7xx BMCs

2022-09-06 Thread Titus Rwantare
This allows BMC firmware for npcm7xx BMCs to talk to a PECI client in qemu. Signed-off-by: Titus Rwantare Reviewed-by: Patrick Venture --- MAINTAINERS| 3 +- hw/arm/Kconfig | 1 + hw/arm/npcm7xx.c | 9 ++ hw/peci/meson.build

[RFC PATCH 3/3] hw/peci: add support for EndPointConfig reads

2022-09-06 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/peci/peci-client.c | 63 ++ hw/peci/peci-core.c| 44 +++-- include/hw/peci/peci.h | 23 +++ 3 files changed, 128 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 0/3] Initial PECI bus support

2022-09-06 Thread Titus Rwantare
are hard coded, see hw/peci/peci-client.c. I'd like to gauge interest in what potential users would like to be adjustable at runtime. I've not written QEMU models that read config files at runtime, something I'd appreciate guidance on. Thanks all Titus Rwantare (3): hw/peci: add initial suppor

[RFC PATCH 1/3] hw/peci: add initial support for PECI

2022-09-06 Thread Titus Rwantare
config space is exposed due to Intel posting various platform configuration in PCI config space. Commands implemented: - Ping - GetDIB - GetTemp - GetPkgConfig (partial) Commands not implemented: - RdIAMSR - RdPCIConfig - RdPCIConfigLocal Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu Reviewed

Re: [PATCH v3 09/14] hw/sensor: Add IC_DEVICE_ID to ISL voltage regulators

2022-06-30 Thread Titus Rwantare
ot;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) > -- > 2.37.0 > Reviewed-by: Titus Rwantare

Re: [PATCH v3 08/14] hw/i2c/pmbus: Add idle state to return 0xff's

2022-06-30 Thread Titus Rwantare
and is issued. > + */ > +void pmbus_idle(PMBusDevice *pmdev); > + > extern const VMStateDescription vmstate_pmbus_device; > > #define VMSTATE_PMBUS_DEVICE(_field, _state) { \ > -- > 2.37.0 > Reviewed-by: Titus Rwantare

Re: [PATCH v3 10/14] hw/sensor: Add Renesas ISL69259 device model

2022-06-30 Thread Titus Rwantare
On Wed, 29 Jun 2022 at 21:52, Peter Delevoryas wrote: > > From: Peter Delevoryas > > This adds the ISL69259, using all the same functionality as the existing > ISL69260 but overriding the IC_DEVICE_ID. > > Signed-off-by: Peter Delevoryas > --- > hw/sensor/isl_pmbus_vr.c | 28

Re: [PATCH v3 10/14] hw/sensor: Add Renesas ISL69259 device model

2022-06-30 Thread Titus Rwantare
On Wed, 29 Jun 2022 at 23:30, Cédric Le Goater wrote: > > On 6/30/22 06:51, Peter Delevoryas wrote: > > From: Peter Delevoryas > > > > This adds the ISL69259, using all the same functionality as the existing > > ISL69260 but overriding the IC_DEVICE_ID. > > > > Signed-off-by: Peter Delevoryas >

Re: [PATCH v2 08/13] hw/i2c/pmbus: Reset out buf after switching pages

2022-06-29 Thread Titus Rwantare
On Tue, 28 Jun 2022 at 20:36, Peter Delevoryas wrote: > > When a pmbus device switches pages, it should clears its output buffer so > that the next transaction doesn't emit data from the previous page. > > Fixes: 3746d5c15e70570b ("hw/i2c: add support for PMBus”) > Signed-off-by: Peter Delevoryas

Re: [PATCH v2 09/13] hw/i2c/pmbus: Add read-only IC_DEVICE_ID support

2022-06-29 Thread Titus Rwantare
On Tue, 28 Jun 2022 at 20:36, Peter Delevoryas wrote: > > Signed-off-by: Peter Delevoryas > --- > --- a/hw/i2c/pmbus_device.c > +++ b/hw/i2c/pmbus_device.c > @@ -984,6 +984,11 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd) > } > break; > > +case PMBUS_IC_DEVICE_ID:

Re: [PATCH v2 0/7] Add Qualcomm BMC machines

2022-06-27 Thread Titus Rwantare
You can take them through the aspeed branch. Thanks. -Titus On Mon, 27 Jun 2022 at 09:33, Cédric Le Goater wrote: > > Hello Titus, > > On 6/27/22 17:46, Jae Hyun Yoo wrote: > > Hello, > > > > I'm sending a series to add Qualcomm BMC machines that are equipped with > > Aspeed AST2600 SoC. Also,

Re: [PATCH 6/9] hw/sensor: add Maxim MAX31785 device

2022-06-22 Thread Titus Rwantare
fan_pwm2rpm, MAX31785State, > +MAX31785_TOTAL_NUM_PAGES), > + VMSTATE_UINT64(mfr_location, MAX31785State), > +VMSTATE_UINT64(mfr_date, MAX31785State), > +VMSTATE_UINT64(mfr_serial, MAX31785State), > +VMSTATE_END_OF_LIST() > +} > +}; > + There's missing indentation here for example. Thanks, Titus Rwantare

Re: [PATCH 5/9] hw/i2c: pmbus: Page #255 is valid page for read requests.

2022-06-22 Thread Titus Rwantare
d to read from all pages\n", >__func__); > -pmbus_cml_error(pmdev); > } else if (pmdev->page > pmdev->num_pages - 1) { > qemu_log_mask(LOG_GUEST_ERROR, > "%s: page %d is out of range\n", > -- > 2.25.1 > Please also update the stale comment just above, since this is now specified behaviour. Reviewed-by: Titus Rwantare

[PATCH v4 0/9] Fixups for PMBus and new sensors

2022-03-07 Thread Titus Rwantare
returns Shengtan Mao (1): hw/i2c: Added linear mode translation for pmbus devices Titus Rwantare (8): hw/i2c: pmbus: add registers hw/i2c: pmbus: fix error returns and guard against out of range accesses hw/i2c: pmbus: add PEC unsupported warning hw/i2c: pmbus: refactor uint handling

[PATCH v4 3/9] hw/i2c: pmbus: add PEC unsupported warning

2022-03-07 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c7ec8e5499..ff644c1d4a 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -307,6 +307,11 @@ static uint8_t

[PATCH v4 1/9] hw/i2c: pmbus: add registers

2022-03-07 Thread Titus Rwantare
- add the VOUT_MIN and STATUS_MFR registers Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 24 include/hw/i2c/pmbus_device.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw

[PATCH v4 7/9] hw/sensor: add Intersil ISL69260 device model

2022-03-07 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 3 + hw/arm/Kconfig | 1 + hw/sensor/Kconfig| 5 + hw/sensor/isl_pmbus_vr.c | 211 + hw/sensor

[PATCH v4 9/9] hw/sensor: add Renesas raa228000 device

2022-03-07 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu Reviewed-by: Philippe Mathieu-Daudé --- hw/sensor/isl_pmbus_vr.c | 50 ++ include/hw/sensor/isl_pmbus_vr.h | 1 + tests/qtest/isl_pmbus_vr-test.c | 72 3 files changed, 123

[PATCH v4 6/9] hw/i2c: Added linear mode translation for pmbus devices

2022-03-07 Thread Titus Rwantare
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 18 ++ include/hw/i2c/pmbus_device.h | 20 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw

[PATCH v4 4/9] hw/i2c: pmbus: refactor uint handling

2022-03-07 Thread Titus Rwantare
This change cleans up the inputs to pmbus_receive uint, the length of received data is contained in PMBusDevice state and doesn't need to be passed around. Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 18 +- 1 file changed, 9

[PATCH v4 8/9] hw/sensor: add Renesas raa229004 PMBus device

2022-03-07 Thread Titus Rwantare
The Renesas RAA229004 is a PMBus Multiphase Voltage Regulator Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu Reviewed-by: Philippe Mathieu-Daudé --- hw/sensor/isl_pmbus_vr.c | 18 ++ include/hw/sensor/isl_pmbus_vr.h | 1 + tests/qtest/isl_pmbus_vr-test.c | 8

[PATCH v4 5/9] hw/i2c: pmbus: update MAINTAINERS

2022-03-07 Thread Titus Rwantare
add self to MAINTAINERS for the PMBus subsystem and related sensors, and set PMBus as maintained. Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fa8adc2618

[PATCH v4 2/9] hw/i2c: pmbus: fix error returns and guard against out of range accesses

2022-03-07 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 47 --- include/hw/i2c/pmbus_device.h | 2 ++ 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c

Re: [PATCH v3 3/9] hw/i2c: pmbus: add PEC unsupported warning

2022-03-07 Thread Titus Rwantare
Yes, fixed. On Fri, 4 Mar 2022 at 16:02, Philippe Mathieu-Daudé wrote: > > On 2/3/22 02:50, Titus Rwantare wrote: > > Signed-off-by: Titus Rwantare > > --- > > hw/i2c/pmbus_device.c | 5 + > > 1 file changed, 5 insertions(+) > > > > d

Re: [PATCH v3 2/9] hw/i2c: pmbus: guard against out of range accesses

2022-03-07 Thread Titus Rwantare
02:50, Titus Rwantare wrote: > > Signed-off-by: Titus Rwantare > > --- > > hw/i2c/pmbus_device.c | 41 - > > 1 file changed, 40 insertions(+), 1 deletion(-) > > > static uint8_t pmbus_receive_byte(SMBusDevice *sm

Re: [PATCH v3 0/9] 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,

2022-03-04 Thread Titus Rwantare
On Fri, 4 Mar 2022 at 13:43, Corey Minyard wrote: > > On Tue, Mar 01, 2022 at 05:50:44PM -0800, Titus Rwantare wrote: > > v2: > > - split PMBus commit with updates into individual fixes > > - renamed isl_pmbus[.ch] adding _vr for voltage regulators > > >

[PATCH v3 7/9] hw/sensor: add Intersil ISL69260 device model

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- MAINTAINERS | 3 + hw/arm/Kconfig | 1 + hw/sensor/Kconfig| 5 + hw/sensor/isl_pmbus_vr.c | 211 + hw/sensor/meson.build| 1 + include/hw

[PATCH v3 5/9] hw/i2c: pmbus: update MAINTAINERS

2022-03-01 Thread Titus Rwantare
add self to MAINTAINERS for the PMBus subsystem and related sensors, and set PMBus as maintained. Signed-off-by: Titus Rwantare --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fa8adc2618..3601984b5d 100644 --- a/MAINTAINERS +++ b

[PATCH v3 0/9] 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, whe

2022-03-01 Thread Titus Rwantare
Shengtan Mao (1): hw/i2c: Added linear mode translation for pmbus devices Titus Rwantare (8): hw/i2c: pmbus: add registers hw/i2c: pmbus: guard against out of range accesses hw/i2c: pmbus: add PEC unsupported warning hw/i2c: pmbus: refactor uint handling hw/i2c: pmbus: update MAINTAINERS

[PATCH v3 9/9] hw/sensor: add Renesas raa228000 device

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/sensor/isl_pmbus_vr.c | 50 include/hw/sensor/isl_pmbus_vr.h | 1 + tests/qtest/isl_pmbus_vr-test.c | 78 ++-- 3 files changed, 126 insertions(+), 3 deletions(-) diff --git a/hw

[PATCH v3 2/9] hw/i2c: pmbus: guard against out of range accesses

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 07a45c99f9..93c746bab3 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c

[PATCH v3 4/9] hw/i2c: pmbus: refactor uint handling

2022-03-01 Thread Titus Rwantare
This change cleans up the inputs to pmbus_receive uint, the length of received data is contained in PMBusDevice state and doesn't need to be passed around. Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH v3 3/9] hw/i2c: pmbus: add PEC unsupported warning

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 93c746bab3..6eeb0731d7 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -307,6 +307,11 @@ static uint8_t

[PATCH v3 8/9] hw/sensor: add Renesas raa229004 PMBus device

2022-03-01 Thread Titus Rwantare
The Renesas RAA229004 is a PMBus Multiphase Voltage Regulator Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/sensor/isl_pmbus_vr.c | 18 ++ include/hw/sensor/isl_pmbus_vr.h | 1 + tests/qtest/isl_pmbus_vr-test.c | 8 3 files changed, 27 insertions

[PATCH v3 6/9] hw/i2c: Added linear mode translation for pmbus devices

2022-03-01 Thread Titus Rwantare
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 18 ++ include/hw/i2c/pmbus_device.h | 20 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c

[PATCH v3 1/9] hw/i2c: pmbus: add registers

2022-03-01 Thread Titus Rwantare
- add the VOUT_MIN and STATUS_MFR registers Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 24 include/hw/i2c/pmbus_device.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 24f8f522d9

Re: [PATCH v2 9/9] hw/sensor: rename isl_pmbus to isl_pmbus_vr

2022-03-01 Thread Titus Rwantare
The rename is from feedback in v1 by Peter. I did this in a separate patch as it's easier to merge, compared to editing the 4 commits affected by this. Titus On Tue, 1 Mar 2022 at 16:43, Corey Minyard wrote: > > On Tue, Mar 01, 2022 at 04:23:07PM -0800, Titus Rwantare wrote: > >

[PATCH v2 9/9] hw/sensor: rename isl_pmbus to isl_pmbus_vr

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- MAINTAINERS | 6 +- hw/arm/Kconfig| 2 +- hw/sensor/Kconfig | 2 +- hw/sensor/{isl_pmbus.c => isl_pmbus_vr.c} | 77 ++--- hw/sensor/meson.bu

[PATCH v2 0/9] Fixups for PMBus and new sensors

2022-03-01 Thread Titus Rwantare
[.ch] adding _vr for voltage regulators Shengtan Mao (1): hw/i2c: Added linear mode translation for pmbus devices Titus Rwantare (8): hw/i2c: pmbus: add registers hw/i2c: pmbus: guard against out of range accesses hw/i2c: pmbus: add PEC unsupported warning hw/i2c: pmbus: refactor uint

[PATCH v2 7/9] hw/sensor: add Renesas raa229004 PMBus device

2022-03-01 Thread Titus Rwantare
The Renesas RAA229004 is a PMBus Multiphase Voltage Regulator Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- hw/sensor/isl_pmbus.c | 18 ++ include/hw/sensor/isl_pmbus.h | 1 + tests/qtest/isl_pmbus-test.c | 8 3 files changed, 27 insertions(+) diff

[PATCH v2 6/9] hw/sensor: add Intersil ISL69260 device model

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- 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

[PATCH v2 8/9] hw/sensor: add Renesas raa228000 device

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare Reviewed-by: Hao Wu --- 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(-) diff --git a/hw

[PATCH v2 2/9] hw/i2c: pmbus: guard against out of range accesses

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 07a45c99f9..93c746bab3 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c

[PATCH v2 5/9] hw/i2c: Added linear mode translation for pmbus devices

2022-03-01 Thread Titus Rwantare
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 18 ++ include/hw/i2c/pmbus_device.h | 20 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c

[PATCH v2 4/9] hw/i2c: pmbus: refactor uint handling and update MAINTAINERS

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- MAINTAINERS | 10 ++ hw/i2c/pmbus_device.c | 18 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fa8adc2618..3601984b5d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3135,6

[PATCH v2 3/9] hw/i2c: pmbus: add PEC unsupported warning

2022-03-01 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 93c746bab3..6eeb0731d7 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -307,6 +307,11 @@ static uint8_t

[PATCH v2 1/9] hw/i2c: pmbus: add registers

2022-03-01 Thread Titus Rwantare
- add the VOUT_MIN and STATUS_MFR registers Signed-off-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 24 include/hw/i2c/pmbus_device.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 24f8f522d9

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

2022-01-27 Thread Titus Rwantare
On Thu, 27 Jan 2022 at 11:39, Peter Maydell wrote: > > On Thu, 6 Jan 2022 at 23:19, Titus Rwantare wrote: > > > > +static uint8_t isl_pmbus_read_byte(PMBusDevice *pmdev) > > +{ > > +qemu_log_mask(LOG_GUEST_ERROR, > > + "%s: re

  1   2   >