All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/8] hw/misc/pca9552: Trace GPIO change events
@ 2020-06-20 22:58 Philippe Mathieu-Daudé
  2020-06-20 22:58 ` [PATCH v4 1/8] hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref() Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-20 22:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Corey Minyard, Peter Maydell, Andrew Jeffery,
	Philippe Mathieu-Daudé,
	qemu-arm, Cédric Le Goater, Joel Stanley

This series add trace events to better display GPIO changes.
We'll continue in the following series by connecting LEDs to
these GPIOs.

This helps me to work on a generic LED device, see:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg711917.html

Example when booting an obmc-phosphor-image, we can see the LED #14
(front-power LED) starting to blink.

- ASCII LED bar view:

  $ qemu-system-arm -M witherspoon-bmc -trace pca9552_gpio_status
  1592689902.327837:pca9552_gpio_status pca-unspecified GPIOs 0-15 [*...............]
  1592689902.329934:pca9552_gpio_status pca-unspecified GPIOs 0-15 [**..............]
  1592689902.330717:pca9552_gpio_status pca-unspecified GPIOs 0-15 [***.............]
  1592689902.331431:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****............]
  1592689902.332163:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........*..]
  1592689902.332888:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........**.]
  1592689902.333629:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........***]
  1592690032.793289:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........*.*]
  1592690033.303163:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........***]
  1592690033.812962:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........*.*]
  1592690034.323234:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........***]
  1592690034.832922:pca9552_gpio_status pca-unspecified GPIOs 0-15 [****.........*.*]

- Only display GPIOs which status changes:

  $ qemu-system-arm -M witherspoon-bmc -trace pca9552_gpio_change
  1592690552.687372:pca9552_gpio_change pca1 GPIO id:0 status: 0 -> 1
  1592690552.690169:pca9552_gpio_change pca1 GPIO id:1 status: 0 -> 1
  1592690552.691673:pca9552_gpio_change pca1 GPIO id:2 status: 0 -> 1
  1592690552.696886:pca9552_gpio_change pca1 GPIO id:3 status: 0 -> 1
  1592690552.698614:pca9552_gpio_change pca1 GPIO id:13 status: 0 -> 1
  1592690552.699833:pca9552_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690552.700842:pca9552_gpio_change pca1 GPIO id:15 status: 0 -> 1
  1592690683.841921:pca9552_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690683.861660:pca9552_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690684.371460:pca9552_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690684.882115:pca9552_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690685.391411:pca9552_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690685.901391:pca9552_gpio_change pca1 GPIO id:14 status: 0 -> 1

For information about how to test the obmc-phosphor-image, see:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg712911.html

Supersedes: <20200619145101.1637-1-f4bug@amsat.org>
Based-on: <20200620162818.22340-1-f4bug@amsat.org>

Philippe Mathieu-Daudé (8):
  hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref()
  hw/misc/pca9552: Replace magic value by PCA9552_PIN_COUNT definition
  hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition
  hw/misc/pca9552: Add a 'description' property for debugging purpose
  hw/misc/pca9552: Trace GPIO High/Low events
  hw/arm/aspeed: Describe each PCA9552 device
  hw/misc/pca9552: Trace GPIO change events
  hw/misc/pca9552: Model qdev output GPIOs

 include/hw/i2c/i2c.h      |  2 ++
 include/hw/misc/pca9552.h |  4 +++
 hw/arm/aspeed.c           | 13 ++++---
 hw/i2c/core.c             | 18 ++++++++--
 hw/misc/pca9552.c         | 72 ++++++++++++++++++++++++++++++++++++++-
 hw/misc/trace-events      |  4 +++
 6 files changed, 106 insertions(+), 7 deletions(-)

-- 
2.21.3



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2020-06-27  6:58 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 22:58 [PATCH v4 0/8] hw/misc/pca9552: Trace GPIO change events Philippe Mathieu-Daudé
2020-06-20 22:58 ` [PATCH v4 1/8] hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref() Philippe Mathieu-Daudé
2020-06-22  8:28   ` Philippe Mathieu-Daudé
2020-06-22 15:17   ` Markus Armbruster
2020-06-22 15:41     ` Philippe Mathieu-Daudé
2020-06-23  7:26       ` Markus Armbruster
2020-06-20 22:58 ` [PATCH v4 2/8] hw/misc/pca9552: Replace magic value by PCA9552_PIN_COUNT definition Philippe Mathieu-Daudé
2020-06-22  6:27   ` Cédric Le Goater
2020-06-20 22:58 ` [PATCH v4 3/8] hw/misc/pca9552: Use the " Philippe Mathieu-Daudé
2020-06-22  6:25   ` Cédric Le Goater
2020-06-22  8:37     ` Philippe Mathieu-Daudé
2020-06-22 13:15       ` Cédric Le Goater
2020-06-20 22:58 ` [PATCH v4 4/8] hw/misc/pca9552: Add a 'description' property for debugging purpose Philippe Mathieu-Daudé
2020-06-22  6:27   ` Cédric Le Goater
2020-06-22  8:31     ` Philippe Mathieu-Daudé
2020-06-22 13:24       ` Cédric Le Goater
2020-06-25  6:37         ` Markus Armbruster
2020-06-25  8:12           ` Philippe Mathieu-Daudé
2020-06-25 14:23             ` Philippe Mathieu-Daudé
2020-06-26  5:49               ` Markus Armbruster
2020-06-26  9:43                 ` Philippe Mathieu-Daudé
2020-06-27  6:52                   ` Markus Armbruster
2020-06-20 22:58 ` [PATCH v4 5/8] hw/misc/pca9552: Trace GPIO High/Low events Philippe Mathieu-Daudé
2020-06-22  6:47   ` Cédric Le Goater
2020-06-20 22:58 ` [PATCH v4 6/8] hw/arm/aspeed: Describe each PCA9552 device Philippe Mathieu-Daudé
2020-06-22  6:49   ` Cédric Le Goater
2020-06-22  8:35     ` Philippe Mathieu-Daudé
2020-06-24 16:54       ` Philippe Mathieu-Daudé
2020-06-24 17:02         ` Cédric Le Goater
2020-06-20 22:58 ` [PATCH v4 7/8] hw/misc/pca9552: Trace GPIO change events Philippe Mathieu-Daudé
2020-06-22  7:01   ` Cédric Le Goater
2020-06-22  9:52     ` Philippe Mathieu-Daudé
2020-06-20 22:58 ` [PATCH v4 8/8] hw/misc/pca9552: Model qdev output GPIOs Philippe Mathieu-Daudé
2020-06-22  7:02   ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.