Skip to content

Commit

Permalink
Merge tag 'fbdev-omap-3.16' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/tomba/linux into next

Pull omap fbdev changes from Tomi Valkeinen:
 - DT support for the panel drivers that were still missing it
 - TI AM43xx support
 - TI OMAP5 support

* tag 'fbdev-omap-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (46 commits)
  OMAPDSS: move 'compatible' converter to omapdss driver
  OMAPDSS: HDMI: fix devm_ioremap_resource error checks
  OMAPDSS: HDMI: remove unused defines
  OMAPDSS: HDMI: cleanup WP ioremaps
  OMAPDSS: panel NEC-NL8048HL11 DT support
  Doc/DT: Add DT binding documentation for TPO td043mtea1 panel
  OMAPDSS: Panel TPO-TD043MTEA1 DT support
  Doc/DT: Add DT binding documentation for SHARP LS037V7DW01
  OMAPDSS: panel sharp-ls037v7dw01 DT support
  OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod
  Doc/DT: Add binding doc for lgphilips,lb035q02.txt
  OMAPDSS: panel-lgphilips-lb035q02: Add DT support
  OMAPDSS: panel-lgphilips-lb035q02: use gpiod for enable gpio
  OMAPDSS: hdmi5_core: Fix compilation with OMAP5_DSS_HDMI_AUDIO
  OMAPDSS: panel-dpi: enable-gpio
  OMAPDSS: Fix writes to DISPC_POL_FREQ
  Doc/DT: Add OMAP5 DSS DT bindings
  OMAPDSS: HDMI: cleanup ioremaps
  OMAPDSS: HDMI: Add OMAP5 HDMI support
  OMAPDSS: HDMI: PLL changes for OMAP5
  ...
  • Loading branch information
Linus Torvalds committed Jun 4, 2014
2 parents d55696a + f2dd36a commit 15b5883
Show file tree
Hide file tree
Showing 39 changed files with 3,604 additions and 574 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/video/hdmi-connector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Required properties:

Optional properties:
- label: a symbolic name for the connector
- hpd-gpios: HPD GPIO number

Required nodes:
- Video port for HDMI input
Expand Down
33 changes: 33 additions & 0 deletions Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
LG.Philips LB035Q02 Panel
=========================

Required properties:
- compatible: "lgphilips,lb035q02"
- enable-gpios: panel enable gpio

Optional properties:
- label: a symbolic name for the panel

Required nodes:
- Video port for DPI input

Example
-------

lcd-panel: panel@0 {
compatible = "lgphilips,lb035q02";
reg = <0>;
spi-max-frequency = <100000>;
spi-cpol;
spi-cpha;

label = "lcd";

enable-gpios = <&gpio7 7 0>;

port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};
45 changes: 45 additions & 0 deletions Documentation/devicetree/bindings/video/panel-dpi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Generic MIPI DPI Panel
======================

Required properties:
- compatible: "panel-dpi"

Optional properties:
- label: a symbolic name for the panel
- enable-gpios: panel enable gpio

Required nodes:
- "panel-timing" containing video timings
(Documentation/devicetree/bindings/video/display-timing.txt)
- Video port for DPI input

Example
-------

lcd0: display@0 {
compatible = "samsung,lte430wq-f0c", "panel-dpi";
label = "lcd";

port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};

panel-timing {
clock-frequency = <9200000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <8>;
hback-porch = <4>;
hsync-len = <41>;
vback-porch = <2>;
vfront-porch = <4>;
vsync-len = <10>;

hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
};
43 changes: 43 additions & 0 deletions Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
SHARP LS037V7DW01 TFT-LCD panel
===================================

Required properties:
- compatible: "sharp,ls037v7dw01"

Optional properties:
- label: a symbolic name for the panel
- enable-gpios: a GPIO spec for the optional enable pin.
This pin is the INI pin as specified in the LS037V7DW01.pdf file.
- reset-gpios: a GPIO spec for the optional reset pin.
This pin is the RESB pin as specified in the LS037V7DW01.pdf file.
- mode-gpios: a GPIO
ordered MO, LR, and UD as specified in the LS037V7DW01.pdf file.

Required nodes:
- Video port for DPI input

This panel can have zero to five GPIOs to configure to change configuration
between QVGA and VGA mode and the scan direction. As these pins can be also
configured with external pulls, all the GPIOs are considered optional with holes
in the array.

Example
-------

Example when connected to a omap2+ based device:

lcd0: display {
compatible = "sharp,ls037v7dw01";
power-supply = <&lcd_3v3>;
enable-gpios = <&gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */
reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */
mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */
&gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */
&gpio1 3 GPIO_ACTIVE_HIGH>; /* gpio3, lcd UD */

port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/video/ti,omap4-dss.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ Required properties:

Optional nodes:
- Video port for HDMI output

HDMI Endpoint optional properties:
- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)
96 changes: 96 additions & 0 deletions Documentation/devicetree/bindings/video/ti,omap5-dss.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Texas Instruments OMAP5 Display Subsystem
=========================================

See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings.

DSS Core
--------

Required properties:
- compatible: "ti,omap5-dss"
- reg: address and length of the register space
- ti,hwmods: "dss_core"
- clocks: handle to fclk
- clock-names: "fck"

