Re: [PATCH v6 0/9] Add new device emulation for TI ADC128D818

Cédric Le Goater <[email protected]>
Newsgroups org.nongnu.qemu-arm
Message-ID <[email protected]>
On 7/7/26 11:15, Emmanuel Blot wrote:
> hw/sensor: Add new device emulation for TI ADC128D818
> 
> This is a 12-bit, 8-channel ADC I2C device, which is used on several
> OpenBMC platforms.
> 
> QOM properties can be used to change input ADC values and external VREF at
> run time.
> 
> Add it to AST2600-based Anacapa machine, along with some functional tests
> that use QOM properties to inject voltage values into analog inputs.
> 
> Datasheet: https://www.ti.com/lit/gpn/ADC128D818
> 
> To: [email protected]
> Cc: Paolo Bonzini <[email protected]>
> Cc: Philippe Mathieu-Daudé <[email protected]>
> Cc: Fabiano Rosas <[email protected]>
> Cc: Laurent Vivier <[email protected]>
> Cc: Peter Maydell <[email protected]>
> Cc: Cédric Le Goater <[email protected]>
> Cc: Steven Lee <[email protected]>
> Cc: Troy Lee <[email protected]>
> Cc: Jamin Lin <[email protected]>
> Cc: Kane Chen <[email protected]>
> Cc: Andrew Jeffery <[email protected]>
> Cc: Joel Stanley <[email protected]>
> Cc: Alexander Hansen <[email protected]>
> Cc: William de Abreu Pinho <[email protected]>
> Cc: Emmanuel Blot <[email protected]>
> Cc: [email protected]
> Signed-off-by: Emmanuel Blot <[email protected]>
> 
> ---
> Changes in v6:
> - Update wait_adc128d818_value in tests/functional/arm/test_aspeed_anacapa.py
>    to reduce timeout and max number of retries to read from adc128d818
> - Replace UTF08 EM DASH characters with ASCII ones in tests/functional/arm/test_aspeed_anacapa.py
> - Link to v5: https://lore.kernel.org/qemu-devel/[email protected]
> 
> Changes in v5:
> - Change author/committer/signed-off-by address to circumvent SMTP issues
> - Link to v4: https://lore.kernel.org/qemu-devel/[email protected]
> 
> Changes in v4:
> - Better follow QEMU coding style (lowercase hex number, signed integer
> constants, parent object variable name in Device)
> - Split adc128d818 test large commit into smaller ones
> - Link to v3: https://lore.kernel.org/qemu-devel/[email protected]
> 
> Changes in v3:
> - Update anacapa test image with proper DTB
> - Make I2C device in i2c_slave_create_simple a child of the I2C bus
> - Simplify tests/functional/arm/test_aspeed_anacapa.py
> - Use g_test_message rather than fprintf
> - Keep review trailers
> - Link to v2: https://lore.kernel.org/qemu-devel/[email protected]
> 
> Changes in v2:
> - Remove clang-format useless comment sections
> - Link to v1: https://lore.kernel.org/qemu-devel/[email protected]
> 
> 
> Emmanuel Blot (9):
>    hw/sensor: adc128d818: add 12-bit 8-channel ADC device
>    tests/qtest: adc128d818: add test harness and register access
>    tests/qtest: adc128d818: test voltage and temperature conversion
>    tests/qtest: adc128d818: test limit interrupts
>    tests/qtest: adc128d818: test operating modes and power control
>    hw/i2c: parent slaves created with i2c_slave_create_simple
>    hw/arm/aspeed: anacapa: use ASCII in comments
>    hw/arm: anacapa: add ADC128D818 devices
>    test/functional: anacapa: test ADC128D818
> 
>   hw/arm/Kconfig                              |   1 +
>   hw/arm/aspeed_ast2600_anacapa.c             |  27 +-
>   hw/i2c/core.c                               |   3 +
>   hw/sensor/Kconfig                           |   4 +
>   hw/sensor/adc128d818.c                      | 696 ++++++++++++++++
>   hw/sensor/meson.build                       |   1 +
>   hw/sensor/trace-events                      |   8 +
>   include/hw/i2c/i2c.h                        |   7 +-
>   include/hw/sensor/adc128d818.h              |  14 +
>   tests/functional/arm/test_aspeed_anacapa.py |  68 +-
>   tests/qtest/adc128d818-test.c               | 856 ++++++++++++++++++++
>   tests/qtest/meson.build                     |   1 +
>   12 files changed, 1671 insertions(+), 15 deletions(-)
>   create mode 100644 hw/sensor/adc128d818.c
>   create mode 100644 include/hw/sensor/adc128d818.h
>   create mode 100644 tests/qtest/adc128d818-test.c
> 

Applied 1-5,7 to

     https://github.com/legoater/qemu aspeed-next

Thanks,

C.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.