From patchwork Fri Aug 5 22:23:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Xiong X-Patchwork-Id: 9265761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79C2A60839 for ; Fri, 5 Aug 2016 22:23:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E5FF28457 for ; Fri, 5 Aug 2016 22:23:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DFBF2848C; Fri, 5 Aug 2016 22:23:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B365B28457 for ; Fri, 5 Aug 2016 22:23:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F213A6EC58; Fri, 5 Aug 2016 22:23:24 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 042266EC58 for ; Fri, 5 Aug 2016 22:23:23 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 05 Aug 2016 15:23:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,475,1464678000"; d="scan'208";a="860577396" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 05 Aug 2016 15:23:23 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.243]) by FMSMSX106.amr.corp.intel.com ([10.18.124.204]) with mapi id 14.03.0248.002; Fri, 5 Aug 2016 15:23:23 -0700 From: "Xiong, James" To: "Paauwe, Bob J" , isg-gms , intel-gfx Thread-Topic: [isg-gms] [PATCH] drm/i915/bxt: Bring MIPI out of reset Thread-Index: AQHR7nw6yaZMNOxbR0mz801qk/HmlqA67dwQ Date: Fri, 5 Aug 2016 22:23:23 +0000 Message-ID: <83E9754AABFD724886879E166F79B1DA0D325FE0@fmsmsx101.amr.corp.intel.com> References: <1470334565-17911-1-git-send-email-bob.j.paauwe@intel.com> In-Reply-To: <1470334565-17911-1-git-send-email-bob.j.paauwe@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWQ4MzZlY2MtMDY2ZS00ZGFiLWExYzctNDlkOTI1MjU4NzQ4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlMzRTZtMTVtT3ZHcTRSNW9zXC9GZzh3Q3RXVm9cL1hQZVBcL2l4b2duUEROY2M9In0= x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [isg-gms] [PATCH] drm/i915/bxt: Bring MIPI out of reset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by James Xiong -----Original Message----- From: isg-gms-request@eclists.intel.com [mailto:isg-gms-request@eclists.intel.com] On Behalf Of Paauwe, Bob J Sent: Thursday, August 4, 2016 11:16 AM To: isg-gms ; intel-gfx Cc: Paauwe, Bob J Subject: [isg-gms] [PATCH] drm/i915/bxt: Bring MIPI out of reset and power up the DSI regulator when initializing a MIPI display. Signed-off-by: Bob Paauwe --- drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ drivers/gpu/drm/i915/intel_dsi.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) -- 2.7.4 ------------------------------------- isg-gms@eclists.intel.com https://eclists.intel.com/sympa/info/isg-gms Unsubscribe by sending email to sympa@eclists.intel.com with subject "Unsubscribe isg-gms" 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);