Skip to content

Commit

Permalink
drm/tilcdc: add TI LCD Controller DRM driver (v4)
Browse files Browse the repository at this point in the history
A simple DRM/KMS driver for the TI LCD Controller found in various
smaller TI parts (AM33xx, OMAPL138, etc).  This driver uses the
CMA helpers.  Currently only the TFP410 DVI encoder is supported
(tested with beaglebone + DVI cape).  There are also various LCD
displays, for which support can be added (as I get hw to test on),
and an external i2c HDMI encoder found on some boards.

The display controller supports a single CRTC.  And the encoder+
connector are split out into sub-devices.  Depending on which LCD
or external encoder is actually present, the appropriate output
module(s) will be loaded.

v1: original
v2: fix fb refcnting and few other cleanups
v3: get +/- vsync/hsync from timings rather than panel-info, add
    option DT max-bandwidth field so driver doesn't attempt to
    pick a display mode with too high memory bandwidth, and other
    small cleanups
v4: remove some unneeded stuff from panel-info struct, properly
    set high bits for hfp/hsw/hbp for rev 2, add DT bindings docs

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information
Rob Clark committed Feb 19, 2013
1 parent b3d3de8 commit 16ea975
Show file tree
Hide file tree
Showing 12 changed files with 2,019 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Device-Tree bindings for tilcdc DRM TFP410 output driver

Required properties:
- compatible: value should be "ti,tilcdc,tfp410".
- i2c: the phandle for the i2c device to use for DDC

Recommended properties:
- pinctrl-names, pinctrl-0: the pincontrol settings to configure
muxing properly for pins that connect to TFP410 device
- powerdn-gpio: the powerdown GPIO, pulled low to power down the
TFP410 device (for DPMS_OFF)

Example:

dvicape {
compatible = "ti,tilcdc,tfp410";
i2c = <&i2c2>;
pinctrl-names = "default";
pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
powerdn-gpio = <&gpio2 31 0>;
};
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Device-Tree bindings for tilcdc DRM driver

Required properties:
- compatible: value should be "ti,am33xx-tilcdc".
- interrupts: the interrupt number
- reg: base address and size of the LCDC device

Recommended properties:
- interrupt-parent: the phandle for the interrupt controller that
services interrupts for this device.
- ti,hwmods: Name of the hwmod associated to the LCDC

Example:

fb: fb@4830e000 {
compatible = "ti,am33xx-tilcdc";
reg = <0x4830e000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <36>;
ti,hwmods = "lcdc";
};
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,5 @@ source "drivers/gpu/drm/cirrus/Kconfig"
source "drivers/gpu/drm/shmobile/Kconfig"

source "drivers/gpu/drm/tegra/Kconfig"

source "drivers/gpu/drm/tilcdc/Kconfig"
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ obj-$(CONFIG_DRM_UDL) += udl/
obj-$(CONFIG_DRM_AST) += ast/
obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
obj-$(CONFIG_DRM_TEGRA) += tegra/
obj-$(CONFIG_DRM_TILCDC) += tilcdc/
obj-y += i2c/
10 changes: 10 additions & 0 deletions drivers/gpu/drm/tilcdc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
config DRM_TILCDC
tristate "DRM Support for TI LCDC Display Controller"
depends on DRM && OF
select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER
select DRM_GEM_CMA_HELPER
help
Choose this option if you have an TI SoC with LCDC display
controller, for example AM33xx in beagle-bone, DA8xx, or
OMAP-L1xx. This driver replaces the FB_DA8XX fbdev driver.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/tilcdc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ccflags-y := -Iinclude/drm -Werror

tilcdc-y := \
tilcdc_crtc.o \
tilcdc_tfp410.o \
tilcdc_drv.o

obj-$(CONFIG_DRM_TILCDC) += tilcdc.o
Loading

0 comments on commit 16ea975

Please sign in to comment.