linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: Abel Vesa <abel.vesa@nxp.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Anson Huang <anson.huang@nxp.com>,
	Carlo Caione <ccaione@baylibre.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"Angus Ainslie \(Purism\)" <angus@akkea.ca>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [PATCH v2 1/2] arm64: dts: imx8mq: Add MIPI D-PHY
Date: Sun, 21 Jul 2019 13:47:07 +0200	[thread overview]
Message-ID: <20190721114707.GA10132@bogon.m.sigxcpu.org> (raw)
In-Reply-To: <20190715111027.a4wlpzex3taxymyr@fsr-ub1664-175>

Hi Abel,
On Mon, Jul 15, 2019 at 11:10:27AM +0000, Abel Vesa wrote:
> On 19-07-15 12:43:05, Guido Günther wrote:
> > Add a node for the Mixel MIPI D-PHY, "disabled" by default.
> > 
> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> > Acked-by: Angus Ainslie (Purism) <angus@akkea.ca>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > index d09b808eff87..891ee7578c2d 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > @@ -728,6 +728,19 @@
> >  				status = "disabled";
> >  			};
> >  
> > +			dphy: dphy@30a00300 {
> > +				compatible = "fsl,imx8mq-mipi-dphy";
> > +				reg = <0x30a00300 0x100>;
> > +				clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>;
> > +				clock-names = "phy_ref";
> > +				assigned-clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>;
> > +				assigned-clock-parents = <&clk IMX8MQ_VIDEO_PLL1_OUT>;
> > +				assigned-clock-rates = <24000000>;
> 
> We have the following in the clk-imx8mq in the vendor tree:
> 
> 	clk_set_parent(clks[IMX8MQ_VIDEO_PLL1_BYPASS], clks[IMX8MQ_VIDEO_PLL1]);
> 
> This unbypasses the video pll 1. And then we also have this:
> 
> 	/* config video_pll1 clock */
> 	clk_set_parent(clks[IMX8MQ_VIDEO_PLL1_REF_SEL], clks[IMX8MQ_CLK_27M]);
> 	clk_set_rate(clks[IMX8MQ_VIDEO_PLL1], 593999999);

We don't have anything like this in our tree. This is our current clock
tree in that area which is setup by either the lcdif or dcss DT:

 osc_25m                             10       12        0    25000000          0     0  50000
    video_pll1_ref_sel                1        1        0    25000000          0     0  50000
       video_pll1_ref_div             1        1        0     5000000          0     0  50000
          video_pll1                  1        1        0   593999998          0     0  50000
             video_pll1_bypass        1        1        0   593999998          0     0  50000
                video_pll1_out        2        2        0   593999998          0     0  50000
                   dsi_phy_ref        1        1        0    23760000          0     0  50000

e.g. for lcdif we have:

	lcdif: lcdif@30320000 {
		...
		clock-names = "pix";
		assigned-clocks = <&clk IMX8MQ_VIDEO_PLL1_REF_SEL>,
				  <&clk IMX8MQ_VIDEO_PLL1_BYPASS>,
				  <&clk IMX8MQ_CLK_LCDIF_PIXEL>,
				  <&clk IMX8MQ_VIDEO_PLL1>;
		assigned-clock-parents = <&clk IMX8MQ_CLK_25M>,
				  <&clk IMX8MQ_VIDEO_PLL1>,
				  <&clk IMX8MQ_VIDEO_PLL1_OUT>;
		assigned-clock-rates = <0>, <0>, <0>, <594000000>;
		...
	};

Do we want to add this add for dphy and lcdif?
Cheers,
 -- Guido

> But none of that is acceptable upstream since the clock provider should not
> use clock consumer API.
> 
> So please update the assigned-clock* properties to something like this:
> 				assigned-clocks = <&clk IMX8MQ_VIDEO_PLL1_REF_SEL>,
> 						  <&clk IMX8MQ_VIDEO_PLL1_BYPASS>,
> 						  <&clk IMX8MQ_CLK_DSI_PHY_REF>,
> 						  <&clk IMX8MQ_VIDEO_PLL1>;
> 				assigned-clock-parents = <&clk IMX8MQ_CLK_27M>,
> 							 <&clk IMX8MQ_VIDEO_PLL1>,
> 							 <&clk IMX8MQ_VIDEO_PLL1_OUT>
> 							 <0>;
> 				assigned-clock-rates = <0>,
> 						       <0>,
> 						       <24000000>,             
> 						       <593999999>;
> 
> I've written this without testing, so please do test it on your setup.

> 
> > +				#phy-cells = <0>;
> > +				power-domains = <&pgc_mipi>;
> > +				status = "disabled";
> > +			};
> > +
> >  			i2c1: i2c@30a20000 {
> >  				compatible = "fsl,imx8mq-i2c", "fsl,imx21-i2c";
> >  				reg = <0x30a20000 0x10000>;
> > -- 
> > 2.20.1
> > 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-07-21 11:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 10:43 [PATCH v2 0/2] arm64: dts: imx8mq: Add DT node for the Mixel MIPI D-PHY Guido Günther
2019-07-15 10:43 ` [PATCH v2 1/2] arm64: dts: imx8mq: Add " Guido Günther
2019-07-15 10:55   ` Lucas Stach
2019-07-15 11:10   ` Abel Vesa
2019-07-21 11:47     ` Guido Günther [this message]
2019-07-15 10:43 ` [PATCH v2 2/2] arm64: dts: imx8mq-librem5: Enable " Guido Günther
2019-07-15 10:55   ` Lucas Stach
2019-07-23  6:32 ` [PATCH v2 0/2] arm64: dts: imx8mq: Add DT node for the Mixel " Shawn Guo

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=20190721114707.GA10132@bogon.m.sigxcpu.org \
    --to=agx@sigxcpu.org \
    --cc=abel.vesa@nxp.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=angus@akkea.ca \
    --cc=anson.huang@nxp.com \
    --cc=ccaione@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).