On Thu, 3 Aug 2023 at 14:31, Swedha R <swedha...@gmail.com> wrote: > > Hi team, > I have arm64 up and running in Qemu, And I built kernel image, rootfs > everything via buildroot open source I cloned from git. > And I customized via make - menuconfig like enabling gpio support, libgpiod > module and in device drivers gpio chip named pl061 . > After that, I able to see gpiochip in the /dev directory inside arm running > in qemu. > I want to know , how to trigger the gpio line and cache and service it in > this case. > The gpiochip has 7 lines in it. > > This is the qemu-command we used, > qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel Image > -append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device > virtio-net-device,netdev=eth0 -drive > file=rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
The GPIO devices in the virt board are there for specific purposes: there is one in the non-secure world which has an input for the "power off" key, and one in the secure world (if enabled) which has outputs for the firmware to do reset and power-off. You can't use them for other things. (Linux running on the virt board and using the dtb it is provided should automatically be able to handle the power-off key input; UEFI/Trusted Firmware knows about the secure-world GPIO controller already.) thanks -- PMM