Skip to content

Commit

Permalink
drm/vc4: Add DPI driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Anholt committed Apr 14, 2016
1 parent 0b27c02 commit 08302c3
Show file tree
Hide file tree
Showing 7 changed files with 565 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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>;
Expand All @@ -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>;
};
};
};
1 change: 1 addition & 0 deletions drivers/gpu/drm/vc4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/vc4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/vc4/vc4_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
Loading

0 comments on commit 08302c3

Please sign in to comment.