[PATCH 3/4] hw/arm: Connect PWM fans in NPCM7XX boards

2021-03-05 Thread Hao Wu via
This patch adds fan_splitters (split IRQs) in NPCM7XX boards. Each fan splitter corresponds to 1 PWM output and can connect to multiple fan inputs (MFT devices). In NPCM7XX boards(NPCM750 EVB and Quanta GSJ boards), we initializes these splitters and connect them to their corresponding modules

[PATCH 4/4] tests/qtest: Test PWM fan RPM using MFT in PWM test

2021-03-05 Thread Hao Wu via
This patch adds testing of PWM fan RPMs in the existing npcm7xx pwm test. It tests whether the MFT module can measure correct fan values for a PWM fan in NPCM7XX boards. Reviewed-by: Doug Evans Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- tests/qtest/npcm7xx_pwm-test.c | 205

[PATCH 1/4] hw/misc: Add GPIOs for duty in NPCM7xx PWM

2021-03-05 Thread Hao Wu via
This patch adds GPIOs in NPCM7xx PWM module for its duty values. The purpose of this is to connect it to the MFT module to provide an input for measuring a PWM fan's RPM. Each PWM module has NPCM7XX_PWM_PER_MODULE of GPIOs, each one corresponds to one PWM instance and can connect to multiple fan

[PATCH 2/4] hw/misc: Add NPCM7XX MFT Module

2021-03-05 Thread Hao Wu via
This patch adds Multi Function Timer (MFT) module for NPCM7XX Soc. 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

[PATCH 0/4] hw/misc: Add NPCM7XX Tachometer Device

2021-03-05 Thread Hao Wu via
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

[PATCH v3 3/5] hw/arm: Add I2C sensors and EEPROM for GSJ machine

2021-02-10 Thread Hao Wu via
Add AT24 EEPROM and temperature sensors for GSJ machine. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index be017b997a..4e6f4ffe90 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -370,6 +370,7 @@ config NPCM7XX bool

[PATCH v3 5/5] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-02-10 Thread Hao Wu via
This patch implements the FIFO mode of the SMBus module. In FIFO, the user transmits or receives at most 16 bytes at a time. The FIFO mode allows the module to transmit large amount of data faster than single byte mode. Since we only added the device in a patch that is only a few commits away in

[PATCH v3 4/5] hw/i2c: Add a QTest for NPCM7XX SMBus Device

2021-02-10 Thread Hao Wu via
This patch adds a QTest for NPCM7XX SMBus's single byte mode. It sends a byte to a device in the evaluation board, and verify the retrieved value is equivalent to the sent value. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell diff --git

[PATCH v3 1/5] hw/i2c: Implement NPCM7XX SMBus Module Single Mode

2021-02-10 Thread Hao Wu via
This commit implements the single-byte mode of the SMBus. Each Nuvoton SoC has 16 System Management Bus (SMBus). These buses compliant with SMBus and I2C protocol. This patch implements the single-byte mode of the SMBus. In this mode, the user sends or receives a byte each time. The SMBus device

[PATCH v3 2/5] hw/arm: Add I2C sensors for NPCM750 eval board

2021-02-10 Thread Hao Wu via
Add I2C temperature sensors for NPCM750 eval board. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 3fdd5cab01..47a215bd01 100644 --- a/hw/arm/npcm7xx_boards.c +++

[PATCH v3 0/5] hw/i2c: Add NPCM7XX SMBus Device

2021-02-10 Thread Hao Wu via
This patch set implements the System manager bus (SMBus) module in NPCM7XX SoC. Basically, it emulates the data transactions of the module, not the SDA/SCL levels. We have also added a QTest which contains read and write operations for both single-byte and FIFO mode, and added basic I2C devices

Re: [PATCH] qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

2021-01-15 Thread Hao Wu via
On Fri, Jan 15, 2021 at 9:17 AM Havard Skinnemoen wrote: > +Hao Wu > > On Fri, Jan 15, 2021 at 1:15 AM Philippe Mathieu-Daudé > wrote: > > > > On 1/15/21 8:56 AM, Gan Qixin wrote: > > > The pwm_qom_get function didn't free "response", which caused an > indirect > > > memory leak. So use

Re: [PATCHv4 1/2] hw: gpio: implement gpio-pwr driver for qemu reset/poweroff

