From: Rahul Sharma <rahul.sharma@samsung.com>
To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org
Cc: inki.dae@samsung.com, r.sh.open@gmail.com, joshi@samsung.com,
Shirish S <s.shirish@samsung.com>,
Rahul Sharma <rahul.sharma@samsung.com>
Subject: [PATCH 5/7] drm/exynos: add hdmiphy power on/off sequence
Date: Thu, 03 Apr 2014 20:41:02 +0530 [thread overview]
Message-ID: <1396537864-29291-6-git-send-email-rahul.sharma@samsung.com> (raw)
In-Reply-To: <1396537864-29291-1-git-send-email-rahul.sharma@samsung.com>
From: Shirish S <s.shirish@samsung.com>
This patch implements the power on/off sequence
of HDMI PHY in exynos5420 and exynos5250 as provided
by the hardware team.
This has been verified for mulitple iterations of
S2R.
Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com>
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 40 +++++++++++++++++++++++++++++-----
drivers/gpu/drm/exynos/regs-hdmi.h | 7 +++++-
2 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 539e603..b2cbf43 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1711,16 +1711,44 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata)
static void hdmiphy_poweron(struct hdmi_context *hdata)
{
- if (hdata->type == HDMI_TYPE14)
- hdmi_reg_writemask(hdata, HDMI_PHY_CON_0, 0,
- HDMI_PHY_POWER_OFF_EN);
+ if (hdata->type != HDMI_TYPE14)
+ return;
+
+ DRM_DEBUG_KMS("\n");
+
+ /* For PHY Mode Setting */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
+ HDMI_PHY_ENABLE_MODE_SET);
+ /* Phy Power On */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_POWER,
+ HDMI_PHY_POWER_ON);
+ /* For PHY Mode Setting */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
+ HDMI_PHY_DISABLE_MODE_SET);
+ /* PHY SW Reset */
+ hdmiphy_conf_reset(hdata);
}
static void hdmiphy_poweroff(struct hdmi_context *hdata)
{
- if (hdata->type == HDMI_TYPE14)
- hdmi_reg_writemask(hdata, HDMI_PHY_CON_0, ~0,
- HDMI_PHY_POWER_OFF_EN);
+ if (hdata->type != HDMI_TYPE14)
+ return;
+
+ DRM_DEBUG_KMS("\n");
+
+ /* PHY SW Reset */
+ hdmiphy_conf_reset(hdata);
+ /* For PHY Mode Setting */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
+ HDMI_PHY_ENABLE_MODE_SET);
+
+ /* PHY Power Off */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_POWER,
+ HDMI_PHY_POWER_OFF);
+
+ /* For PHY Mode Setting */
+ hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
+ HDMI_PHY_DISABLE_MODE_SET);
}
static void hdmiphy_conf_apply(struct hdmi_context *hdata)
diff --git a/drivers/gpu/drm/exynos/regs-hdmi.h b/drivers/gpu/drm/exynos/regs-hdmi.h
index 344a5db..fd4c590 100644
--- a/drivers/gpu/drm/exynos/regs-hdmi.h
+++ b/drivers/gpu/drm/exynos/regs-hdmi.h
@@ -579,7 +579,12 @@
#define HDMI_TG_3D HDMI_TG_BASE(0x00F0)
/* HDMI PHY Registers Offsets*/
-#define HDMIPHY_MODE_SET_DONE (0x7C >> 2)
+#define HDMIPHY_POWER (0x74 >> 2)
+#define HDMIPHY_MODE_SET_DONE (0x7c >> 2)
+
+/* HDMI PHY Values */
+#define HDMI_PHY_POWER_ON 0x80
+#define HDMI_PHY_POWER_OFF 0xff
/* HDMI PHY Values */
#define HDMI_PHY_DISABLE_MODE_SET 0x80
--
1.7.9.5
next prev parent reply other threads:[~2014-04-03 15:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 15:10 [PATCH 0/7] drm/exynos: fixes for hdmi related issues Rahul Sharma
2014-04-03 15:10 ` [PATCH 1/7] drm/exynos: Don't reset hdmiphy on hdmi off Rahul Sharma
2014-04-03 15:10 ` [PATCH 2/7] drm/exynos: Debounce HDMI hotplug interrupts Rahul Sharma
2014-04-03 15:11 ` [PATCH 3/7] drm/exynos: check for null pointers in error handling Rahul Sharma
2014-04-03 15:11 ` [PATCH 4/7] drm/exynos: hdmi: remove unnecessary memset Rahul Sharma
2014-04-03 15:11 ` Rahul Sharma [this message]
2014-05-22 14:15 ` [PATCH 5/7] drm/exynos: add hdmiphy power on/off sequence Rahul Sharma
2014-04-03 15:11 ` [PATCH 6/7] drm/exynos: Read hpd gpio in is_connected callback Rahul Sharma
2014-04-03 15:11 ` [PATCH 7/7] drm/exynos: replace hdmi reset with hdmi disable Rahul Sharma
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=1396537864-29291-6-git-send-email-rahul.sharma@samsung.com \
--to=rahul.sharma@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=joshi@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=r.sh.open@gmail.com \
--cc=s.shirish@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.