Required nodes:
- DISPC

Optional nodes:
- DSS Submodules: RFBI, DSI, HDMI
- Video port for DPI output

DPI Endpoint required properties:
- data-lines: number of lines used


DISPC
-----

Required properties:
- compatible: "ti,omap5-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss_dispc"
- interrupts: the DISPC interrupt
- clocks: handle to fclk
- clock-names: "fck"


RFBI
----

Required properties:
- compatible: "ti,omap5-rfbi"
- reg: address and length of the register space
- ti,hwmods: "dss_rfbi"
- clocks: handles to fclk and iclk
- clock-names: "fck", "ick"

Optional nodes:
- Video port for RFBI output
- RFBI controlled peripherals


DSI
---

Required properties:
- compatible: "ti,omap5-dsi"
- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
- reg-names: "proto", "phy", "pll"
- interrupts: the DSI interrupt line
- ti,hwmods: "dss_dsi1" or "dss_dsi2"
- vdd-supply: power supply for DSI
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys_clk"

Optional nodes:
- Video port for DSI output
- DSI controlled peripherals

DSI Endpoint required properties:
- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
DATA1+, DATA1-, ...


HDMI
----

Required properties:
- compatible: "ti,omap5-hdmi"
- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
'core'
- reg-names: "wp", "pll", "phy", "core"
- interrupts: the HDMI interrupt line
- ti,hwmods: "dss_hdmi"
- vdda-supply: vdda power supply
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys_clk"

Optional nodes:
- Video port for HDMI output

HDMI Endpoint optional properties:
- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)
30 changes: 30 additions & 0 deletions Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Toppoly TD028TTEC1 Panel
========================

Required properties:
- compatible: "toppoly,td028ttec1"

Optional properties:
- label: a symbolic name for the panel

Required nodes:
- Video port for DPI input

Example
-------

lcd-panel: td028ttec1@0 {
compatible = "toppoly,td028ttec1";
reg = <0>;
spi-max-frequency = <100000>;
spi-cpol;
spi-cpha;

label = "lcd";
port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};

33 changes: 33 additions & 0 deletions Documentation/devicetree/bindings/video/tpo,td043mtea1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
TPO TD043MTEA1 Panel
====================

Required properties:
- compatible: "tpo,td043mtea1"
- reset-gpios: panel reset gpio

Optional properties:
- label: a symbolic name for the panel

Required nodes:
- Video port for DPI input

Example
-------

lcd-panel: panel@0 {
compatible = "tpo,td043mtea1";
reg = <0>;
spi-max-frequency = <100000>;
spi-cpol;
spi-cpha;

label = "lcd";

reset-gpios = <&gpio7 7 0>;

port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};
62 changes: 6 additions & 56 deletions arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ static enum omapdss_version __init omap_display_get_version(void)
return OMAPDSS_VER_OMAP4;
else if (soc_is_omap54xx())
return OMAPDSS_VER_OMAP5;
else if (soc_is_am43xx())
return OMAPDSS_VER_AM43xx;
else
return OMAPDSS_VER_UNKNOWN;
}
Expand Down Expand Up @@ -555,65 +557,9 @@ int omap_dss_reset(struct omap_hwmod *oh)
return r;
}

/* list of 'compatible' nodes to convert to omapdss specific */
static const char * const dss_compat_conv_list[] __initconst = {
"composite-connector",
"dvi-connector",
"hdmi-connector",
"panel-dpi",
"panel-dsi-cm",
"sony,acx565akm",
"svideo-connector",
"ti,tfp410",
"ti,tpd12s015",
};

/* prepend compatible string with "omapdss," */
static __init void omapdss_omapify_node(struct device_node *node,
const char *compat)
{
char *new_compat;
struct property *prop;

new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);

prop = kzalloc(sizeof(*prop), GFP_KERNEL);

if (!prop) {
pr_err("omapdss_omapify_node: kzalloc failed\n");
return;
}

prop->name = "compatible";
prop->value = new_compat;
prop->length = strlen(new_compat) + 1;

of_update_property(node, prop);
}

/*
* As omapdss panel drivers are omapdss specific, but we want to define the
* DT-data in generic manner, we convert the compatible strings of the panel
* nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
* correct DT data and omapdss specific drivers.
*
* When we get generic panel drivers to the kernel, this will be removed.
*/
void __init omapdss_early_init_of(void)
{
int i;

for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
const char *compat = dss_compat_conv_list[i];
struct device_node *node = NULL;

while ((node = of_find_compatible_node(node, NULL, compat))) {
if (!of_device_is_available(node))
continue;

omapdss_omapify_node(node, compat);
}
}
}

struct device_node * __init omapdss_find_dss_of_node(void)
Expand All @@ -632,6 +578,10 @@ struct device_node * __init omapdss_find_dss_of_node(void)
if (node)
return node;

node = of_find_compatible_node(NULL, NULL, "ti,omap5-dss");
if (node)
return node;

return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/omap2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_OMAP2_VRFB) += vrfb.o

obj-$(CONFIG_OMAP2_DSS) += dss/
obj-y += dss/
obj-y += displays-new/
obj-$(CONFIG_FB_OMAP2) += omapfb/
Loading

0 comments on commit 15b5883

Please sign in to comment.