[PATCH 20/22] dt-bindings: msm/mdp: Provide details on MDP interface ports

2016-06-20 Thread Rob Herring
On Thu, Jun 16, 2016 at 05:06:45PM +0530, Archit Taneja wrote:
> The MDP4/5 DT node now contains a list of ports that describe how it
> connects to external encoder interfaces like DSI and HDMI. These follow
> the standard of_graph bindings, and allow us to get rid of the 'connectors'
> phandle that contained a list of all the external encoders connected to
> MDP.
> 
> The GPU phandle is removed too until we figure out what's the right way
> to specify it in DT.

You typically only have one instance, so just find it by compatible 
string.

> 
> Cc: Rob Herring 
> Cc: devicetree at vger.kernel.org
> 
> Signed-off-by: Archit Taneja 
> ---
>  .../devicetree/bindings/display/msm/mdp4.txt   | 68 
> --
>  .../devicetree/bindings/display/msm/mdp5.txt   | 48 ++-
>  2 files changed, 110 insertions(+), 6 deletions(-)

Acked-by: Rob Herring 


[PATCH 20/22] dt-bindings: msm/mdp: Provide details on MDP interface ports

2016-06-16 Thread Archit Taneja
The MDP4/5 DT node now contains a list of ports that describe how it
connects to external encoder interfaces like DSI and HDMI. These follow
the standard of_graph bindings, and allow us to get rid of the 'connectors'
phandle that contained a list of all the external encoders connected to
MDP.

The GPU phandle is removed too until we figure out what's the right way
to specify it in DT.

Cc: Rob Herring 
Cc: devicetree at vger.kernel.org

Signed-off-by: Archit Taneja 
---
 .../devicetree/bindings/display/msm/mdp4.txt   | 68 --
 .../devicetree/bindings/display/msm/mdp5.txt   | 48 ++-
 2 files changed, 110 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/mdp4.txt 
b/Documentation/devicetree/bindings/display/msm/mdp4.txt
index 1de9b17..3c341a1 100644
--- a/Documentation/devicetree/bindings/display/msm/mdp4.txt
+++ b/Documentation/devicetree/bindings/display/msm/mdp4.txt
@@ -10,7 +10,6 @@ Required properties:
   * "qcom,mdp4" - mdp4
 - reg: Physical base address and length of the controller's registers.
 - interrupts: The interrupt signal from the display controller.
-- connectors: array of phandles for output device(s)
 - clocks: device clocks
   See ../clocks/clock-bindings.txt for details.
 - clock-names: the following clocks are required.
@@ -20,9 +19,23 @@ Required properties:
   * "lut_clk"
   * "hdmi_clk"
   * "tv_clk"
+- ports: contains the list of output ports from MDP. These connect to 
interfaces
+  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
+  special case since it is a part of the MDP block itself).
+
+  Each output port contains an endpoint that describes how it is connected to 
an
+  external interface. These are described by the standard properties documented
+  here:
+   Documentation/devicetree/bindings/graph.txt
+   Documentation/devicetree/bindings/media/video-interfaces.txt
+
+  The output port mappings are:
+   Port 0 -> LCDC/LVDS
+   Port 1 -> DSI1 Cmd/Video
+   Port 2 -> DSI2 Cmd/Video
+   Port 3 -> DTV

 Optional properties:
-- gpus: phandle for gpu device
 - clock-names: the following clocks are optional:
   * "lut_clk"

@@ -31,12 +44,27 @@ Example:
 / {
...

-   mdp: qcom,mdp at 510 {
+   hdmi: hdmi at 4a0 {
+   ...
+   ports {
+   ...
+   port at 0 {
+   reg = <0>;
+   hdmi_in: endpoint {
+   remote-endpoint = <_dtv_out>;
+   };
+   };
+   ...
+   };
+   ...
+   };
+
+   ...
+
+   mdp: mdp at 510 {
compatible = "qcom,mdp4";
reg = <0x0510 0xf>;
interrupts = ;
-   connectors = <>;
-   gpus = <>;
clock-names =
"core_clk",
"iface_clk",
@@ -50,5 +78,35 @@ Example:
< MDP_LUT_CLK>,
< HDMI_TV_CLK>,
< MDP_TV_CLK>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port at 0 {
+   reg = <0>;
+   mdp_lvds_out: endpoint {
+   };
+   };
+
+   port at 1 {
+   reg = <1>;
+   mdp_dsi1_out: endpoint {
+   };
+   };
+
+   port at 2 {
+   reg = <2>;
+   mdp_dsi2_out: endpoint {
+   };
+   };
+
+   port at 3 {
+   reg = <3>;
+   mdp_dtv_out: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
};
 };
diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt 
b/Documentation/devicetree/bindings/display/msm/mdp5.txt
index b395905..30c11ea 100644
--- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
+++ b/Documentation/devicetree/bindings/display/msm/mdp5.txt
@@ -49,12 +49,36 @@ Required properties:
 -   * "iface_clk"
 -   * "core_clk"
 -   * "vsync_clk"
+- ports: contains the list of output ports from MDP. These connect to 
interfaces
+  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
+  special case since it is a part of the MDP block itself).
+
+  Each output port