drm: rcar-du: lvds: D3/E3 support
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 21 Aug 2018 15:06:50 +0000 (18:06 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 24 Sep 2018 21:40:56 +0000 (00:40 +0300)
commitc25c0136119990c62c160d95592714833bc214a5
treec6a3357f8100171f033b14c709ff660670348668
parent399d9f2f197a06b8866192a019a97d2af29cc81e
drm: rcar-du: lvds: D3/E3 support

The LVDS encoders in the D3 and E3 SoCs differ significantly from those
in the other R-Car Gen3 family members:

- The LVDS PLL architecture is more complex and requires computing PLL
  parameters manually.
- The PLL uses external clocks as inputs, which need to be retrieved
  from DT.
- In addition to the different PLL setup, the startup sequence has
  changed *again* (seems someone had trouble making his/her mind).

Supporting all this requires DT bindings extensions for external clocks,
brand new PLL setup code, and a few quirks to handle the differences in
the startup sequence.

The implementation doesn't support all hardware features yet, namely

- Using the LV[01] clocks generated by the CPG as PLL input.
- Providing the LVDS PLL clock to the DU for use with the RGB output.

Those features can be added later when the need will arise.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
drivers/gpu/drm/rcar-du/rcar_lvds.c
drivers/gpu/drm/rcar-du/rcar_lvds_regs.h