From: Bob Paauwe <bob.j.paauwe@intel.com>
To: isg-gms <isg-gms@eclists.intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: [PATCH] drm/i915/bxt: Bring MIPI out of reset
Date: Thu, 4 Aug 2016 11:16:05 -0700 [thread overview]
Message-ID: <1470334565-17911-1-git-send-email-bob.j.paauwe@intel.com> (raw)
and power up the DSI regulator when initializing a MIPI display.
Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++
drivers/gpu/drm/i915/intel_dsi.c | 13 +++++++++++++
2 files changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6607aaf..da29d74 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1262,11 +1262,19 @@ enum skl_disp_power_wells {
#define CHV_TX_DW14(ch, lane) _TXLANE(ch, lane, 0xb8)
#define DPIO_UPAR_SHIFT 30
+/* BXT DSI Regulator registers */
+#define BXT_DSI_CFG _MMIO(0x160020)
+#define STRAP_SELECT (1 << 0)
+
+#define BXT_DSI_TXCNTRL _MMIO(0x160054)
+#define HS_IO_CONTROL_SELECT 0x0
+
/* BXT PHY registers */
#define _BXT_PHY(phy, a, b) _MMIO_PIPE((phy), (a), (b))
#define BXT_P_CR_GT_DISP_PWRON _MMIO(0x138090)
#define GT_DISPLAY_POWER_ON(phy) (1 << (phy))
+#define MIPIO_RST_CTRL (1 << 2)
#define _PHY_CTL_FAMILY_EDP 0x64C80
#define _PHY_CTL_FAMILY_DDI 0x64C90
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index b2d2cba..c2aa9e1 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -549,6 +549,19 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder)
I915_WRITE(DSPCLK_GATE_D, tmp);
}
+ if (IS_BROXTON(dev)) {
+ /*
+ * Bring the MIPI IO out of reset and power up
+ * the DSI regulator.
+ */
+ tmp = I915_READ(BXT_P_CR_GT_DISP_PWRON);
+ tmp |= MIPIO_RST_CTRL;
+ I915_WRITE(BXT_P_CR_GT_DISP_PWRON, tmp);
+
+ I915_WRITE(BXT_DSI_CFG, STRAP_SELECT);
+ I915_WRITE(BXT_DSI_TXCNTRL, HS_IO_CONTROL_SELECT);
+ }
+
/* put device in ready state */
intel_dsi_device_ready(encoder);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-08-04 18:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 18:16 Bob Paauwe [this message]
2016-08-05 5:24 ` ✗ Ro.CI.BAT: failure for drm/i915/bxt: Bring MIPI out of reset Patchwork
2016-08-05 22:23 ` [isg-gms] [PATCH] " Xiong, James
2016-08-05 23:15 ` Bob Paauwe
2016-08-19 10:04 ` Jani Nikula
2016-08-19 15:59 ` Bob Paauwe
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=1470334565-17911-1-git-send-email-bob.j.paauwe@intel.com \
--to=bob.j.paauwe@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=isg-gms@eclists.intel.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.