Hello,
This patch series documents and implements DT bindings support for the R-Car
Display Unit (DU).
Unlike the previous attempt that tried to create a new model for composite
display devices and failed to get any real traction from DRM developers, the
approach taken here focuses on DT bindings without requiring core changes
outside of the DU driver.
Aside of the usual boring core properties (compatible, reg, interrupts and
clocks), the proposed bindings use the OF graph bindings to model connections
between the DU output video ports and the on-board and off-board components.
As such they do not depend on any particular implementation or implementation
philosophy.
The series starts by documenting DT bindings for the devices present on the
Marzen, Lager and Koelsch boards not already supported in the mainline kernel
(01/16 to 05/16) and for the DU (06/16). It then reworks the rcar_du platform
data to ease implementation of the DT bindings (07/16). The next step is to
implement support for the DU DT bindings in the R-Car DU DRM driver (08/16).
Finally the remaining patches add the DU DT nodes for all supported SoCs
(09/16 to 11/16), remove DU platform data from the DT-based board files (12/16
and 13/16) and describe the on-board devices connected to the DU outputs for
the Marzen, Lager and Koelsch boards (14/16 to 16/16).
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Laurent Pinchart (16):
devicetree: Add vendor prefix "mitsubishi" to vendor-prefixes.txt
devicetree: Add vendor prefix "thine" to vendor-prefixes.txt
video: Add DT binding documentation for VGA connector
video: Add ADV7123 DT bindings documentation
video: Add THC63LVDM83D DT bindings documentation
video: Add DT bindings for the R-Car Display Unit
drm/rcar-du: Use struct videomode in platform data
drm/rcar-du: Add OF support
ARM: shmobile: r8a7779: Add DU node to device tree
ARM: shmobile: r8a7790: Add DU node to device tree
ARM: shmobile: r8a7791: Add DU node to device tree
ARM: shmobile: lager-reference: Remove DU platform device
ARM: shmobile: koelsch-reference: Remove DU platform device
ARM: shmobile: marzen: Enable DU device in DT
ARM: shmobile: lager: Enable DU device in DT
ARM: shmobile: koelsch: Enable DU device in DT
.../devicetree/bindings/vendor-prefixes.txt | 2 +
.../devicetree/bindings/video/adi,adv7123.txt | 50 +++++
.../devicetree/bindings/video/renesas,du.txt | 84 ++++++++
.../devicetree/bindings/video/thine,thc63lvdm83d | 50 +++++
.../devicetree/bindings/video/vga-connector.txt | 28 +++
arch/arm/boot/dts/r8a7779-marzen.dts | 106 ++++++++++
arch/arm/boot/dts/r8a7779.dtsi | 24 +++
arch/arm/boot/dts/r8a7790-lager.dts | 78 ++++++-
arch/arm/boot/dts/r8a7790.dtsi | 39 ++++
arch/arm/boot/dts/r8a7791-koelsch.dts | 43 +++-
arch/arm/boot/dts/r8a7791.dtsi | 30 +++
arch/arm/mach-shmobile/board-koelsch-reference.c | 74 -------
arch/arm/mach-shmobile/board-koelsch.c | 19 +-
arch/arm/mach-shmobile/board-lager-reference.c | 81 --------
arch/arm/mach-shmobile/board-lager.c | 19 +-
arch/arm/mach-shmobile/board-marzen.c | 19 +-
drivers/gpu/drm/rcar-du/Kconfig | 1 +
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 170 ++++++++-------
drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 +
drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 11 +-
drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 3 +-
drivers/gpu/drm/rcar-du/rcar_du_kms.c | 231 +++++++++++++++++++--
drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 43 ++--
drivers/gpu/drm/rcar-du/rcar_du_lvdscon.h | 3 +-
include/linux/platform_data/rcar-du.h | 4 +-
25 files changed, 904 insertions(+), 310 deletions(-)
create mode 100644 Documentation/devicetree/bindings/video/adi,adv7123.txt
create mode 100644 Documentation/devicetree/bindings/video/renesas,du.txt
create mode 100644 Documentation/devicetree/bindings/video/thine,thc63lvdm83d
create mode 100644 Documentation/devicetree/bindings/video/vga-connector.txt
--
Regards,
Laurent Pinchart
The VGA connector is described by a single input port and an optional
DDC bus.
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/video/vga-connector.txt | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/vga-connector.txt
@@ -0,0 +1,28 @@+VGA Connector+=======++Required properties:+- compatible: "vga-connector"++Optional properties:+- label: a symbolic name for the connector+- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC++Required nodes:+- Video port for VGA input++Example+-------++vga0: connector@0 {+ compatible = "vga-connector";+ label = "vga";++ ddc-i2c-bus = <&i2c3>;++ port {+ vga_connector_in: endpoint {+ remote-endpoint = <&adv7123_out>;+ };+ };+};
The ADV7123 is a video DAC described by an input port, an output port,
and an optional power save GPIO.
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/video/adi,adv7123.txt | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/adi,adv7123.txt
@@ -0,0 +1,50 @@+Analog Device ADV7123 Video DAC+-------------------------------++The ADV7123 is a digital-to-analog converter that outputs VGA signals from a+parallel video input.++Required properties:++- compatible: Should be "adi,adv7123"++Optional properties:++- psave-gpios: Power save control GPIO++Required nodes:++The ADV7123 has two video ports. Their connections are modeled using the OF+graph bindings specified in Documentation/devicetree/bindings/graph.txt.++- Video port 0 for DPI input+- Video port 1 for VGA output+++Example+-------++ adv7123: encoder@0 {+ compatible = "adi,adv7123";++ ports {+ #address-cells = <1>;+ #size-cells = <0>;++ port@0 {+ reg = <0>;++ adv7123_in: endpoint@0 {+ remote-endpoint = <&dpi_out>;+ };+ };++ port@1 {+ reg = <1>;++ adv7123_out: endpoint@0 {+ remote-endpoint = <&vga_connector_in>;+ };+ };+ };+ };
The THC63LVDM83D is a video LVDS serializer described by an input port,
an output port, and an optional power down GPIO.
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/video/thine,thc63lvdm83d | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/thine,thc63lvdm83d
@@ -0,0 +1,50 @@+THine Electronics THC63LVDM83D LVDS serializer+----------------------------------------------++The THC63LVDM83D is an LVDS serializer designed to support pixel data+transmission between a host and a flat panel.++Required properties:++- compatible: Should be "thine,thc63lvdm83d"++Optional properties:++- pwdn-gpios: Power down control GPIO++Required nodes:++The THC63LVDM83D has two video ports. Their connections are modeled using the+OFgraph bindings specified in Documentation/devicetree/bindings/graph.txt.++- Video port 0 for CMOS/TTL input+- Video port 1 for LVDS output+++Example+-------++ lvds_enc: encoder@0 {+ compatible = "thine,thc63lvdm83d";++ ports {+ #address-cells = <1>;+ #size-cells = <0>;++ port@0 {+ reg = <0>;++ lvds_enc_in: endpoint@0 {+ remote-endpoint = <&rgb_out>;+ };+ };++ port@1 {+ reg = <1>;++ lvds_enc_out: endpoint@0 {+ remote-endpoint = <&panel_in>;+ };+ };+ };+ };
Aside of the usual boring core properties (compatible, reg, interrupts
and clocks), the bindings use the OF graph bindings to model connections
between the DU output video ports and the on-board and off-board
components.
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/video/renesas,du.txt | 84 ++++++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/renesas,du.txt
@@ -0,0 +1,84 @@+* Renesas R-Car Display Unit (DU)++Required Properties:++ - compatible: must be one of the following.+ - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU+ - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU+ - "renesas,du-r8a7791" for R8A7791 (R-Car M2) compatible DU++ - reg: A list of base address and length of each memory resource, one for+ each entry in the reg-names property.+ - reg-names: Name of the memory resources. The DU requires one memory+ resource for the DU core (named "du") and one memory resource for each+ LVDS encoder (named "lvds.x" with "x" being the LVDS controller numerical+ index).++ - interrupt-parent: phandle of the parent interrupt controller.+ - interrupts: Interrupt specifiers for the DU interrupts.++ - clocks: A list of phandles + clock-specifier pairs, one for each entry in+ the clock-names property.+ - clock-names: Name of the clocks. This property is model-dependent.+ - R8A7779 uses a single functional clock. The clock doesn't need to be+ named.+ - R8A7790 and R8A7791 use one functional clock per channel and one clock+ per LVDS encoder. The functional clocks must be named "du.x" with "x"+ being the channel numerical index. The LVDS clocks must be named+ "lvds.x" with "x" being the LVDS encoder numerical index.++Required nodes:++The connections to the DU output video ports are modeled using the OF graph+bindings specified in Documentation/devicetree/bindings/graph.txt.++The following table lists for each supported model the port number+corresponding to each DU output.++ Port 0 Port1 Port2+-----------------------------------------------------------------------------+ R8A7779 (H1) DPAD 0 DPAD 1 -+ R8A7790 (H2) DPAD LVDS 0 LVDS 1+ R8A7791 (M2) DPAD LVDS 0 -+++Example: R8A7790 (R-Car H2) DU++ du: du@feb00000 {+ compatible = "renesas,du-r8a7790";+ reg = <0 0xfeb00000 0 0x70000>,+ <0 0xfeb90000 0 0x1c>,+ <0 0xfeb94000 0 0x1c>;+ reg-names = "du", "lvds.0", "lvds.1";+ interrupt-parent = <&gic>;+ interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,+ <0 268 IRQ_TYPE_LEVEL_HIGH>,+ <0 269 IRQ_TYPE_LEVEL_HIGH>;+ clocks = <&mstp7_clks R8A7790_CLK_DU0>,+ <&mstp7_clks R8A7790_CLK_DU1>,+ <&mstp7_clks R8A7790_CLK_DU2>,+ <&mstp7_clks R8A7790_CLK_LVDS0>,+ <&mstp7_clks R8A7790_CLK_LVDS1>;+ clock-names = "du.0", "du.1", "du.2", "lvds.0", "lvds.1";++ ports {+ #address-cells = <1>;+ #size-cells = <0>;++ port@0 {+ reg = <0>;+ du_out_rgb: endpoint {+ };+ };+ port@1 {+ reg = <1>;+ du_out_lvds0: endpoint {+ };+ };+ port@2 {+ reg = <2>;+ du_out_lvds1: endpoint {+ };+ };+ };+ };
@@ -0,0 +1,28 @@+VGA Connector+=======++Required properties:+- compatible: "vga-connector"++Optional properties:+- label: a symbolic name for the connector
...which corresponds to hardware labels.
+- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
+
+Required nodes:
+- Video port for VGA input
A reference to the relevant video graph bindings should be added here.
+
+Example
+-------
+
+vga0: connector@0 {
+ compatible = "vga-connector";
+ label = "vga";
+
+ ddc-i2c-bus = <&i2c3>;
+
+ port {
+ vga_connector_in: endpoint {
+ remote-endpoint = <&adv7123_out>;
+ };
+ };
+};
--
1.8.5.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob,
On Wednesday 27 August 2014 12:12:36 Rob Herring wrote:
On Wed, Aug 27, 2014 at 11:41 AM, Laurent Pinchart wrote:
quoted
The VGA connector is described by a single input port and an optional
DDC bus.
Wasn't there a generic connector binding for DVI, HDMI, etc.?
As far as I know, there are three separate generic bindings for DVI
connectors, HDMI connectors, and analog TV connectors. The VGA connector
doesn't seem to really fit into one of those categories.
@@ -0,0 +1,28 @@+VGA Connector+=======++Required properties:+- compatible: "vga-connector"++Optional properties:+- label: a symbolic name for the connector
...which corresponds to hardware labels.
quoted
+- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
+
+Required nodes:
+- Video port for VGA input
A reference to the relevant video graph bindings should be added here.
From: Tomi Valkeinen <hidden> Date: 2014-09-15 08:52:58
Hi,
On 27/08/14 19:41, Laurent Pinchart wrote:
quoted hunk
The VGA connector is described by a single input port and an optional
DDC bus.
Cc: devicetree@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/video/vga-connector.txt | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/video/vga-connector.txt
@@ -0,0 +1,28 @@+VGA Connector+==============++Required properties:+- compatible: "vga-connector"++Optional properties:+- label: a symbolic name for the connector+- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC++Required nodes:+- Video port for VGA input++Example+-------++vga0: connector@0 {+ compatible = "vga-connector";+ label = "vga";++ ddc-i2c-bus = <&i2c3>;++ port {+ vga_connector_in: endpoint {+ remote-endpoint = <&adv7123_out>;+ };+ };+};