devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Rob Herring <robh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Paul Bolle <pebolle@tiscali.nl>, YT Shen <yt.shen@mediatek.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Cawa Cheng <cawa.cheng@mediatek.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-mediatek@lists.infradead.org,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Kumar Gala <galak@codeaurora.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [RFC v2 1/4] dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding
Date: Mon, 21 Sep 2015 10:11:07 +0200	[thread overview]
Message-ID: <1442823067.3277.35.camel@pengutronix.de> (raw)
In-Reply-To: <CAL_JsqLZQXMoKxGZ6c56e6d1UuLiJKzVB=sH15ihTvwpOgSU8Q@mail.gmail.com>

Hi Rob,

thank you for the comments.

Am Freitag, den 18.09.2015, 15:33 -0500 schrieb Rob Herring:
[...]
> > +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.

Ok. The reason I haven't grouped all the display nodes together in the
first place is that they aren't contiguous in the register space. So
instead of:

	ovl@1400c000 {
		compatible = "mediatek,mt8173-disp-ovl";
	};
	...
	ufoe@1401a000 {
		compatible = "mediatek,mt8173-disp-ufoe";
	};

	pwm@1401e000 {
		compatible = "mediatek,mt8173-disp-pwm";
	};

	larb@14021000 {
		compatible = "mediatek,mt8173-smi-larb";
	};

	od@14023000 {
		compatible = "mediatek,mt8173-disp-od";
	};

We'd have:

	display-subsystem@1400c00 {
		compatible = "mediatek,mt8173-disp", "simple-bus";

		ovl@1400c000 {
			compatible = "mediatek,mt8173-disp-ovl";
		};
		...
		ufoe@1401a000 {
			compatible = "mediatek,mt8173-disp-ufoe";
		};

		od@14023000 {
			compatible = "mediatek,mt8173-disp-od";
		};
	};

	pwm@1401e000 {
		compatible = "mediatek,mt8173-disp-pwm";
	};

	larb@14021000 {
		compatible = "mediatek,mt8173-smi-larb";
	};

Note how the display-subsystem node overlaps the larb node. Is that
acceptable?

[...]
> > diff --git a/Documentation/devicetree/bindings/drm/mediatek/mediatek,dsi.txt b/Documentation/devicetree/bindings/drm/mediatek/mediatek,dsi.txt
> > new file mode 100644
> > index 0000000..e892ef1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/drm/mediatek/mediatek,dsi.txt
> > @@ -0,0 +1,29 @@
> > +Mediatek DSI Device
> > +===================
> > +
> > +The Mediatek DSI function block is a sink of the display subsystem and can
> > +drive up to 4-lane MIPI DSI output. Two DSIs can be synchronized for dual-
> > +channel output.
> > +
> > +Required properties:
> > +- compatible: "mediatek,<chip>-dsi"
> > +- reg: Physical base address and length of the controller's registers
> > +- clocks: device clocks
> > +  See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
> > +- clock-names: must contain "engine" and "digital".
> 
> This leaves wondering which one is used for DSI bit clock.

The MIPI_TX0 module controls the MIPI D-PHY. It contains a PLL that
provides the bit clock to the DSI module.

From the documentation, it looks to me like the AP_PLL_CON0[6] bit in
the mediatek,mt8173-apmixedsys region gates the 26 MHz reference clock
to MIPI_TX. It is enabled by default. Currently there is no gate clock
registered for that bit.
Can somebody confirm that this gate clock should be added to the
mediatek,mt8173-apmixedsys bindings?

> > +
> > +Example:
> > +
> > +dsi0: dsi@1401b000 {
> > +       compatible = "mediatek,mt8173-dsi";
> > +       reg = <0 0x1401b000 0 0x1000>,  /* DSI0 */
> > +             <0 0x10215000 0 0x1000>;  /* MIPI_TX0 */

Thinking about it, MIPI_TX0 is for PHY control. Should this be moved
into its own node and the phy bindings used to let the DSI driver find
it?

> > +       clocks = <&mmsys MM_DSI0_ENGINE>, <&mmsys MM_DSI0_DIGITAL>;
> > +       clock-names = "engine", "digital";
> > +
> > +       port {
> 
> Missing from the binding description.

Thanks, I'll fix that next round.

> > +               dsi0_out: endpoint {
> > +                       remote-endpoint = <&panel_in>;
> > +               };
> > +       };
> > +};

best regards
Philipp

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-21  8:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 16:11 [RFC v2 0/4] MT8173 DRM support Philipp Zabel
2015-09-18 16:11 ` [RFC v2 1/4] dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding Philipp Zabel
     [not found]   ` <1442592722-29004-2-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-18 20:33     ` Rob Herring
2015-09-21  8:11       ` Philipp Zabel [this message]
     [not found]         ` <1442823067.3277.35.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-30 17:13           ` Rob Herring
2015-10-01  8:59             ` Philipp Zabel
2015-10-01 12:58               ` Rob Herring
2015-10-01 14:29                 ` Daniel Kurtz
     [not found]                   ` <CAGS+omAs4Jvu7tKEMoNL9BSMQMwW=9UHzXW8_jS=5MbajaJzOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-02  7:40                     ` Philipp Zabel
2015-10-02 13:47                       ` Daniel Kurtz
     [not found]                         ` <CAGS+omC3M71q8XMRevnM-_aocZXryK7NFDnVnJCdiG6tM-PjUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-02 14:33                           ` Philipp Zabel
2015-10-23 12:29                   ` Rob Herring
     [not found]                 ` <CAL_Jsq+aBxjvPyAR3nUtXny6JwgcopSCENrBaGzo7OKXFA1cvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-02  7:18                   ` Philipp Zabel
2015-10-02 14:24                     ` Rob Herring
     [not found]                       ` <CAL_JsqJhoysg=39gsArwmxf3xpzeXeHhxJ7THq4SbVc-NyertQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-02 14:51                         ` Philipp Zabel
2015-09-30 15:30       ` Philipp Zabel
2015-09-30 16:57         ` Rob Herring
2015-10-01  8:59           ` Philipp Zabel
2015-09-18 16:12 ` [RFC v2 2/4] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173 Philipp Zabel
     [not found]   ` <1442592722-29004-3-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-22  9:38     ` Daniel Vetter
     [not found]       ` <20150922093842.GE3383-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2015-09-22 10:06         ` Philipp Zabel
2015-09-18 16:12 ` [RFC v2 3/4] drm/mediatek: Add DSI sub driver Philipp Zabel
2015-09-18 16:12 ` [RFC v2 4/4] drm/mediatek: Add DRM-based framebuffer device Philipp Zabel
2015-09-22  9:29   ` Daniel Vetter
     [not found]     ` <20150922092951.GD3383-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2015-09-22 10:35       ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442823067.3277.35.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=cawa.cheng@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jitao.shi@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=pebolle@tiscali.nl \
    --cc=robh@kernel.org \
    --cc=yt.shen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).