Page MenuHomeFreeBSD

Add iMX8MQ support
ClosedPublic

Authored by gonzo on Jun 14 2020, 11:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 26 2024, 5:07 PM
Unknown Object (File)
Feb 9 2024, 7:14 AM
Unknown Object (File)
Jan 31 2024, 11:34 AM
Unknown Object (File)
Jan 31 2024, 11:34 AM
Unknown Object (File)
Jan 31 2024, 11:34 AM
Unknown Object (File)
Jan 31 2024, 11:34 AM
Unknown Object (File)
Jan 30 2024, 4:10 AM
Unknown Object (File)
Jan 21 2024, 7:00 AM

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

sys/arm/freescale/imx/imx_wdog.c
170 ↗(On Diff #73120)

I guess this could be commited separatly.

sys/arm64/conf/GENERIC
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.

sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.c
151 ↗(On Diff #73120)

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

sys/arm64/freescale/imx/imx7gpc.c
5 ↗(On Diff #73120)

Do you want the "all rights reserved" mention ?

9 ↗(On Diff #73120)

Where does that comes from ?

sys/arm64/freescale/imx/imx8mq_ccm.c
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 ?

sys/arm64/freescale/imx/imx_ccm_clk.h
5 ↗(On Diff #73120)

Same comment as above for this mention.

sys/modules/dtb/imx8/Makefile
2 ↗(On Diff #73120)

s/imx6/imx8/

gonzo added inline comments.
sys/arm64/conf/GENERIC
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: https://www.nxp.com/docs/en/supporting-information/IMX8LAYERCMPR.pdf

sys/arm64/freescale/imx/imx7gpc.c
9 ↗(On Diff #73120)

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

sys/arm64/freescale/imx/imx8mq_ccm.c
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.