devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: "dmitry.baryshkov@linaro.org" <dmitry.baryshkov@linaro.org>,
	"andrzej.hajda@intel.com" <andrzej.hajda@intel.com>,
	"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"jonas@kwiboo.se" <jonas@kwiboo.se>,
	"jernej.skrabec@gmail.com" <jernej.skrabec@gmail.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-phy@lists.infradead.org" <li nux-phy@lists.infradead.org>,
	Sandor Yu <sandor.yu@nxp.com>
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	Oliver Brown <oliver.brown@nxp.com>,
	"sam@ravnborg.org" <sam@ravnborg.org>
Subject: Re: [PATCH v14 7/7] phy: freescale: Add HDMI PHY driver for i.MX8MQ
Date: Wed, 21 Feb 2024 15:32:01 +0100	[thread overview]
Message-ID: <1880037.tdWV9SEqCh@steina-w> (raw)
In-Reply-To: <PAXPR04MB9448DE5926B60C36D5BFC96AF4572@PAXPR04MB9448.eurprd04.prod.outlook.com>

Hi Sandor,

Am Mittwoch, 21. Februar 2024, 08:47:52 CET schrieb Sandor Yu:
> Hi Alexander,
> 
> Thanks for your comments,
> 
> >
> > Hi,
> >
> > thanks for the update.
> >
> > Am Dienstag, 20. Februar 2024, 04:23:55 CET schrieb Sandor Yu:
> > > Add Cadence HDP-TX HDMI PHY driver for i.MX8MQ.
> > >
> > > Cadence HDP-TX PHY could be put in either DP mode or HDMI mode base
> > on
> > > the configuration chosen.
> > > HDMI PHY mode is configurated in the driver.
> > >
> > > Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
> > > Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> >
> > This still works as before. I noticed there is a lot of code duplication with
> > patch 6. IMHO these PHY drivers should be merged into a single one where
> > the mode is configured using phy_set_mode() from cdns-mhdp8501-core.c.
> > This nicely matches my concerns regarding patch 5.
> >
> Yes, there are some registers offset are same and the clock management function could be reused for DP and HDMI PHY driver.
> But because of HDMI and DP PHY totally different work mode, the functions in struct phy_ops,
> Such as ->init, ->power_on/off and ->configure could not combine into a single one,
> So separate DP and HDMI PHY driver should be a better resolution.

Despite some output type (DP/HDMI) specific settings, the similarities
are quite huge actually. Even though apparently DP has it's own ->init setup,
this can be delayed until ->set_mode or even ->configure.
The distinction between each mode can be done by checking phy->attrs.mode.
For a prove of concept I've hacked both drivers into a single one. I can't
test DP, but HDMI still works. Feel free to contact me in private.

Best regards,
Alexander

> B.R
> Sandor
> 
> 
> > Best regards,
> > Alexander
> >
> > > ---
> > > v13->v14:
> > >  *No change.
> > >
> > > v12->v13:
> > > - Fix build warning
> > >
> > > v11->v12:
> > > - Adjust clk disable order.
> > > - Return error code to replace -1 for function wait_for_ack().
> > > - Use bool for variable pclk_in.
> > > - Add year 2024 to copyright.
> > >
> > >  drivers/phy/freescale/Kconfig               |  10 +
> > >  drivers/phy/freescale/Makefile              |   1 +
> > >  drivers/phy/freescale/phy-fsl-imx8mq-hdmi.c | 960
> > > ++++++++++++++++++++
> > >  3 files changed, 971 insertions(+)
> > >  create mode 100644 drivers/phy/freescale/phy-fsl-imx8mq-hdmi.c
> > >
> > > diff --git a/drivers/phy/freescale/Kconfig
> > > b/drivers/phy/freescale/Kconfig index c39709fd700ac..14f47b7cc77ab
> > > 100644
> > > --- a/drivers/phy/freescale/Kconfig
> > > +++ b/drivers/phy/freescale/Kconfig

> [snip]

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



      reply	other threads:[~2024-02-21 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  3:23 [PATCH v14 0/7] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Sandor Yu
2024-02-20  3:23 ` [PATCH v14 1/7] drm: bridge: Cadence: Create mhdp helper driver Sandor Yu
2024-02-20  3:23 ` [PATCH v14 2/7] phy: Add HDMI configuration options Sandor Yu
2024-02-20  3:23 ` [PATCH v14 3/7] dt-bindings: display: bridge: Add Cadence MHDP8501 Sandor Yu
2024-02-20  3:23 ` [PATCH v14 4/7] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver Sandor Yu
2024-02-20  3:23 ` [PATCH v14 5/7] dt-bindings: phy: Add Freescale iMX8MQ DP and HDMI PHY Sandor Yu
2024-02-20 10:06   ` Alexander Stein
2024-02-21  7:46     ` Sandor Yu
2024-02-21 14:18       ` Alexander Stein
2024-02-20  3:23 ` [PATCH v14 6/7] phy: freescale: Add DisplayPort PHY driver for i.MX8MQ Sandor Yu
2024-02-20  3:23 ` [PATCH v14 7/7] phy: freescale: Add HDMI " Sandor Yu
2024-02-20 10:41   ` Alexander Stein
2024-02-21  7:47     ` Sandor Yu
2024-02-21 14:32       ` Alexander Stein [this message]

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=1880037.tdWV9SEqCh@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=oliver.brown@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sam@ravnborg.org \
    --cc=shawnguo@kernel.org \
    --cc=vkoul@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).