[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi
From: |
Peter Maydell |
Subject: |
Re: Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi (BCM2835 Peripherals) |
Date: |
Tue, 27 Jun 2023 13:18:06 +0100 |
On Wed, 21 Jun 2023 at 06:01, Shivam <shivamvijay543@gmail.com> wrote:
> I hope this email finds you well. I am reaching out to seek guidance and
> assistance regarding a project I am working on involving the addition of I2C
> support in QEMU for the Raspberry Pi, specifically targeting the BCM2835
> peripherals.
Hi! Thanks for having a look at implementing this.
> I have been studying the BCM2835 datasheet to familiarize myself with the I2C
> device registers and their functionalities. Currently, I have started
> implementing the i2c controller for bcm2835, but now couldn't able to get the
> feel that how should I integrate it with the BCM2835
> Soc.(bcm2835_peripheral.c)
You should be able to follow the same pattern as with
other devices that are in that SoC, like the 'aux'
or 'rng' devices:
* your source file is integrated into the build/kconfig
system, and implements the new device
* you have a header file that defines things like the
type macros and struct
* you modify the bcm2835_peripherals.c file to
initialize, realize and wire up the new device,
similarly to how it handles the other devices it has
You'll want to do this all on a git branch, so you can
split it up into different patches (eg "create new
device"; "add new device to the SoC"). When you get
to a state where you'd like us to take a look at it,
that will be more convenient for us if you send it as a
series of patches, rather than attaching individual source
files to an email.
(We have some notes about patch submission here
https://www.qemu.org/docs/master/devel/submitting-a-patch.html
if you haven't found that page already).
thanks
-- PMM