From 326ccfe240ca9ef4f659a241b39390fa956e999b Mon Sep 17 00:00:00 2001 From: Havard Skinnemoen Date: Fri, 23 Oct 2020 14:06:35 -0700 Subject: hw/misc: Add npcm7xx random number generator The RNG module returns a byte of randomness when the Data Valid bit is set. This implementation ignores the prescaler setting, and loads a new value into RNGD every time RNGCS is read while the RNG is enabled and random data is available. A qtest featuring some simple randomness tests is included. Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Signed-off-by: Havard Skinnemoen Signed-off-by: Peter Maydell --- docs/system/arm/nuvoton.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst index e3e1a3a..4342434 100644 --- a/docs/system/arm/nuvoton.rst +++ b/docs/system/arm/nuvoton.rst @@ -38,6 +38,7 @@ Supported devices * DDR4 memory controller (dummy interface indicating memory training is done) * OTP controllers (no protection features) * Flash Interface Unit (FIU; no protection features) + * Random Number Generator (RNG) Missing devices --------------- @@ -59,7 +60,6 @@ Missing devices * Peripheral SPI controller (PSPI) * Analog to Digital Converter (ADC) * SD/MMC host - * Random Number Generator (RNG) * PECI interface * Pulse Width Modulation (PWM) * Tachometer -- cgit v1.1 From e23e7b12594ec0804c2d9f509f71841c82a62d1c Mon Sep 17 00:00:00 2001 From: Havard Skinnemoen Date: Fri, 23 Oct 2020 14:06:36 -0700 Subject: hw/arm/npcm7xx: Add EHCI and OHCI controllers The NPCM730 and NPCM750 chips have a single USB host port shared between a USB 2.0 EHCI host controller and a USB 1.1 OHCI host controller. This adds support for both of them. Testing notes: * With -device usb-kbd, qemu will automatically insert a full-speed hub, and the keyboard becomes controlled by the OHCI controller. * With -device usb-kbd,bus=usb-bus.0,port=1, the keyboard is directly attached to the port without any hubs, and the device becomes controlled by the EHCI controller since it's high speed capable. * With -device usb-kbd,bus=usb-bus.0,port=1,usb_version=1, the keyboard is directly attached to the port, but it only advertises itself as full-speed capable, so it becomes controlled by the OHCI controller. In all cases, the keyboard device enumerates correctly. Reviewed-by: Tyrone Ting Reviewed-by: Gerd Hoffmann Signed-off-by: Havard Skinnemoen Signed-off-by: Peter Maydell --- docs/system/arm/nuvoton.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst index 4342434..99fc61c 100644 --- a/docs/system/arm/nuvoton.rst +++ b/docs/system/arm/nuvoton.rst @@ -39,6 +39,7 @@ Supported devices * OTP controllers (no protection features) * Flash Interface Unit (FIU; no protection features) * Random Number Generator (RNG) + * USB host (USBH) Missing devices --------------- @@ -54,7 +55,6 @@ Missing devices * eSPI slave interface * Ethernet controllers (GMAC and EMC) - * USB host (USBH) * USB device (USBD) * SMBus controller (SMBF) * Peripheral SPI controller (PSPI) -- cgit v1.1 From 526dbbe087475599589ada4df70a337c09ae0f3f Mon Sep 17 00:00:00 2001 From: Havard Skinnemoen Date: Fri, 23 Oct 2020 14:06:37 -0700 Subject: hw/gpio: Add GPIO model for Nuvoton NPCM7xx The NPCM7xx chips have multiple GPIO controllers that are mostly identical except for some minor differences like the reset values of some registers. Each controller controls up to 32 pins. Each individual pin is modeled as a pair of unnamed GPIOs -- one for emitting the actual pin state, and one for driving the pin externally. Like the nRF51 GPIO controller, a gpio level may be negative, which means the pin is not driven, or floating. Reviewed-by: Tyrone Ting Signed-off-by: Havard Skinnemoen Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/nuvoton.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst index 99fc61c..b00d405 100644 --- a/docs/system/arm/nuvoton.rst +++ b/docs/system/arm/nuvoton.rst @@ -40,11 +40,11 @@ Supported devices * Flash Interface Unit (FIU; no protection features) * Random Number Generator (RNG) * USB host (USBH) + * GPIO controller Missing devices --------------- - * GPIO controller * LPC/eSPI host-to-BMC interface, including * Keyboard and mouse controller interface (KBCI) -- cgit v1.1