0097-drm-sun4i-dsi-Add-the-A100-variant.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From 713029c6a33df9218d11593bc5be79420715633f Mon Sep 17 00:00:00 2001
  2. From: Samuel Holland <[email protected]>
  3. Date: Sun, 7 Aug 2022 11:06:22 -0500
  4. Subject: [PATCH 097/117] drm/sun4i: dsi: Add the A100 variant
  5. The A100 variant of the MIPI DSI controller now gets its module clock
  6. from the TCON via the TCON TOP, so the clock rate cannot be set to a
  7. fixed value. Otherwise, it appears to be the same as the A31 variant.
  8. Cover-letter:
  9. drm/sun4i: dsi: Support the A100/D1 controller variant
  10. This series adds support for the digital part of the DSI controller
  11. found in the A100 and D1 SoCs (plus T7, which is not supported by
  12. mainline Linux). There are two changes to the hardware integration:
  13. 1) the module clock routes through the TCON TOP, and
  14. 2) the separate I/O domain is removed.
  15. The actual register interface appears to be the same as before. The
  16. register definitions in the D1 BSP exactly match the A64 BSP.
  17. The BSP describes this as the "40nm" DSI controller variant. There is
  18. also a "28nm" variant with a different register interface; that one is
  19. found in a different subset of SoCs (V5 and A50).
  20. A100/D1 also come with an updated DPHY, described by the BSP as a
  21. "combo" PHY, which is now also used for LVDS channel 0. (LVDS and DSI
  22. share the same pins on Port D.) Since that is a different subsystem,
  23. I am sending that as a separate series.
  24. END
  25. Series-to: Chen-Yu Tsai <[email protected]>
  26. Series-to: Jernej Skrabec <[email protected]>
  27. Series-to: Maxime Ripard <[email protected]>
  28. Series-version: 2
  29. Reviewed-by: Jernej Skrabec <[email protected]>
  30. Signed-off-by: Samuel Holland <[email protected]>
  31. ---
  32. drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++++++
  33. 1 file changed, 8 insertions(+)
  34. --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
  35. +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
  36. @@ -1223,6 +1223,10 @@ static const struct sun6i_dsi_variant su
  37. static const struct sun6i_dsi_variant sun50i_a64_mipi_dsi_variant = {
  38. };
  39. +static const struct sun6i_dsi_variant sun50i_a100_mipi_dsi_variant = {
  40. + .has_mod_clk = true,
  41. +};
  42. +
  43. static const struct of_device_id sun6i_dsi_of_table[] = {
  44. {
  45. .compatible = "allwinner,sun6i-a31-mipi-dsi",
  46. @@ -1232,6 +1236,10 @@ static const struct of_device_id sun6i_d
  47. .compatible = "allwinner,sun50i-a64-mipi-dsi",
  48. .data = &sun50i_a64_mipi_dsi_variant,
  49. },
  50. + {
  51. + .compatible = "allwinner,sun50i-a100-mipi-dsi",
  52. + .data = &sun50i_a100_mipi_dsi_variant,
  53. + },
  54. { }
  55. };
  56. MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table);