[RFC v2 1/4] dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding

Philipp Zabel p.zabel at pengutronix.de
Wed Sep 30 08:30:51 PDT 2015


Am Freitag, den 18.09.2015, 15:33 -0500 schrieb Rob Herring:
> On Fri, Sep 18, 2015 at 11:11 AM, Philipp Zabel <p.zabel at pengutronix.de> wrote:
> > From: CK Hu <ck.hu at mediatek.com>
> >
> > Add device tree binding documentation for the display subsystem in
> > Mediatek MT8173 SoCs.
> >
> > Signed-off-by: CK Hu <ck.hu at mediatek.com>
> > Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
> > ---
> >  .../bindings/drm/mediatek/mediatek,disp.txt        | 131 +++++++++++++++++++++
> >  .../bindings/drm/mediatek/mediatek,dsi.txt         |  29 +++++
> >  2 files changed, 160 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/drm/mediatek/mediatek,disp.txt
> >  create mode 100644 Documentation/devicetree/bindings/drm/mediatek/mediatek,dsi.txt
> >
> > diff --git a/Documentation/devicetree/bindings/drm/mediatek/mediatek,disp.txt b/Documentation/devicetree/bindings/drm/mediatek/mediatek,disp.txt
> > new file mode 100644
> > index 0000000..a3811bd
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/drm/mediatek/mediatek,disp.txt
> > @@ -0,0 +1,131 @@
> > +Mediatek display subsystem
> > +==========================
> > +
> > +The Mediatek display subsystem consists of various DISP function blocks in the
> > +MMSYS register space. The connections between them can be configured by output
> > +and input selectors in the MMSYS_CONFIG register space and register updates can
> > +be synchronized to video frame boundaries with help of a DISP_MUTEX function
> > +block.
> > +
> > +The display-subsystem node binds together all individual device nodes that
> > +comprise the DISP subsystem.
> > +
> > +Required properties:
> > +
> > +- compatible: "mediatek,<chip>-disp"
> 
> > +- components: Should contain a list of phandles pointing to the DISP function
> > +  block device nodes.
> > +- component-names: Should contain the name of the function block pointed to
> > +  by the components phandle of the same index.
> 
> NAK. Group these nodes under a parent node, use of-graph or just don't
> put this into DT. Don't invent a new way.

