qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GPIO emulation in QEMU RISCV


From: Daniel Henrique Barboza
Subject: Re: GPIO emulation in QEMU RISCV
Date: Tue, 19 Sep 2023 18:41:08 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0



On 9/19/23 10:23, Sivachandran S wrote:
Hi Daniel,

We are working to generate device interrupts via GPIO.But the problem here is 
by default the QEMU doesn't have any GPIO device emulated. (QEMU 8.0.0)

1. How to emulate the VIRT GPIO device or any other GPIO device in QEMU? The 
device models listed in QEMU don't have any of the GPIO devices listed. Any 
idea how to enable any of the GPIO device emulation in QEMU RISCV?

The Si-Five boards (sifive_e.c, sifive_u.c) uses the Si-Five GPIO device. In
sifive_u.c the device is create here:


static void sifive_u_soc_instance_init(Object *obj)
{
(...)
    object_initialize_child(obj, "gpio", &s->gpio, TYPE_SIFIVE_GPIO);
}


The device itself is implemented in hw/gpio/sifive_gpio.c. In this file it 
mentions
that the Si-Five GPIO device was based on another GPIO device implemented in
hw/gpio/nrf51_gpio.c, which in turn is based on this reference manual:

http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf



Thanks,

Daniel



2. Also whether a software patch is required for the QEMU to enable it? If so, 
please point to it.

Thanks,
SIva.S



reply via email to

[Prev in Thread] Current Thread [Next in Thread]