FDT based DesignWare I3C driver for the generic platform
Anup Patel
apatel at ventanamicro.com
Wed Jun 22 04:51:52 PDT 2022
On Wed, Jun 22, 2022 at 3:07 PM Adnan Chowdhury
<adnan.chowdhury at sifive.com> wrote:
>
> Hello Team,
>
> This is my first email to the list so please accept my apology if I'm
> not clear about anything.
No need to be apologetic for asking questions.
>
> I've been working for an announced SoC. This piece of hardware comes
> with a DesignWare I3C block. We'll be using OpenSBI in our software
> stack for the SoC. The plan is to use OpenSBI's generic platform for
> the project. I've written an FDT based I3C driver so that the
That's really nice.
I assume you need i3c for system reset or something else ?
> DesignWare I3C can be used. I've implemented it in two parts:
>
> - fdt_i3c.c/h: A generic FDT I3C module that parses the FDT for the
> presence of I3C controllers.
> - dwc_i3c.c/h: This module has all the necessary functions that can be
> used in our project (namely I2C private read/write), and is expandable
> for adding more functionalities in the future. It uses fdt_i3c.c/h.
I think the i3c support can be similar to the OpenSBI i2c support:
1) Simple i3c bus library (manage and find i3c buses)
lib/utils/i3c/i3c.c
include/sbi_utils/i3c/i3c.h
2) FDT based i3c bus (find and initialize i3c buses from FDT)
lib/utils/i3c/fdt_i3c.c
include/sbi_utils/i3c/fdt_i3c.h
The i3c bus instance is analogous to the i2c adapter instance but the
major difference between i2c and i3c will be the APIs or operations
supported for devices.
Also, for every i3c bus instance the i3c.c will also register a corresponding
i2c adapter instance so that various i2c devices can be accessed via i3c
bus instance.
The i3c.c/h and fdt_i3c.c/h should only add APIs or functions which are
needed to keep the i3c support simple and minimalistic.
>
> I need your feedback on whether it's a good idea to add these modules
> to OpenSBI. If you think it's appropriate then I will send out the
> patches. If you think it should be implemented differently, please
> suggest that too.
Sure, please send your patches to this list (using git send-email).
>
> Thank you for your time and any valuable feedback on this.
>
> Best Regards,
> Adnan Rahman Chowdhury
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
Regards,
Anup
More information about the opensbi
mailing list