All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device
@ 2021-03-05 18:38 Hao Wu via
  2021-03-05 18:38 ` [PATCH 1/4] hw/misc: Add GPIOs for duty in NPCM7xx PWM Hao Wu via
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Hao Wu via @ 2021-03-05 18:38 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, Avi.Fishman, kfting, wuhaotsh, hskinnemoen,
	venture, dje

This patch set implements the Tachometer (a.k.a Multi Functional Timer/MFT)
device in NPCM7XX SoC. This device is used by NPCM7XX boards to measure
the RPM of PWM fans.

To provide the RPM of a certain fan, since RPM = MAX_RPM * duty_percentage.
We convert the duty output in NPCM7XX PWM module into GPIOs and feed them
into the MFT module.

The connection of PWM modules and fan modules are derived from their specific
Linux device trees and coded in hw/arm/npcm7xx_boards.c.

We amend the QTest for the PWM module to include verifying the reading from
the Tachometer is correct.

Hao Wu (4):
  hw/misc: Add GPIOs for duty in NPCM7xx PWM
  hw/misc: Add NPCM7XX MFT Module
  hw/arm: Connect PWM fans in NPCM7XX boards
  tests/qtest: Test PWM fan RPM using MFT in PWM test

 docs/system/arm/nuvoton.rst    |   2 +-
 hw/arm/npcm7xx.c               |  45 ++-
 hw/arm/npcm7xx_boards.c        |  99 ++++++
 hw/misc/meson.build            |   1 +
 hw/misc/npcm7xx_mft.c          | 541 +++++++++++++++++++++++++++++++++
 hw/misc/npcm7xx_pwm.c          |   4 +
 hw/misc/trace-events           |   8 +
 include/hw/arm/npcm7xx.h       |  13 +-
 include/hw/misc/npcm7xx_mft.h  |  70 +++++
 include/hw/misc/npcm7xx_pwm.h  |   4 +-
 tests/qtest/npcm7xx_pwm-test.c | 205 ++++++++++++-
 11 files changed, 975 insertions(+), 17 deletions(-)
 create mode 100644 hw/misc/npcm7xx_mft.c
 create mode 100644 include/hw/misc/npcm7xx_mft.h

-- 
2.30.1.766.gb4fecdf3b7-goog



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

end of thread, other threads:[~2021-03-11 12:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 18:38 [PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device Hao Wu via
2021-03-05 18:38 ` [PATCH 1/4] hw/misc: Add GPIOs for duty in NPCM7xx PWM Hao Wu via
2021-03-11 12:05   ` Peter Maydell
2021-03-05 18:38 ` [PATCH 2/4] hw/misc: Add NPCM7XX MFT Module Hao Wu via
2021-03-11 12:07   ` Peter Maydell
2021-03-05 18:38 ` [PATCH 3/4] hw/arm: Connect PWM fans in NPCM7XX boards Hao Wu via
2021-03-11 12:08   ` Peter Maydell
2021-03-05 18:38 ` [PATCH 4/4] tests/qtest: Test PWM fan RPM using MFT in PWM test Hao Wu via
2021-03-11 12:09   ` Peter Maydell
2021-03-05 19:00 ` [PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device no-reply

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.