linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: dri-devel@lists.freedesktop.org,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-renesas-soc@vger.kernel.org,
	Ulrich Hecht <ulrich.hecht@gmail.com>,
	Andy Yan <andy.yan@rock-chips.com>,
	Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Subject: Re: [PATCH v2 17/29] drm: bridge: dw-hdmi: Refactor PHY power handling
Date: Fri, 06 Jan 2017 16:52:15 +0200	[thread overview]
Message-ID: <1781659.ynIBoqkrKC@avalon> (raw)
In-Reply-To: <fdc8c0fb-9028-2679-a75e-5d485acdd158@synopsys.com>

Hi Jose,

On Friday 06 Jan 2017 10:07:03 Jose Abreu wrote:
> Hi Laurent,
> 
> Sorry for the delayed answer but I am quite busy at the moment.

No worries, your help is really appreciated.

> On 06-01-2017 01:48, Laurent Pinchart wrote:
> 
> [snip]
> 
> >>>> The TX_READY signal is documented in the i.MX6 datasheet as being a PHY
> >>>> output signal, but there seems to be no HDMI TX register from which its
> >>>> state can be read. Do I need to poll the HDMI_PHY_PTRPT_ENBL register
> >>>> through I2C ? How long is the PHY expected to take to set TX_READY to 0
> >>>> ?
> >>> 
> >>> TX_READY can be read from register 0x1A of phy, BIT(2) (through
> >>> I2C).
> >> 
> >> That's what I thought, I'll poll that then. Do you have any idea how long
> >> it's supposed to take, to set an appropriate timeout ?
> 
> For 3d tx phy and for 25 MHz input reference clock the power-up
> time is ~1ms, there is no data in the docs to power-down time but
> it should be similar. Reference clock value is board dependent
> and the minimum value for HDMI shall be 13.5MHz.
> 
> > On i.MX6 (3D TX PHY) register 0x1a reads as 0x0007 before powering down
> > the PHY (by deasserting TXPWRON) and as 0x0000 immediately after. On
> > RK3288 (MHL PHY) the register reads as 0x0207 and as 0x0000 immediately
> > after deasserting TXPWRON. It seems that one I2C read is a sufficient
> > delay for TX_READY to go low.
> > 
> >>> Not sure if same offset for all phys though.
> >> 
> >> Most probably not, it would be too easy :-) I'll investigate (which will
> >> likely include lots of guesswork). If you can find any information about
> >> that (and especially about the MHL and HDMI 2.0 PHYs) that would be very
> >> appreciated, as I don't have access to any documentation that mentions a
> >> TX_READY bit for those.
> > 
> > I haven't tested the HDMI 2.0 PHY yet, but I'd be surprised if the
> > TX_READY bit was in the same register at the same position.
> 
> The info I got the register offset is from an HDMI 2.0 phy :)

That's good news :-)

> Notice that there are a lot of phy versions and some of them
> (used in dw-hdmi) maybe customized, I don't think I have access
> to that custom phys documentation.

I think we will eventually have to implement PHY-specific power up and power 
down sequences, but for now a common sequence should work.

> Please test the HDMI 2.0 phy and check if the register is the same, it
> should be.

I did, and it is \o/ I'll send patches.

> In the meantime it would really be helpful if some of the developers
> that used dw-hdmi supplied this info about the registers as they
> should know exactly what phy was used.

