Commit 4078f575 authored by Eric Anholt's avatar Eric Anholt

drm/vc4: Add DSI driver

The DSI0 and DSI1 blocks on the 2835 are related hardware blocks.
Some registers move around, and the featureset is slightly different,
as DSI1 (the 4-lane DSI) is a later version of the hardware block.
This driver doesn't yet enable DSI0, since we don't have any hardware
to test against, but it does put a lot of the register definitions and
code in place.

v2: Use the clk_hw interfaces, don't set CLK_IS_BASIC (from review by
    Stephen Boyd)
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/20170131192912.11316-1-eric@anholt.net
parent 302cee36
...@@ -2,10 +2,12 @@ config DRM_VC4 ...@@ -2,10 +2,12 @@ config DRM_VC4
tristate "Broadcom VC4 Graphics" tristate "Broadcom VC4 Graphics"
depends on ARCH_BCM2835 || COMPILE_TEST depends on ARCH_BCM2835 || COMPILE_TEST
depends on DRM depends on DRM
depends on COMMON_CLK
select DRM_KMS_HELPER select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER select DRM_KMS_CMA_HELPER
select DRM_GEM_CMA_HELPER select DRM_GEM_CMA_HELPER
select DRM_PANEL select DRM_PANEL
select DRM_MIPI_DSI
help help
Choose this option if you have a system that has a Broadcom Choose this option if you have a system that has a Broadcom
VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835. VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.
......
...@@ -8,6 +8,7 @@ vc4-y := \ ...@@ -8,6 +8,7 @@ vc4-y := \
vc4_crtc.o \ vc4_crtc.o \
vc4_drv.o \ vc4_drv.o \
vc4_dpi.o \ vc4_dpi.o \
vc4_dsi.o \
vc4_kms.o \ vc4_kms.o \
vc4_gem.o \ vc4_gem.o \
vc4_hdmi.o \ vc4_hdmi.o \
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
static const struct drm_info_list vc4_debugfs_list[] = { static const struct drm_info_list vc4_debugfs_list[] = {
{"bo_stats", vc4_bo_stats_debugfs, 0}, {"bo_stats", vc4_bo_stats_debugfs, 0},
{"dpi_regs", vc4_dpi_debugfs_regs, 0}, {"dpi_regs", vc4_dpi_debugfs_regs, 0},
{"dsi1_regs", vc4_dsi_debugfs_regs, 0, (void *)(uintptr_t)1},
{"hdmi_regs", vc4_hdmi_debugfs_regs, 0}, {"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
{"vec_regs", vc4_vec_debugfs_regs, 0}, {"vec_regs", vc4_vec_debugfs_regs, 0},
{"hvs_regs", vc4_hvs_debugfs_regs, 0}, {"hvs_regs", vc4_hvs_debugfs_regs, 0},
......
...@@ -295,6 +295,7 @@ static struct platform_driver *const component_drivers[] = { ...@@ -295,6 +295,7 @@ static struct platform_driver *const component_drivers[] = {
&vc4_hdmi_driver, &vc4_hdmi_driver,
&vc4_vec_driver, &vc4_vec_driver,
&vc4_dpi_driver, &vc4_dpi_driver,
&vc4_dsi_driver,
&vc4_hvs_driver, &vc4_hvs_driver,
&vc4_crtc_driver, &vc4_crtc_driver,
&vc4_v3d_driver, &vc4_v3d_driver,
......
...@@ -18,6 +18,7 @@ struct vc4_dev { ...@@ -18,6 +18,7 @@ struct vc4_dev {
struct vc4_hvs *hvs; struct vc4_hvs *hvs;
struct vc4_v3d *v3d; struct vc4_v3d *v3d;
struct vc4_dpi *dpi; struct vc4_dpi *dpi;
struct vc4_dsi *dsi1;
struct vc4_vec *vec; struct vc4_vec *vec;
struct drm_fbdev_cma *fbdev; struct drm_fbdev_cma *fbdev;
...@@ -465,6 +466,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); ...@@ -465,6 +466,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index);
extern struct platform_driver vc4_dpi_driver; extern struct platform_driver vc4_dpi_driver;
int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused);
/* vc4_dsi.c */
extern struct platform_driver vc4_dsi_driver;
int vc4_dsi_debugfs_regs(struct seq_file *m, void *unused);
/* vc4_gem.c */ /* vc4_gem.c */
void vc4_gem_init(struct drm_device *dev); void vc4_gem_init(struct drm_device *dev);
void vc4_gem_destroy(struct drm_device *dev); void vc4_gem_destroy(struct drm_device *dev);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment