[PATCH 0/8] Add imx8mp video support

Miquel Raynal miquel.raynal at bootlin.com
Tue Sep 10 12:13:36 CEST 2024


In order to display a boot picture or an error message, the i.MX8MP
display pipeline must be enabled. The SoC has support for various
interfaces (LVDS, HDMI, DSI). The one supported in this series is the
standard 4-lane LVDS output. The minimal setup is thus composed of:
* An LCD InterFace (LCDIF) with an AXI/APB interface, generating a pixel
  stream
* One LVDS Display Bridge (LDB), also named pixel mapper, which receives
  the pixel stream and route it to one or two (possibly combined) LVDS
  displays.
* All necessary clocks and power controls coming from the MEDIAMIX
  control block.

Patch 1 adds a very useful helper to the core in order to grab devices
through endpoints instead of being limited to phandles. Video pipelines
being often described using graphs endpoints, the introduced helper is
used several times in the serires (there are 3 LCDIF, one of them being
connected to the LDB, itself having 2 ports).

Patch 2 is a fix which is necessary for this series to work properly,
but is way broader than just this use case. In practice, when assigned
clocks are defined in the device tree, the clock uclass tries to assign
the parents first and then sets them to the correct frequency. This only
works if the parents have been enabled themselves. Otherwise we end-up
with a non-clocked parent. I believe this is not the intended behavior
in general, but more importantly on the i.MX8MP, there are "clock
slices" which have pre-requisites in order to be modified and selecting
an ungated parent is one of them.

All the other patches progressively build support for the whole video
pipeline. Regarding the LCDIF driver, there is already a similar driver
for older i.MX SoCs but I didn't manage to get it to work. It was
written more than a decade ago while device-model, clocks and others
were not yet generically supported. Thus, numerous ad-hoc solutions
were implemented, which no longer fit today's requirements. I preferred
to add a new "clean" driver instead of modifying the existing one
because of the too high risk of breaking these platforms. Once proper
clocks/power-domain descriptions will be added to them they might be
converted (and tested) to work with the "new" implementation, but going
the opposite way felt drawback.

Thanks,
Miquèl

Miquel Raynal (8):
  dm: core: Add a helper to retrieve devices through graph endpoints
  clk: Ensure the parent clocks are enabled while reparenting
  clk: imx8mp: Add media related clocks
  imx: power-domain: Describe the i.MX8 MEDIAMIX domain
  imx: power-domain: Add support for the MEDIAMIX control block
  video: imx: Fix Makefile in order to be able to add other imx drivers
  video: imx: Add LDB driver
  video: imx: Add LCDIF driver

 drivers/clk/clk-uclass.c                  |   4 +
 drivers/clk/imx/clk-imx8mp.c              |  35 +++
 drivers/core/uclass.c                     |  62 +++++
 drivers/power/domain/Kconfig              |   7 +
 drivers/power/domain/Makefile             |   1 +
 drivers/power/domain/imx8m-power-domain.c |  17 ++
 drivers/power/domain/imx8mp-mediamix.c    | 185 +++++++++++++
 drivers/video/Makefile                    |   2 +-
 drivers/video/imx/Kconfig                 |   7 +
 drivers/video/imx/Makefile                |   4 +-
 drivers/video/imx/lcdif.c                 | 315 ++++++++++++++++++++++
 drivers/video/imx/ldb.c                   | 251 +++++++++++++++++
 include/dm/uclass.h                       |  21 ++
 13 files changed, 909 insertions(+), 2 deletions(-)
 create mode 100644 drivers/power/domain/imx8mp-mediamix.c
 create mode 100644 drivers/video/imx/lcdif.c
 create mode 100644 drivers/video/imx/ldb.c

-- 
2.43.0



More information about the U-Boot mailing list