summary refs log tree commit diff stats
path: root/hw/display/pl110.c
diff options
context:
space:
mode:
authorHao Wu <wuhaotsh@google.com>2021-03-11 10:08:52 -0800
committerPeter Maydell <peter.maydell@linaro.org>2021-03-12 12:48:56 +0000
commit380a37e49891f8d9462124f593516a9ced58343a (patch)
tree1c84cd2ebbbd97b42c713a58935724a7cf4170ce /hw/display/pl110.c
parent71b50b9d1ca2f5e8ae65678294ceacbd7b6520c8 (diff)
downloadfocaccia-qemu-380a37e49891f8d9462124f593516a9ced58343a.tar.gz
focaccia-qemu-380a37e49891f8d9462124f593516a9ced58343a.zip
hw/misc: Add NPCM7XX MFT Module
This patch implements Multi Function Timer (MFT) module for NPCM7XX.
This module is mainly used to configure PWM fans. It has just enough
functionality to make the PWM fan kernel module work.

The module takes two input, the max_rpm of a fan (modifiable via QMP)
and duty cycle (a GPIO from the PWM module.) The actual measured RPM
is equal to max_rpm * duty_cycle / NPCM7XX_PWM_MAX_DUTY. The RPM is
measured as a counter compared to a prescaled input clock. The kernel
driver reads this counter and report to user space.

Refs:
https://github.com/torvalds/linux/blob/master/drivers/hwmon/npcm750-pwm-fan.c

Reviewed-by: Doug Evans <dje@google.com>
Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
Signed-off-by: Hao Wu <wuhaotsh@google.com>
Message-id: 20210311180855.149764-3-wuhaotsh@google.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/pl110.c')
0 files changed, 0 insertions, 0 deletions