2021-01-12 Thread Hao Wu via
On Tue, Jan 12, 2021 at 6:36 AM Maxim Uvarov wrote: > Implement gpio-pwr driver to allow reboot and poweroff machine. > This is simple driver with just 2 gpios lines. Current use case > is to reboot and poweroff virt machine in secure mode. Secure > pl066 gpio chip is needed for that. > >

[PATCH v5 4/6] hw/misc: Add a PWM module for NPCM7XX

2021-01-08 Thread Hao Wu via
The PWM module is part of NPCM7XX module. Each NPCM7XX module has two identical PWM modules. Each module contains 4 PWM entries. Each PWM has two outputs: frequency and duty_cycle. Both are computed using inputs from software side. This module does not model detail pulse signals since it is

[PATCH v5 5/6] hw/misc: Add QTest for NPCM7XX PWM Module

2021-01-08 Thread Hao Wu via
We add a qtest for the PWM in the previous patch. It proves it works as expected. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- tests/qtest/meson.build| 1 + tests/qtest/npcm7xx_pwm-test.c | 490

[PATCH v5 6/6] hw/*: Use type casting for SysBusDevice in NPCM7XX

2021-01-08 Thread Hao Wu via
A device shouldn't access its parent object which is QOM internal. Instead it should use type cast for this purporse. This patch fixes this issue for all NPCM7XX Devices. Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 2 +- hw/mem/npcm7xx_mc.c | 2 +-

[PATCH v5 3/6] hw/adc: Add an ADC module for NPCM7XX

2021-01-08 Thread Hao Wu via
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Users can alter input value by using qom-set QMP command. Reviewed-by: Havard Skinnemoen

[PATCH v5 1/6] hw/misc: Add clock converter in NPCM7XX CLK module

2021-01-08 Thread Hao Wu via
This patch allows NPCM7XX CLK module to compute clocks that are used by other NPCM7XX modules. Add a new struct NPCM7xxClockConverterState which represents a single converter. Each clock converter in CLK module represents one converter in NPCM7XX CLK Module(PLL, SEL or Divider). Each converter

[PATCH v5 2/6] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2021-01-08 Thread Hao Wu via
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic number TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 5 hw/timer/npcm7xx_timer.c | 39

[PATCH v5 0/6] Additional NPCM7xx devices

2021-01-08 Thread Hao Wu via
This patch series include a few more NPCM7XX devices including - Analog Digital Converter (ADC) - Pulse Width Modulation (PWM) We also modified the CLK module to generate clock values using qdev_clock. These clocks are used to determine various clocks in NPCM7XX devices. Thank you for your

Re: [PATCH v3 3/6] target/arm: make ARMCPU.ctr 64-bit

2021-01-08 Thread Hao Wu via
On Fri, Jan 8, 2021 at 10:54 AM Leif Lindholm wrote: > When FEAT_MTE is implemented, the AArch64 view of CTR_EL0 adds the > TminLine field in bits [37:32]. > Extend the ctr field to be able to hold this context. > > Signed-off-by: Leif Lindholm > Reviewed-by: Hao Wu > --- > target/arm/cpu.h

Re: [PATCH v4 3/6] hw/adc: Add an ADC module for NPCM7XX

2021-01-07 Thread Hao Wu via
Thanks for your review. We'll apply your suggestions. On Thu, Jan 7, 2021 at 1:07 PM Peter Maydell wrote: > On Thu, 17 Dec 2020 at 00:45, Hao Wu wrote: > > > > The ADC is part of NPCM7XX Module. Its behavior is controled by the > > ADC_CON register. It converts one of the eight analog inputs

Re: [PATCH v4 2/6] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2021-01-07 Thread Hao Wu via
On Thu, Jan 7, 2021 at 12:51 PM Peter Maydell wrote: > On Thu, 17 Dec 2020 at 00:45, Hao Wu wrote: > > > > This patch makes NPCM7XX Timer to use a the timer clock generated by the > > CLK module instead of the magic number TIMER_REF_HZ. > > > > Reviewed-by: Havard Skinnemoen > > Reviewed-by:

Re: [PATCH v4 0/6] Additional NPCM7xx devices

2021-01-05 Thread Hao Wu via
Ping? On Wed, Dec 16, 2020 at 4:45 PM Hao Wu wrote: > This patch series include a few more NPCM7XX devices including > > - Analog Digital Converter (ADC) > - Pulse Width Modulation (PWM) > > We also modified the CLK module to generate clock values using qdev_clock. > These clocks are used to

[PATCH v4 2/6] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2020-12-16 Thread Hao Wu via
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic number TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 5 + hw/timer/npcm7xx_timer.c | 25

[PATCH v4 5/6] hw/misc: Add QTest for NPCM7XX PWM Module

2020-12-16 Thread Hao Wu via
We add a qtest for the PWM in the previous patch. It proves it works as expected. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- tests/qtest/meson.build| 1 + tests/qtest/npcm7xx_pwm-test.c | 490 + 2 files changed,

[PATCH v4 1/6] hw/misc: Add clock converter in NPCM7XX CLK module

2020-12-16 Thread Hao Wu via
This patch allows NPCM7XX CLK module to compute clocks that are used by other NPCM7XX modules. Add a new struct NPCM7xxClockConverterState which represents a single converter. Each clock converter in CLK module represents one converter in NPCM7XX CLK Module(PLL, SEL or Divider). Each converter

[PATCH v4 6/6] hw/*: Use type casting for SysBusDevice in NPCM7XX

2020-12-16 Thread Hao Wu via
A device shouldn't access its parent object which is QOM internal. Instead it should use type cast for this purporse. This patch fixes this issue for all NPCM7XX Devices. Signed-off-by: Hao Wu --- hw/arm/npcm7xx_boards.c | 2 +- hw/mem/npcm7xx_mc.c | 2 +- hw/misc/npcm7xx_clk.c | 2 +-

[PATCH v4 4/6] hw/misc: Add a PWM module for NPCM7XX

2020-12-16 Thread Hao Wu via
The PWM module is part of NPCM7XX module. Each NPCM7XX module has two identical PWM modules. Each module contains 4 PWM entries. Each PWM has two outputs: frequency and duty_cycle. Both are computed using inputs from software side. This module does not model detail pulse signals since it is

[PATCH v4 3/6] hw/adc: Add an ADC module for NPCM7XX

2020-12-16 Thread Hao Wu via
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Users can alter input value by using qom-set QMP command. Reviewed-by: Havard Skinnemoen

[PATCH v4 0/6] Additional NPCM7xx devices

2020-12-16 Thread Hao Wu via
This patch series include a few more NPCM7XX devices including - Analog Digital Converter (ADC) - Pulse Width Modulation (PWM) We also modified the CLK module to generate clock values using qdev_clock. These clocks are used to determine various clocks in NPCM7XX devices. Thank you for your

Re: [PATCH v3 4/5] hw/misc: Add a PWM module for NPCM7XX

2020-12-16 Thread Hao Wu via
Thanks for the review. We can add a patch in this patchset to fix this issue. On Wed, Dec 16, 2020 at 11:02 AM Peter Maydell wrote: > On Tue, 15 Dec 2020 at 00:13, Hao Wu wrote: > > > > The PWM module is part of NPCM7XX module. Each NPCM7XX module has two > > identical PWM modules. Each module

Re: [PATCH v3 0/5] Additional NPCM7xx devices

2020-12-15 Thread Hao Wu via
Thanks for the tip! I'll use that in the future. Best, Hao On Tue, Dec 15, 2020 at 7:17 AM Philippe Mathieu-Daudé wrote: > On 12/15/20 1:13 AM, Hao Wu via wrote: > > This patch series include a few more NPCM7XX devices including > > > > - Analog Digital Converter (A

Re: [PATCH v3 2/5] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > This patch makes NPCM7XX Timer to use a the timer clock generated by the > CLK module instead of the magic number TIMER_REF_HZ. > > Reviewed-by: Havard Skinnemoen > Reviewed-by: Tyrone Ting > Signed-off-by: Hao Wu > --- > hw/arm/npcm7xx.c

Re: [PATCH v3 3/5] hw/adc: Add an ADC module for NPCM7XX

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > The ADC is part of NPCM7XX Module. Its behavior is controled by the > ADC_CON register. It converts one of the eight analog inputs into a > digital input and stores it in the ADC_DATA register when enabled. > > Users can alter input value by using

Re: [PATCH v3 5/5] hw/misc: Add QTest for NPCM7XX PWM Module

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > We add a qtest for the PWM in the previous patch. It proves it works as > expected. > > Reviewed-by: Havard Skinnemoen > Reviewed-by: Tyrone Ting > Signed-off-by: Hao Wu > --- > tests/qtest/meson.build| 1 + >

Re: [PATCH v3 0/5] Additional NPCM7xx devices

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > This patch series include a few more NPCM7XX devices including > > - Analog Digital Converter (ADC) > - Pulse Width Modulation (PWM) > > We also modified the CLK module to generate clock values using qdev_clock. > These clocks are used to determine

Re: [PATCH v3 4/5] hw/misc: Add a PWM module for NPCM7XX

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > The PWM module is part of NPCM7XX module. Each NPCM7XX module has two > identical PWM modules. Each module contains 4 PWM entries. Each PWM has > two outputs: frequency and duty_cycle. Both are computed using inputs > from software side. > > This

[PATCH v3 3/5] hw/adc: Add an ADC module for NPCM7XX

2020-12-14 Thread Hao Wu via
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Users can alter input value by using qom-set QMP command. Reviewed-by: Havard Skinnemoen

Re: [PATCH v3 1/5] hw/misc: Add clock converter in NPCM7XX CLK module

2020-12-14 Thread Hao Wu via
On Mon, Dec 14, 2020 at 4:13 PM Hao Wu wrote: > This patch allows NPCM7XX CLK module to compute clocks that are used by > other NPCM7XX modules. > > Add a new struct NPCM7xxClockConverterState which represents a > single converter. Each clock converter in CLK module represents one > converter

[PATCH v3 4/5] hw/misc: Add a PWM module for NPCM7XX

2020-12-14 Thread Hao Wu via
The PWM module is part of NPCM7XX module. Each NPCM7XX module has two identical PWM modules. Each module contains 4 PWM entries. Each PWM has two outputs: frequency and duty_cycle. Both are computed using inputs from software side. This module does not model detail pulse signals since it is

[PATCH v3 2/5] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2020-12-14 Thread Hao Wu via
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic number TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 5 + hw/timer/npcm7xx_timer.c | 23

[PATCH v3 5/5] hw/misc: Add QTest for NPCM7XX PWM Module

2020-12-14 Thread Hao Wu via
We add a qtest for the PWM in the previous patch. It proves it works as expected. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- tests/qtest/meson.build| 1 + tests/qtest/npcm7xx_pwm-test.c | 490 + 2 files changed,

[PATCH v3 1/5] hw/misc: Add clock converter in NPCM7XX CLK module

2020-12-14 Thread Hao Wu via
This patch allows NPCM7XX CLK module to compute clocks that are used by other NPCM7XX modules. Add a new struct NPCM7xxClockConverterState which represents a single converter. Each clock converter in CLK module represents one converter in NPCM7XX CLK Module(PLL, SEL or Divider). Each converter

[PATCH v3 0/5] Additional NPCM7xx devices

2020-12-14 Thread Hao Wu via
This patch series include a few more NPCM7XX devices including - Analog Digital Converter (ADC) - Pulse Width Modulation (PWM) We also modified the CLK module to generate clock values using qdev_clock. These clocks are used to determine various clocks in NPCM7XX devices. Thank you for your

Re: [PATCH v2 3/4] hw/adc: Add an ADC module for NPCM7XX

2020-12-14 Thread Hao Wu via
, Dec 13, 2020 at 3:47 AM Philippe Mathieu-Daudé wrote: > On 12/11/20 11:22 PM, Hao Wu via wrote: > > The ADC is part of NPCM7XX Module. Its behavior is controled by the > > ADC_CON register. It converts one of the eight analog inputs into a > > digital input and stores it in

Re: [PATCH 0/7] Additional NPCM7xx devices and IPMI BMC emulation support

2020-12-11 Thread Hao Wu via
Thanks for the comments! I've removed IPMI part from the patch sets. I'll send a separate patch sets once the refactor is done. I'll also include Havard's documentation in it. I haven't thought of a better name. We can update the name accordingly. On Fri, Dec 11, 2020 at 4:26 PM Havard

[PATCH v2 3/4] hw/adc: Add an ADC module for NPCM7XX

2020-12-11 Thread Hao Wu via
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu ---

[PATCH v2 1/4] hw/misc: Add clock converter in NPCM7XX CLK module

2020-12-11 Thread Hao Wu via
This patch allows NPCM7XX CLK module to compute clocks that are used by other NPCM7XX modules. Add a new struct NPCM7xxClockConverterState which represents a single converter. Each clock converter in CLK module represents one converter in NPCM7XX CLK Module(PLL, SEL or Divider). Each converter

[PATCH v2 2/4] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2020-12-11 Thread Hao Wu via
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic nubmer TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 5 + hw/timer/npcm7xx_timer.c | 25

[PATCH v2 4/4] hw/misc: Add a PWM module for NPCM7XX

2020-12-11 Thread Hao Wu via
The PWM module is part of NPCM7XX module. Each NPCM7XX module has two identical PWM modules. Each module contains 4 PWM entries. Each PWM has two outputs: frequency and duty_cycle. Both are computed using inputs from software side. This module does not model detail pulse signals since it is

[PATCH v2 0/4] Additional NPCM7xx devices

2020-12-11 Thread Hao Wu via
This patch series include a few more NPCM7XX devices including - Analog Digital Converter (ADC) - Pulse Width Modulation (PWM) We also modified the CLK module to generate clock values using qdev_clock. These clocks are used to determine various clocks in NPCM7XX devices. Thank you for your

Re: [PATCH 0/7] Additional NPCM7xx devices and IPMI BMC emulation support

2020-12-11 Thread Hao Wu via
Tl,dr: We'll remove the IPMI changes from the current patch set and refactor them in a separate patch set. Thank you for your review! On high level, we are trying to emulate the BMC side of the IPMI protocol. So we cannot directly use the existing IPMI code. However, they do have a lot

[PATCH 7/7] hw/ipmi: Add an IPMI external host device

2020-12-10 Thread Hao Wu via
The IPMI external host device works for Baseband Management Controller (BMC) emulations. It works as a representation of a host class that connects to a given BMC. It can connect to a real host hardware or a emulated or simulated host device. In particular it can connect to a host QEMU instance

[PATCH 6/7] hw/ipmi: Add a KCS Module for NPCM7XX

2020-12-10 Thread Hao Wu via
Add a KCS module for NPCM7xx SoC. This module implements the IPMI responder interface and is responsible to communicate with an external host via the KCS channels in an NPCM7xx SoC. Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- docs/system/arm/nuvoton.rst | 2 +- hw/arm/npcm7xx.c

[PATCH 5/7] hw/ipmi: Add an IPMI host interface

2020-12-10 Thread Hao Wu via
The IPMI host interface is used to emulate IPMI related devices on a System-on-Chip (SoC) used for Baseband Management Controller (BMC). This interface consists of two components: IPMI host and IPMI responder. An IPMI responder is a device to intercept reads and writes to the system interface

[PATCH 3/7] hw/adc: Add an ADC module for NPCM7XX

2020-12-10 Thread Hao Wu via
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu ---

[PATCH 2/7] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2020-12-10 Thread Hao Wu via
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic nubmer TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 5 + hw/timer/npcm7xx_timer.c | 25

[PATCH 1/7] hw/misc: Add clock converter in NPCM7XX CLK module

2020-12-10 Thread Hao Wu via
This patch allows NPCM7XX CLK module to compute clocks that are used by other NPCM7XX modules. Add a new struct NPCM7xxClockConverterState which represents a single converter. Each clock converter in CLK module represents one converter in NPCM7XX CLK Module(PLL, SEL or Divider). Each converter

[PATCH 4/7] hw/misc: Add a PWM module for NPCM7XX

2020-12-10 Thread Hao Wu via
The PWM module is part of NPCM7XX module. Each NPCM7XX module has two identical PWM modules. Each module contains 4 PWM entries. Each PWM has two outputs: frequency and duty_cycle. Both are computed using inputs from software side. This module does not model detail pulse signals since it is

[PATCH 0/7] Additional NPCM7xx devices and IPMI BMC emulation support

2020-12-10 Thread Hao Wu via
This patch series include a few more NPCM7XX devices including - Analog Digital Converter (ADC) - Pulse Width Modulation (PWM) - Keyboard Style Controller (KSC) To utilize these modules we also add two extra functionalities: 1. We modified the CLK module to generate clock values using