drm/armada: add mmp2 support
Subsystems (2)
PATCH v2 1/1 drm/armada: add mmp2 support
Heavily based on the Armada 510 (Dove) support.
Tested to work well with Display 1 and Display 2 clocks driving the internal panel on the OLPC XO 1.75 laptop. Some tweaking might be required if anyone wants to use it with a MIPI or HDMI encoder.
The data sheet is not available, but James Cameron of OLPC kindly provided some details about the LCD_SCLK_DIV register.
Signed-off-by Lubomir Rintel <[email protected]>
---
Applies on top of "drm-armada-devel" branch ofgit://git.armlinux.org.uk/~rmk/linux-arm.git
Changes since v1:
- Aligned with more recent Armada 510 support: using the same clock names and allowing for more flexible pixel clock source selection.
drivers/gpu/drm/armada/Makefile | 1 + drivers/gpu/drm/armada/armada_610.c | 143 +++++++++++++++++++++++++++ drivers/gpu/drm/armada/armada_crtc.c | 4 + drivers/gpu/drm/armada/armada_drm.h | 1 + drivers/gpu/drm/armada/armada_hw.h | 10 ++ 5 files changed, 159 insertions(+) create mode 100644 drivers/gpu/drm/armada/armada_610.c
drivers/gpu/drm/armada/Makefile +1 -0
@@ -2,6 +2,7 @@ armada-y := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \ armada_gem.o armada_overlay.o armada_plane.o armada_trace.o armada-y += armada_510.o +armada-y += armada_610.o armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o obj-$(CONFIG_DRM_ARMADA) := armada.o
drivers/gpu/drm/armada/armada_610.c new file +143 -0
143 lines not on this page · raw message
drivers/gpu/drm/armada/armada_crtc.c +4 -0
@@ -1104,6 +1104,10 @@ static const struct of_device_id armada_lcd_of_match[] = { .compatible = "marvell,dove-lcd", .data = &armada510_ops, }, + { + .compatible = "marvell,mmp2-lcd", + .data = &armada610_ops, + }, {} };MODULE_DEVICE_TABLE (of, armada_lcd_of_match);
drivers/gpu/drm/armada/armada_drm.h +1 -0
@@ -52,6 +52,7 @@ struct armada_variant {/* Variant ops */ extern const struct armada_variant armada510_ops; +extern const struct armada_variant armada610_ops;struct armada_private {struct drm_device drm;
drivers/gpu/drm/armada/armada_hw.h +10 -0
@@ -219,6 +219,16 @@ enum {SCLK_510_FRAC_DIV_MASK =0xfff <<16 ,SCLK_510_INT_DIV_MASK =0xffff <<0 , +/* Armada 610 */ +SCLK_610_AXI =0x0 <<30 , +SCLK_610_DISP0 =0x1 <<30 ,/* LCD Display 1 */ +SCLK_610_DISP1 =0x2 <<30 ,/* LCD Display 2 */ +SCLK_610_PLL =0x3 <<30 ,/* HDMI PLL clock */ +SCLK_610_PANEL_CLK_DIS =0x1 <<28 ,/* 1 = panel clock disabled */ +SCLK_610_FRAC_DIV_MASK =0xfff <<16 , +SCLK_610_MIPI_DIV_MASK =0xf <<8 ,/* 0 = off, 1 = bypass, ... */ +SCLK_610_INT_DIV_MASK =0xff <<0 , +/* Armada 16x */ SCLK_16X_AHB =0x0 <<28 , SCLK_16X_PCLK = 0x1 << 28,
Signature · 1 line
2.20.1