I will ask internally for the R-Car H3 SoC.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-01-06 14:52 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20  1:33 [PATCH v2 00/29] R-Car Gen3 HDMI output support Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 01/29] drm: bridge: dw-hdmi: Merge __hdmi_phy_i2c_write and hdmi_phy_i2c_write Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 02/29] drm: bridge: dw-hdmi: Remove unneeded arguments to bind/unbind functions Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 03/29] drm: bridge: dw-hdmi: Remove unused function parameter Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 04/29] drm: bridge: dw-hdmi: Embed drm_bridge in struct dw_hdmi Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 05/29] drm: bridge: dw-hdmi: Remove encoder field from " Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 06/29] drm: bridge: dw-hdmi: Don't forward HPD events to DRM core before attach Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 07/29] drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 08/29] drm: bridge: dw-hdmi: Reorder functions to prepare for next commit Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 09/29] drm: bridge: dw-hdmi: Create connector in the bridge attach operation Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 10/29] drm: bridge: dw-hdmi: Implement DRM bridge registration Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 11/29] drm: bridge: dw-hdmi: Remove PHY configuration resolution parameter Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 12/29] drm: bridge: dw-hdmi: Rename CONF0 SPARECTRL bit to SVSRET Laurent Pinchart
2016-12-20 10:58   ` Jose Abreu
2016-12-20  1:33 ` [PATCH v2 13/29] drm: bridge: dw-hdmi: Reject invalid product IDs Laurent Pinchart
2016-12-20 10:59   ` Jose Abreu
2016-12-20  1:33 ` [PATCH v2 14/29] drm: bridge: dw-hdmi: Detect AHB audio DMA using correct register Laurent Pinchart
2016-12-20 11:00   ` Jose Abreu
2016-12-20  1:33 ` [PATCH v2 15/29] drm: bridge: dw-hdmi: Handle overflow workaround based on device version Laurent Pinchart
2016-12-20 11:32   ` Jose Abreu
2016-12-20  1:33 ` [PATCH v2 16/29] drm: bridge: dw-hdmi: Detect PHY type at runtime Laurent Pinchart
2016-12-20 11:39   ` Jose Abreu
2016-12-20 13:11     ` Laurent Pinchart
2016-12-20 15:01       ` Jose Abreu
2017-01-05  0:15         ` Laurent Pinchart
2017-01-05 10:33           ` Jose Abreu
2017-01-05 11:44             ` Laurent Pinchart
2017-01-05 14:27               ` Jose Abreu
2016-12-20  1:33 ` [PATCH v2 17/29] drm: bridge: dw-hdmi: Refactor PHY power handling Laurent Pinchart
2016-12-20 11:45   ` Russell King - ARM Linux
2016-12-20 12:17     ` Jose Abreu
2017-01-05 12:29       ` Laurent Pinchart
2017-01-05 15:06         ` Jose Abreu
2017-01-05 15:33           ` Laurent Pinchart
2017-01-06  1:48             ` Laurent Pinchart
2017-01-06 10:07               ` Jose Abreu
2017-01-06 14:52                 ` Laurent Pinchart [this message]
2017-03-01 11:09           ` Laurent Pinchart
2017-03-01 16:25             ` Jose Abreu
2017-03-01 22:47               ` Laurent Pinchart
2016-12-20 13:50     ` Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 18/29] drm: bridge: dw-hdmi: Move CSC configuration out of PHY code Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 19/29] drm: bridge: dw-hdmi: Add support for custom PHY configuration Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 20/29] drm: bridge: dw-hdmi: Remove device type from platform data Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 21/29] dt-bindings: display: dw-hdmi: Clean up DT bindings documentation Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 22/29] dt-bindings: display: renesas: Add R-Car Gen3 HDMI TX DT bindings Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 23/29] drm: rcar-du: Add Gen3 HDMI encoder support Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 24/29] drm: rcar-du: Skip disabled outputs Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 25/29] drm: rcar-du: Add DPLL support Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 26/29] drm: rcar-du: Add HDMI outputs to R8A7795 device description Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 27/29] arm64: dts: r8a7795: Add HDMI encoder support Laurent Pinchart
2016-12-20  1:33 ` [PATCH v2 28/29] arm64: dts: r8a7795: salvator-x: Enable HDMI outputs Laurent Pinchart
2016-12-20  1:34 ` [PATCH v2 29/29] arm64: dts: r8a7795: salvator-x: Add DU1 and DU2 external dot clocks Laurent Pinchart

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=1781659.ynIBoqkrKC@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andy.yan@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@freescale.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ulrich.hecht@gmail.com \
    --cc=vladimir_zapolskiy@mentor.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).