From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B0F4C4332F for ; Thu, 17 Mar 2022 12:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233490AbiCQMVr (ORCPT ); Thu, 17 Mar 2022 08:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbiCQMVo (ORCPT ); Thu, 17 Mar 2022 08:21:44 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2092A1AA4B1 for ; Thu, 17 Mar 2022 05:20:23 -0700 (PDT) X-UUID: ca9f5fc0992e48a1b96ea7664a771e60-20220317 X-UUID: ca9f5fc0992e48a1b96ea7664a771e60-20220317 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1558619466; Thu, 17 Mar 2022 20:20:18 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 17 Mar 2022 20:20:17 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 20:20:16 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 20:20:16 +0800 Message-ID: Subject: Re: [PATCH v3,4/4] drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function From: Rex-BC Chen To: , , , , , CC: , , , , , Date: Thu, 17 Mar 2022 20:20:16 +0800 In-Reply-To: <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> References: <1647503611-13144-1-git-send-email-xinlei.lee@mediatek.com> <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Xinlei, On Thu, 2022-03-17 at 15:53 +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee > > In the dsi_enable function, mtk_dsi_rxtx_control is to > pull up the MIPI signal operation. Before dsi_disable, > MIPI should also be pulled down by writing a register instead of > disabling dsi. > What will happen if you do not pulled down the mipi before disable dsi? What's differnet for this two setting? > Signed-off-by: Jitao Shi > Signed-off-by: Xinlei Lee > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > b/drivers/gpu/drm/mediatek/mtk_dsi.c > index b509d59235e2..1c6a75a46b67 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -676,6 +676,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) > mtk_dsi_reset_engine(dsi); > mtk_dsi_lane0_ulp_mode_enter(dsi); > mtk_dsi_clk_ulp_mode_enter(dsi); > + /* set the lane number as 0 */ > + writel(0, dsi->regs + DSI_TXRX_CTRL); So set lane num to 0 means pull down mipi? BRs, Rex > > mtk_dsi_disable(dsi); > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 545B2C433F5 for ; Thu, 17 Mar 2022 12:20:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73A7110E762; Thu, 17 Mar 2022 12:20:25 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id 69E2B10E762 for ; Thu, 17 Mar 2022 12:20:24 +0000 (UTC) X-UUID: ca9f5fc0992e48a1b96ea7664a771e60-20220317 X-UUID: ca9f5fc0992e48a1b96ea7664a771e60-20220317 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1558619466; Thu, 17 Mar 2022 20:20:18 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 17 Mar 2022 20:20:17 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 20:20:16 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 20:20:16 +0800 Message-ID: Subject: Re: [PATCH v3,4/4] drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function From: Rex-BC Chen To: , , , , , Date: Thu, 17 Mar 2022 20:20:16 +0800 In-Reply-To: <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> References: <1647503611-13144-1-git-send-email-xinlei.lee@mediatek.com> <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jitao.shi@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hello Xinlei, On Thu, 2022-03-17 at 15:53 +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee > > In the dsi_enable function, mtk_dsi_rxtx_control is to > pull up the MIPI signal operation. Before dsi_disable, > MIPI should also be pulled down by writing a register instead of > disabling dsi. > What will happen if you do not pulled down the mipi before disable dsi? What's differnet for this two setting? > Signed-off-by: Jitao Shi > Signed-off-by: Xinlei Lee > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > b/drivers/gpu/drm/mediatek/mtk_dsi.c > index b509d59235e2..1c6a75a46b67 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -676,6 +676,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) > mtk_dsi_reset_engine(dsi); > mtk_dsi_lane0_ulp_mode_enter(dsi); > mtk_dsi_clk_ulp_mode_enter(dsi); > + /* set the lane number as 0 */ > + writel(0, dsi->regs + DSI_TXRX_CTRL); So set lane num to 0 means pull down mipi? BRs, Rex > > mtk_dsi_disable(dsi); > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BCB7C433F5 for ; Thu, 17 Mar 2022 12:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y2sETYH0ZXQHiefClHZk1gqVxHbgkeviTovBa/A4IQA=; b=4F+H+nqHyBHXFZ E7wdoSEhMuLGZODEuYj9lFL/yevRTCtD5chFPmyDQRJZb6aqrqQH4H1KIZpi+PIdwiC5ALuR+sJuU /ZYmQCJudqHKBg74zGN0Y3Z/e4UC3/+wAB5OBv6xOh4J/VOZz9HEcRmKGOqux8p8h9ZR5nGiHFbA3 thggiM6HhUfzR47BKEchTBTwe20I2UZuYp012BpHnaRNxn+L+V4Ut3OqeZvBNdLW2D5e7PQKHSPUg XUbk+wKN4x0jhMTNG5TozCqxPrOXRERerjZ5Ep3IK1cB3WhI1lO9nsnR/AKSCLrr4rBwMYlsSsESn jxBuU5giAetgsrmAri6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUpAp-00G3Nj-RB; Thu, 17 Mar 2022 12:24:11 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUp7L-00G1yA-4u; Thu, 17 Mar 2022 12:20:36 +0000 X-UUID: e95357d02243458591033255dd56c2e7-20220317 X-UUID: e95357d02243458591033255dd56c2e7-20220317 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 28381165; Thu, 17 Mar 2022 05:20:33 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 05:20:31 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 20:20:16 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 20:20:16 +0800 Message-ID: Subject: Re: [PATCH v3,4/4] drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function From: Rex-BC Chen To: , , , , , CC: , , , , , Date: Thu, 17 Mar 2022 20:20:16 +0800 In-Reply-To: <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> References: <1647503611-13144-1-git-send-email-xinlei.lee@mediatek.com> <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_052035_215613_8C63B246 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hello Xinlei, On Thu, 2022-03-17 at 15:53 +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee > > In the dsi_enable function, mtk_dsi_rxtx_control is to > pull up the MIPI signal operation. Before dsi_disable, > MIPI should also be pulled down by writing a register instead of > disabling dsi. > What will happen if you do not pulled down the mipi before disable dsi? What's differnet for this two setting? > Signed-off-by: Jitao Shi > Signed-off-by: Xinlei Lee > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > b/drivers/gpu/drm/mediatek/mtk_dsi.c > index b509d59235e2..1c6a75a46b67 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -676,6 +676,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) > mtk_dsi_reset_engine(dsi); > mtk_dsi_lane0_ulp_mode_enter(dsi); > mtk_dsi_clk_ulp_mode_enter(dsi); > + /* set the lane number as 0 */ > + writel(0, dsi->regs + DSI_TXRX_CTRL); So set lane num to 0 means pull down mipi? BRs, Rex > > mtk_dsi_disable(dsi); > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C6A5C433F5 for ; Thu, 17 Mar 2022 12:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IJHlobX2C+Mq4ZK8BH7flAPJuWwHSbNtOM7ixhZJbi4=; b=B77psLu3uE6d0Z brJn7EGSJOc2Wz1VQ/gU87BzosmnV90nF904BadHbRtBuZCgoCq1D9z+o/rKvvoBqBbZAFIzPT79Z okaPgPBnELc7qpu9o8H+w2xc6q+by/YpqYaPtb2tlDyIRIo3eDNCfPPrAxNYQLW2Z0Eo6WLmL5D05 /RIlZqnP1Ik7QLab4fivIt7JA83/7qsaV1EuKzDs61JTXkbkCBXZPWWkU2d/1Wnuqa15QnUfIMbgx 81F6Uivjk5ZOqe00o+iXKEBELCfghnb6C3IskvNIoqAumUzryDj0wXCWvnHAdIFDQc0aYTth8nHsY 8hHZBFB5Sjdd7jbXYUYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUp9x-00G31Q-Ri; Thu, 17 Mar 2022 12:23:18 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUp7L-00G1yA-4u; Thu, 17 Mar 2022 12:20:36 +0000 X-UUID: e95357d02243458591033255dd56c2e7-20220317 X-UUID: e95357d02243458591033255dd56c2e7-20220317 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 28381165; Thu, 17 Mar 2022 05:20:33 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 05:20:31 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 20:20:16 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 20:20:16 +0800 Message-ID: Subject: Re: [PATCH v3,4/4] drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function From: Rex-BC Chen To: , , , , , CC: , , , , , Date: Thu, 17 Mar 2022 20:20:16 +0800 In-Reply-To: <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> References: <1647503611-13144-1-git-send-email-xinlei.lee@mediatek.com> <1647503611-13144-5-git-send-email-xinlei.lee@mediatek.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_052035_215613_8C63B246 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Xinlei, On Thu, 2022-03-17 at 15:53 +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee > > In the dsi_enable function, mtk_dsi_rxtx_control is to > pull up the MIPI signal operation. Before dsi_disable, > MIPI should also be pulled down by writing a register instead of > disabling dsi. > What will happen if you do not pulled down the mipi before disable dsi? What's differnet for this two setting? > Signed-off-by: Jitao Shi > Signed-off-by: Xinlei Lee > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > b/drivers/gpu/drm/mediatek/mtk_dsi.c > index b509d59235e2..1c6a75a46b67 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -676,6 +676,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) > mtk_dsi_reset_engine(dsi); > mtk_dsi_lane0_ulp_mode_enter(dsi); > mtk_dsi_clk_ulp_mode_enter(dsi); > + /* set the lane number as 0 */ > + writel(0, dsi->regs + DSI_TXRX_CTRL); So set lane num to 0 means pull down mipi? BRs, Rex > > mtk_dsi_disable(dsi); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel