You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/vc4: Add DPI driver
The DPI interface involves taking a ton of our GPIOs to be used as
outputs, and routing display signals over them in parallel.
v2: Use display_info.bus_formats[] to replace our custom DT
properties.
v3: Rebase on V3D documentation changes.
v4: Fix rebase detritus from V3D documentation changes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Rob Herring <robh@kernel.org>
This commit is contained in:
@@ -35,12 +35,22 @@ Optional properties for HDMI:
|
||||
as an interrupt/status bit in the HDMI controller
|
||||
itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt
|
||||
|
||||
Required properties for DPI:
|
||||
- compatible: Should be "brcm,bcm2835-dpi"
|
||||
- reg: Physical base address and length of the registers
|
||||
- clocks: a) core: The core clock the unit runs on
|
||||
b) pixel: The pixel clock that feeds the pixelvalve
|
||||
- port: Port node with a single endpoint connecting to the panel
|
||||
device, as defined in [1]
|
||||
|
||||
Required properties for V3D:
|
||||
- compatible: Should be "brcm,bcm2835-v3d"
|
||||
- reg: Physical base address and length of the V3D's registers
|
||||
- interrupts: The interrupt number
|
||||
See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
|
||||
|
||||
[1] Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
|
||||
Example:
|
||||
pixelvalve@7e807000 {
|
||||
compatible = "brcm,bcm2835-pixelvalve2";
|
||||
@@ -66,6 +76,22 @@ hdmi: hdmi@7e902000 {
|
||||
clock-names = "pixel", "hdmi";
|
||||
};
|
||||
|
||||
dpi: dpi@7e208000 {
|
||||
compatible = "brcm,bcm2835-dpi";
|
||||
reg = <0x7e208000 0x8c>;
|
||||
clocks = <&clocks BCM2835_CLOCK_VPU>,
|
||||
<&clocks BCM2835_CLOCK_DPI>;
|
||||
clock-names = "core", "pixel";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint@0 {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
v3d: v3d@7ec00000 {
|
||||
compatible = "brcm,bcm2835-v3d";
|
||||
reg = <0x7ec00000 0x1000>;
|
||||
@@ -75,3 +101,13 @@ v3d: v3d@7ec00000 {
|
||||
vc4: gpu {
|
||||
compatible = "brcm,bcm2835-vc4";
|
||||
};
|
||||
|
||||
panel: panel {
|
||||
compatible = "ontat,yx700wv03", "simple-panel";
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@ config DRM_VC4
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_KMS_CMA_HELPER
|
||||
select DRM_GEM_CMA_HELPER
|
||||
select DRM_PANEL
|
||||
help
|
||||
Choose this option if you have a system that has a Broadcom
|
||||
VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.
|
||||
|
||||
@@ -7,6 +7,7 @@ vc4-y := \
|
||||
vc4_bo.o \
|
||||
vc4_crtc.o \
|
||||
vc4_drv.o \
|
||||
vc4_dpi.o \
|
||||
vc4_kms.o \
|
||||
vc4_gem.o \
|
||||
vc4_hdmi.o \
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
static const struct drm_info_list vc4_debugfs_list[] = {
|
||||
{"bo_stats", vc4_bo_stats_debugfs, 0},
|
||||
{"dpi_regs", vc4_dpi_debugfs_regs, 0},
|
||||
{"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
|
||||
{"hvs_regs", vc4_hvs_debugfs_regs, 0},
|
||||
{"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
|
||||
|
||||
520
drivers/gpu/drm/vc4/vc4_dpi.c
Normal file
520
drivers/gpu/drm/vc4/vc4_dpi.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -237,6 +237,7 @@ static const struct component_master_ops vc4_drm_ops = {
|
||||
|
||||
static struct platform_driver *const component_drivers[] = {
|
||||
&vc4_hdmi_driver,
|
||||
&vc4_dpi_driver,
|
||||
&vc4_crtc_driver,
|
||||
&vc4_hvs_driver,
|
||||
&vc4_v3d_driver,
|
||||
|
||||
@@ -16,6 +16,7 @@ struct vc4_dev {
|
||||
struct vc4_hvs *hvs;
|
||||
struct vc4_crtc *crtc[3];
|
||||
struct vc4_v3d *v3d;
|
||||
struct vc4_dpi *dpi;
|
||||
|
||||
struct drm_fbdev_cma *fbdev;
|
||||
|
||||
@@ -422,6 +423,10 @@ void vc4_debugfs_cleanup(struct drm_minor *minor);
|
||||
/* vc4_drv.c */
|
||||
void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index);
|
||||
|
||||
/* vc4_dpi.c */
|
||||
extern struct platform_driver vc4_dpi_driver;
|
||||
int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused);
|
||||
|
||||
/* vc4_gem.c */
|
||||
void vc4_gem_init(struct drm_device *dev);
|
||||
void vc4_gem_destroy(struct drm_device *dev);
|
||||
|
||||
Reference in New Issue
Block a user