If I connect the DISP nodes using of-graph bindings, the full graph will
look somewhat like this (including the currently unused function blocks,
all properties but ports and endpoints removed for brevity):

	ovl0 at 1400c000 {
		port {
			ovl0_to_color0: endpoint at 0 {
				remote-endpoint = <&color0_from_ovl0>;
			};

			ovl0_to_wdma0: endpoint at 1 {
				remote-endpoint = <&wdma0_from_ovl0>;
			};
		};
	};

	ovl1 at 1400d000 {
		port {
			ovl1_to_color1: endpoint at 0 {
				remote-endpoint = <&color1_from_ovl1>;
			};

			ovl1_to_wdma1: endpoint at 1 {
				remote-endpoint = <&wdma1_from_ovl1>;
			};
		};
	};

	rdma0 at 1400e000 {
		port at 0 {
			rdma0_from_od: endpoint {
				remote-endpoint = <&od_to_rdma0>;
			};
		};

		port at 1 {
			rdma0_to_ufoe: endpoint at 0 {
				remote-endpoint = <&ufoe_from_rdma0>;
			};

			rdma0_to_split0: endpoint at 1 {
				remote-endpoint = <&split0_from_rdma0>;
			};

			rdma0_to_color0: endpoint at 2 {
				remote-endpoint = <&color0_from_rdma0>;
			};
		};
	};

	rdma1 at 1400f000 {
		port at 0 {
			rdma1_from_gamma: endpoint {
				remote-endpoint = <&gamma_to_rdma1>;
			};
		};

		port at 1 {
			rdma1_to_dsi0: endpoint at 0 {
				remote-endpoint = <&dsi0_from_rdma1>;
			};

			rdma1_to_dsi1: endpoint at 1 {
				remote-endpoint = <&dsi1_from_rdma1>;
			};

			rdma1_to_dpi0: endpoint at 2 {
				remote-endpoint = <&dpi0_from_rdma1>;
			};

			rdma1_to_color1: endpoint at 3 {
				remote-endpoint = <&color1_from_rdma1>;
			};
		};
	};

	rdma2 at 14010000 {
		port {
			rdma2_to_dsi1: endpoint at 0 {
				remote-endpoint = <&dsi1_from_rdma2>;
			};

			rdma2_to_dpi0: endpoint at 1 {
				remote-endpoint = <&dpi0_from_rdma2>;
			};
		};
	};

	wdma0 at 14011000 {
		port {
			wdma0_from_ovl0: endpoint at 0 {
				remote-endpoint = <&ovl0_to_wdma0>;
			};

			wdma0_from_od: endpoint at 1 {
				remote-endpoint = <&od_to_wdma0>;
			};

			wdma0_from_ufoe: endpoint at 2 {
				remote-endpoint = <&ufoe_to_wdma0>;
			};
		};
	};

	wdma1 at 14012000 {
		port {
			wdma1_from_ovl1: endpoint at 0 {
				remote-endpoint = <&ovl1_to_wdma1>;
			};

			wdma1_from_gamma: endpoint at 1 {
				remote-endpoint = <&gamma_to_wdma1>;
			};
		};
	};

	color0 at 14013000 {
		port at 0 {
			color0_from_rdma0: endpoint at 0 {
				remote-endpoint = <&rdma0_to_color0>;
			};

			color0_from_ovl0: endpoint at 1 {
				remote-endpoint = <&ovl0_to_color0>;
			};
		};

		port at 1 {
			color0_to_aal: endpoint at 0 {
				remote-endpoint = <&aal_from_color0>;
			};

			color0_to_merge: endpoint at 1 {
				remote-endpoint = <&merge_from_color0>;
			};
		};
	};

	color1 at 14014000 {
		port at 0 {
			color1_from_rdma1: endpoint at 0 {
				remote-endpoint = <&rdma1_to_color1>;
			};

			color1_from_ovl1: endpoint at 1 {
				remote-endpoint = <&ovl1_to_color1>;
			};
		};

		port at 1 {
			color1_to_gamma: endpoint at 0 {
				remote-endpoint = <&gamma_from_color1>;
			};

			color1_to_merge: endpoint at 1 {
				remote-endpoint = <&merge_from_color1>;
			};
		};
	};

	aal at 14015000 {
		port at 0 {
			aal_from_color0: endpoint at 0 {
				remote-endpoint = <&color0_to_aal>;
			};

			aal_from_merge: endpoint at 1 {
				remote-endpoint = <&merge_to_aal>;
			};
		};

		port at 1 {
			aal_to_od: endpoint {
				remote-endpoint = <&od_from_aal>;
			};
		};
	};

	gamma at 14016000 {
		port at 0 {
			gamma_from_color1: endpoint {
				remote-endpoint = <&color1_to_gamma>;
			};
		};

		port at 1 {
			gamma_to_rdma1: endpoint at 0 {
				remote-endpoint = <&rdma1_from_gamma>;
			};

			gamma_to_dsi0: endpoint at 1 {
				remote-endpoint = <&dsi0_from_gamma>;
			};

			gamma_to_dsi1: endpoint at 2 {
				remote-endpoint = <&dsi1_from_gamma>;
			};

			gamma_to_dpi0: endpoint at 3 {
				remote-endpoint = <&dpi0_from_gamma>;
			};

			gamma_to_wdma1: endpoint at 4 {
				remote-endpoint = <&wdma1_from_gamma>;
			};
		};
	};

	merge at 14017000 {
		port at 0 {
			merge_from_color0: endpoint {
				remote-endpoint = <&color0_to_merge>;
			};
		};

		port at 1 {
			merge_from_color1: endpoint {
				remote-endpoint = <&color1_to_merge>;
			};
		};

		port at 2 {
			merge_to_aal: endpoint {
				remote-endpoint = <&aal_from_merge>;
			};
		};
	};

	split0 at 14018000 {
		port at 0 {
			split0_from_rdma0: endpoint at 0 {
				remote-endpoint = <&rdma0_to_split0>;
			};

			split0_from_od: endpoint at 1 {
				remote-endpoint = <&od_to_split0>;
			};
		};

		port at 1 {
			split0_to_ufoe: endpoint {
				remote-endpoint = <&ufoe_from_split0>;
			};
		};

		port at 2 {
			split0_to_dsi0: endpoint at 0 {
				remote-endpoint = <&dsi0_from_split0>;
			};

			split0_to_dsi1: endpoint at 1 {
				remote-endpoint = <&dsi1_from_split0>;
			};

			split0_to_dpi0: endpoint at 2 {
				remote-endpoint = <&dpi0_from_split0>;
			};
		};
	};

	split1 at 14019000 {
		port at 0 {
			split1_from_ufoe: endpoint {
				remote-endpoint = <&ufoe_to_split1>;
			};
		};

		port at 1 {
			split1_to_dsi0: endpoint {
				remote-endpoint = <&dsi0_from_split1>;
			};
		};

		port at 2 {
			split1_to_dsi1: endpoint {
				remote-endpoint = <&dsi1_from_split1>;
			};
		};
	};

	ufoe at 1401a000 {
		port at 0 {
			ufoe_from_rdma0: endpoint at 0 {
				remote-endpoint = <&rdma0_to_ufoe>;
			};

			ufoe_from_od: endpoint at 1 {
				remote-endpoint = <&od_to_ufoe>;
			};

			ufoe_from_split0: endpoint at 2 {
				remote-endpoint = <&split0_to_ufoe>;
			};
		};

		port at 1 {
			ufoe_to_dsi0: endpoint at 0 {
				remote-endpoint = <&dsi0_from_ufoe>;
			};

			ufoe_to_split1: endpoint at 1 {
				remote-endpoint = <&split1_from_ufoe>;
			};

			ufoe_to_dpi0: endpoint at 2 {
				remote-endpoint = <&dpi0_from_ufoe>;
			};

			ufoe_to_wdma0: endpoint at 3 {
				remote-endpoint = <&wdma0_from_ufoe>;
			};

			ufoe_to_dsi1: endpoint at 4 {
				remote-endpoint = <&dsi1_from_ufoe>;
			};
		};
	};

	dsi0: dsi0 at 1401b000 {
		port at 0 {
			dsi0_from_ufoe: endpoint at 0 {
				remote-endpoint = <&ufoe_to_dsi0>;
			};

			dsi0_from_split1: endpoint at 1 {
				remote-endpoint = <&split1_to_dsi0>;
			};

			dsi0_from_rdma1: endpoint at 2 {
				remote-endpoint = <&rdma1_to_dsi0>;
			};

			dsi0_from_gamma: endpoint at 3 {
				remote-endpoint = <&gamma_to_dsi0>;
			};

			dsi0_from_split0: endpoint at 4 {
				remote-endpoint = <&split0_to_dsi0>;
			};
		};
	};

	dsi1: dsi1 at 1401c000 {
		port at 0 {
			dsi1_from_split1: endpoint at 0 {
				remote-endpoint = <&split1_to_dsi1>;
			};

			dsi1_from_rdma1: endpoint at 1 {
				remote-endpoint = <&rdma1_to_dsi1>;
			};

			dsi1_from_gamma: endpoint at 2 {
				remote-endpoint = <&gamma_to_dsi1>;
			};

			dsi1_from_split0: endpoint at 3 {
				remote-endpoint = <&split0_to_dsi1>;
			};

			dsi1_from_rdma2: endpoint at 4 {
				remote-endpoint = <&rdma2_to_dsi1>;
			};

			dsi1_from_ufoe: endpoint at 5 {
				remote-endpoint = <&ufoe_to_dsi1>;
			};
		};
	};

	dpi0: dpi0 at 1401d000 {
		port at 0 {
			dpi0_from_ufoe: endpoint at 0 {
				remote-endpoint = <&ufoe_to_dpi0>;
			};

			dpi0_from_rdma1: endpoint at 1 {
				remote-endpoint = <&rdma1_to_dpi0>;
			};

			dpi0_from_gamma: endpoint at 2 {
				remote-endpoint = <&gamma_to_dpi0>;
			};

			dpi0_from_split0: endpoint at 3 {
				remote-endpoint = <&split0_to_dpi0>;
			};

			dpi0_from_rdma2: endpoint at 4 {
				remote-endpoint = <&rdma2_to_dpi0>;
			};
		};
	};

	od at 14023000 {
		port at 0 {
			od_from_aal: endpoint {
				remote-endpoint = <&aal_to_od>;
			};
		};

		port at 1 {
			od_to_rdma0: endpoint at 0 {
				remote-endpoint = <&rdma0_from_od>;
			};

			od_to_ufoe: endpoint at 1 {
				remote-endpoint = <&ufoe_from_od>;
			};

			od_to_split0: endpoint at 2 {
				remote-endpoint = <&split0_from_od>;
			};

			od_to_wdma0: endpoint at 3 {
				remote-endpoint = <&wdma0_from_od>;
			};
		};
	};

Adding the graph to the mediatek oak-rev3 device tree increases the size
from currently 33 KiB to 41.5 KiB.
As a proponent of the of-graph bindings I certainly like to describe the
hardware connections using DT, but I'm not sure if maybe this is a bit
verbose.

regards
Philipp



More information about the dri-devel mailing list