Page MenuHomeFreeBSD

Add iMX8MQ support

Authored by gonzo on Jun 14 2020, 11:40 PM.



This patch adds basic support for for iMX8:

  • CCM driver and clocks implementations for iMX8
  • GPC driver for iMX8
  • clock tree for iMX8MQ
  • clocks support and new compat strings (if required) for existing iMX6 UART, I2C, and GPIO drivers
  • Enables aarch64-compatible drivers form iMX6 to arm64 GENERIC kernel config
  • dtb/imx8 kernel module with DTBs for Nitrogen8M and iMX8MQ EVK
Test Plan

This patch was tested only for basic functionality:

  • Booted on Nitrogen8M board with NFS root
  • Booted on iMX8MQ EVK board with NFS root
  • watchdog tested with watchdogd -t 33 -e /usr/bin/false --debug
  • I2C tested by scanning the bus and checking that there is device
  • GPIO wasn't tested

Also verified that both GENERIC and IMX6 kernel configs still build
and boot with this patch applied.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Added a few nits but otherwise it's looks great, thanks for working on this !

170 ↗(On Diff #73120)

I guess this could be commited separatly.

116 ↗(On Diff #73120)

How different are the IMX8 SoCs ?
Maybe we just need SOC_FREESCALE_IMX8 as I guess all the drivers are more or less the same and only a few clocks/device will be present or not.

151 ↗(On Diff #73120)

This can be move above the divr1 = ... line I suppose.

5 ↗(On Diff #73120)

Do you want the "all rights reserved" mention ?

9 ↗(On Diff #73120)

Where does that comes from ?

56 ↗(On Diff #73120)

It's unfortunately GPLv2 licenced ...
What we did for rockchip is that we redefined those value.
I agree that this file cannot be licenced as it's just name/id representation but ...

61 ↗(On Diff #73120)

Does the dummy clocks represent some unimplemented clocks or is it needed because the parent idx is 2 bits ?

5 ↗(On Diff #73120)

Same comment as above for this mention.

2 ↗(On Diff #73120)


gonzo added inline comments.
116 ↗(On Diff #73120)

Yes, looks like the difference is mostly in set of blocks in the SoC, but overall they're conceptually the same:

9 ↗(On Diff #73120)

I started by using arm/freescale/imx/imx_gpt.c but ended up completely rewriting it, so will remove it.

61 ↗(On Diff #73120)

The latter I think. There is dummy clock id in the header file: IMX8MQ_CLK_DUMMY

gonzo marked 3 inline comments as done.

Address manu@ comments

This revision is now accepted and ready to land.Jun 16 2020, 7:43 PM
This revision was automatically updated to reflect the committed changes.