Skip to content

IMX I2C driver#662

Open
omeh-a wants to merge 12 commits into
mainfrom
i2c_imx_driver
Open

IMX I2C driver#662
omeh-a wants to merge 12 commits into
mainfrom
i2c_imx_driver

Conversation

@omeh-a

@omeh-a omeh-a commented Mar 6, 2026

Copy link
Copy Markdown
Member

This PR adds support for the I2C core of almost IMX8M boards. This was only tested on the IMX8MQ on the Maaxboard for now however, but theoretically this should work for all other IMX8MQ and IMX8Mmini boards.

On the Maaxboard, there is an odd quirk. Using any bus other than I2C1 (PMIC bus) causes the driver to silently hang. Consulting with @midnightveil and @Ivan-Velickovic leads me to believe that this is probably due to the other I2C buses being clock gated at boot.

This PR is a draft that we are rushing for a deliverable. We need to do the following things before merging:

  • Add CI for build and test with bus scan example
  • (optional) add CI for the full I2C tester with the PN532/DS3231
  • Linting

@omeh-a
omeh-a marked this pull request as draft March 6, 2026 04:19
Comment thread drivers/i2c/imx/i2c_driver.mk Outdated
${CC} ${CFLAGS} -c -o $@ $<

i2c/i2c_common.o: CFLAGS+=-I${I2C_DRIVER_DIR}
i2c/i2c_common.o: ${I2C_DRIVER_DIR}/../i2c_common.c |i2c $(SDDF_LIBC_INCLUDE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a bit weird with the relative paths

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other i2c drivers are identical, so I will leave this as is. If we want to change it, worth an issue to do this to all of them.

Comment thread drivers/i2c/imx/driver.h Outdated
Comment thread drivers/i2c/imx/i2c.c
Comment thread drivers/i2c/imx/i2c.c Outdated
Comment thread drivers/i2c/imx/i2c.c
omeh-a added 2 commits July 3, 2026 09:20
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>

Timer tests out with acacia

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>

Serial tests out with Acacia

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>

Refactor: acacia_sddf is now a python module that inherits all subfiles, sDDF itself is a python module for import! Needed for SDK

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>

Fix issues with i2c.py - maps were swapped.

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>

Further fixes to keep up with Acacia PR request changes

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
@omeh-a
omeh-a force-pushed the i2c_imx_driver branch 4 times, most recently from 6f4207a to 51905a9 Compare July 3, 2026 00:09
@omeh-a
omeh-a marked this pull request as ready for review July 3, 2026 00:10
@omeh-a

omeh-a commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

This is now ready for review, albeit is unmergable until we have put Acacia into the tree under this.

@omeh-a

omeh-a commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Completely unclear to me as to why the license check was failing on i2c_driver.mk before?? It has a comment. Just making a new commit to make it check again fixed it (alongside deleting the redundant, copyright-less config.json)

@omeh-a

omeh-a commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

CI tests currently borked due to not installing Acacia. I will add this in the sdfgenpy branch this branch is sitting on top of. But: there is a CI test that will work if you run it locally with Acacia installed.

@omeh-a

omeh-a commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

I need to fix coauthored-by for the initial driver commit

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
omeh-a added 7 commits July 13, 2026 09:39
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
…o disabled in dtb

Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants