qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Titus Rwantare <titusr@google.com>
To: Corey Minyard <cminyard@mvista.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	 Titus Rwantare <titusr@google.com>
Subject: [PATCH 0/3] Add support for PMBus in QEMU
Date: Tue,  4 May 2021 09:28:38 -0700	[thread overview]
Message-ID: <20210504162841.2884846-1-titusr@google.com> (raw)

Hello,

This patch series adds an interface to start supporting PMBus devices in QEMU.
I’ve included two PMBus devices: MAX34451 and ADM1272.

PMBus is a variant of SMBus meant for digital management of power supplies.
PMBus adds to the SMBus standard by defining a number of constants and commands
used by compliant devices. The specification for PMBus can be found at:

https://pmbus.org/specification-archives/

Currently, the goal for these devices is to emulate basic functionality by
reading and writing registers. Timing, and some logical operation is not
implemented. This implementation supports nearly all available registers for
PMBus including:
   - Voltage inputs and outputs
   - Current inputs and outputs
   - Temperature sensors

Unimplimented registers get passed through to the device model, and device
models can opt out of using the standard registers with flags. The included
devices make use of these fields and illustrate how to interface with the pmbus
class.

Datasheets for sensors:

https://datasheets.maximintegrated.com/en/ds/MAX34451.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADM1272.pdf

Thanks for reviewing,

Titus Rwantare

Titus Rwantare (3):
  hw/i2c: add support for PMBus
  hw/misc: add ADM1272 device
  hw/misc: add MAX34451 device

 hw/arm/Kconfig                |    3 +
 hw/i2c/Kconfig                |    4 +
 hw/i2c/meson.build            |    1 +
 hw/i2c/pmbus_device.c         | 1611 +++++++++++++++++++++++++++++++++
 hw/misc/Kconfig               |    8 +
 hw/misc/adm1272.c             |  551 +++++++++++
 hw/misc/max34451.c            |  727 +++++++++++++++
 hw/misc/meson.build           |    2 +
 include/hw/i2c/pmbus_device.h |  520 +++++++++++
 tests/qtest/adm1272-test.c    |  453 +++++++++
 tests/qtest/max34451-test.c   |  344 +++++++
 tests/qtest/meson.build       |    2 +
 12 files changed, 4226 insertions(+)
 create mode 100644 hw/i2c/pmbus_device.c
 create mode 100644 hw/misc/adm1272.c
 create mode 100644 hw/misc/max34451.c
 create mode 100644 include/hw/i2c/pmbus_device.h
 create mode 100644 tests/qtest/adm1272-test.c
 create mode 100644 tests/qtest/max34451-test.c

-- 
2.31.1.527.g47e6f16901-goog



             reply	other threads:[~2021-05-04 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 16:28 Titus Rwantare [this message]
2021-05-04 16:28 ` [PATCH 1/3] hw/i2c: add support for PMBus Titus Rwantare
2021-05-04 20:49   ` Philippe Mathieu-Daudé
2021-05-04 21:45     ` Titus Rwantare
2021-05-05  1:41   ` Joel Stanley
2021-05-04 16:28 ` [PATCH 2/3] hw/misc: add ADM1272 device Titus Rwantare
2021-05-04 16:28 ` [PATCH 3/3] hw/misc: add MAX34451 device Titus Rwantare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210504162841.2884846-1-titusr@google.com \
    --to=titusr@google.com \
    --cc=cminyard@mvista.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).