Received: by 10.213.65.68 with SMTP id h4csp786620imn; Tue, 13 Mar 2018 23:12:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELsPnRCxSNs4FMcciNFLhhYmQ9cxYNv1/HwunuZJmokx9DyBES/jth9Kfv0TaVvmvwyEw33t X-Received: by 10.98.182.26 with SMTP id j26mr3114194pff.223.1521007939197; Tue, 13 Mar 2018 23:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521007939; cv=none; d=google.com; s=arc-20160816; b=SjPCibbO2MC35d3GqV4SBIzGSdBUhEg0C3vl9o3yRpuUDLEUSIyCYkfmZBT6ngo+xX fQ1/ZBDRrFY2oQKCpyL1vXGLWLl0/pRM3KWq60SB3dydiLfeeZfM8bGnClKTumN9D5Ll H+nb8mp3dk26RsdUpd38itsi6Yvv+g71zgdD+uXGph21bu96pKxvnHMFyDA/XA2/1nTp cLxZsxq91LeX6trjeU7Jpsi3787+Ksy4O3dARiX46DXxTRPl7ncZhk7mKaQb8VhVJCt4 qIMwFAsARemihknGS4rO0v5kcf1leK86vpzGiua0ZDpO+DpjoUI151oksimxpnx4oxMu Fw1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=Z0eyKRrGQfI69zXmzh5cjgMd4a+wE+FARSZwk1rNtBc=; b=Uy5k4X8/y0NsNiZ2IozK8BuBYzqaAAmKHIWkCEvEbsPrS5IT0a5/+8EJbCTquHLFBP QzzFEPn0zvFr31q46t7a69yYmtQxhjLON59ow4WKz9oD5u6U+23UK0mpvPYFfuTbDG/F yoVIegVWXJTaEjXDXkkFDdO5s4pyrWTSs25bAzkXs/ucsmkkAx9eTMjAfzo2YZ67vh0k +gqilMMz/qL0GzbErEkI9X4GnxOZQq4a1PxwvdQknjr9MJ16P2rlp+nTxJ46+vuaHx+B sXsfSI0pXl2IXpDWNccDXiVP6W1wINL3WAZxXLWEK+GawX4S7XjOGmWXEex5t/54+10+ sS9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OwLB7HBl; dkim=pass header.i=@codeaurora.org header.s=default header.b=odxJcTlw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si1406489plg.364.2018.03.13.23.12.04; Tue, 13 Mar 2018 23:12:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OwLB7HBl; dkim=pass header.i=@codeaurora.org header.s=default header.b=odxJcTlw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbeCNGLF (ORCPT + 99 others); Wed, 14 Mar 2018 02:11:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36428 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbeCNGLC (ORCPT ); Wed, 14 Mar 2018 02:11:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5CA6160F71; Wed, 14 Mar 2018 06:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007862; bh=aU0FEUJF0InlIiZrGSRMSDcrXTCigcz+ZeEPa+pS3OU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OwLB7HBlGWy2+ks6hgb7fZEpy19D83/FtNj6HfgWThb/M/df67CMRlT+yemHQ9+Xa ErFD0uIrustaUEr4oD7B8ohYKLbBSvEc3jYQaFOIyC+0BWkh+xwIVAGoPNrJk0fT6V tZzBvPRFgnXRkAXoCBOjW5RpYbzgLOET4mIUkiAc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.84] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B636607A2; Wed, 14 Mar 2018 06:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007859; bh=aU0FEUJF0InlIiZrGSRMSDcrXTCigcz+ZeEPa+pS3OU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=odxJcTlw/11MaqxK4jMESaXHTBjF9JGyPYuMaX2dPTEwPfupJFjUszykkwtgVdldI kKukj7wGdquqx2BKD8nHf2HT2BKY1d2sqoTPEsfaYmmuziVW9eUNuAjr/IB0RQ0u18 oX+HxK8hMcwElhtUjO8q2rpAOoq2MPzwCJVLTXPU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0B636607A2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v5 12/36] drm/bridge: analogix_dp: Set PD_INC_BG first when powering up edp phy To: Enric Balletbo i Serra , inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, =?UTF-8?Q?St=c3=a9phane_Marchesin?= References: <20180309222327.18689-1-enric.balletbo@collabora.com> <20180309222327.18689-13-enric.balletbo@collabora.com> From: Archit Taneja Message-ID: Date: Wed, 14 Mar 2018 11:40:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309222327.18689-13-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 March 2018 03:53 AM, Enric Balletbo i Serra wrote: > From: zain wang > > Following the correct power up sequence: > dp_pd=ff => dp_pd=7f => wait 10us => dp_pd=00 > Reviewed-by: Archit Taneja Thanks, Archit > Cc: Stéphane Marchesin > Signed-off-by: zain wang > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 ++++++++-- > drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h | 3 +++ > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > index b47c5af43560..bb72f8b0e603 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > @@ -321,10 +321,16 @@ void analogix_dp_set_analog_power_down(struct analogix_dp_device *dp, > break; > case POWER_ALL: > if (enable) { > - reg = DP_PHY_PD | AUX_PD | CH3_PD | CH2_PD | > - CH1_PD | CH0_PD; > + reg = DP_ALL_PD; > writel(reg, dp->reg_base + phy_pd_addr); > } else { > + reg = DP_ALL_PD; > + writel(reg, dp->reg_base + phy_pd_addr); > + usleep_range(10, 15); > + reg &= ~DP_INC_BG; > + writel(reg, dp->reg_base + phy_pd_addr); > + usleep_range(10, 15); > + > writel(0x00, dp->reg_base + phy_pd_addr); > } > break; > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h > index 40200c652533..9602668669f4 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h > @@ -342,12 +342,15 @@ > #define DP_PLL_REF_BIT_1_2500V (0x7 << 0) > > /* ANALOGIX_DP_PHY_PD */ > +#define DP_INC_BG (0x1 << 7) > +#define DP_EXP_BG (0x1 << 6) > #define DP_PHY_PD (0x1 << 5) > #define AUX_PD (0x1 << 4) > #define CH3_PD (0x1 << 3) > #define CH2_PD (0x1 << 2) > #define CH1_PD (0x1 << 1) > #define CH0_PD (0x1 << 0) > +#define DP_ALL_PD (0xff) > > /* ANALOGIX_DP_PHY_TEST */ > #define MACRO_RST (0x1 << 5) >