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 A3096C433F5 for ; Wed, 2 Feb 2022 15:41:55 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1a0K3hHGEb90OOvy5ZsLud0t5/rLAsLexB5ZaCA3a2k=; b=k5hR4wr+NmLf10 8A5vYkvLENkCrTRAW4lOEwzqqIJWL7/yGPN8fxg6ssKD38JUbeWuq8K1vX1Rppln1ZrFEpJ576p2I Im2OrrJxxPU8M91mrLOynfgFkkO4+TVNDOBMPTw94rNgWgevKUDKUz6eoujo+NhyU6Gfjt/efg+Dx bRrh2SvJ6we0p5r96YvGeJRGcRskq51ixqdb3dhAcgYdPFCI7TMTfM16JeUiz8grXNbTGgN1NatwP rFepFtvfg08PGvwuy2sscy88gakMh3ZdrxD7JhVGNgPgOI3olC1/BY2QVX6BBA9YW3VveOxthV7CG gZ+rLp9cWuVPb+M4vvcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFHjj-00G1pv-NS; Wed, 02 Feb 2022 15:40:01 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFHSR-00Fxqd-0C; Wed, 02 Feb 2022 15:22:08 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A6CF6159F; Wed, 2 Feb 2022 15:22:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 113DDC004E1; Wed, 2 Feb 2022 15:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643815325; bh=OTLXgwve+GXUKqJgusIix6IvLJEmARJe1ZPe1Wk9IxQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UxdeogQjte72mAnF7hRypZPI8xAbel7BrvRvPRlt1nfnufzyW07t/bWcHBqQ+cWPm Gfc7wtq1yWuM2Uxpn/bNERIJOeOvPeaoI++xw+q2x8VrjZqBmySMQSBjFDba9IJcW6 +cwWNGtZFw79R6zllZHcbqxZrAX74luFmU3CzYCl7aa1qHcw4b+lbh8fH1pEj+uRAU UT0vNpdnpUacazhAij3sM8PDYaMhN6cYmFT54tdjOiJqYFz5AdKJ3TUpuMoCMpyKBE UBR1KsMFehen3PYeGvOFkAHjM8IfDBW3goWi6ZgbHxbfzVlmxlK6r/uhtmXJ5WFkHG QBJj61DDUrK7w== Date: Wed, 2 Feb 2022 20:52:01 +0530 From: Vinod Koul To: Liu Ying Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-imx@nxp.com, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Kishon Vijay Abraham I , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Heiko Stuebner , Maxime Ripard , Guido =?iso-8859-1?Q?G=FCnther?= , Wyon Bi Subject: Re: [PATCH v4] phy: dphy: Correct clk_pre parameter Message-ID: References: <20220124024007.1465018-1-victor.liu@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220124024007.1465018-1-victor.liu@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_072207_140767_96926AA3 X-CRM114-Status: GOOD ( 15.95 ) 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 On 24-01-22, 10:40, Liu Ying wrote: > The D-PHY specification (v1.2) explicitly mentions that the T-CLK-PRE > parameter's unit is Unit Interval(UI) and the minimum value is 8. Also, > kernel doc of the 'clk_pre' member of struct phy_configure_opts_mipi_dphy > mentions that it should be in UI. However, the dphy core driver wrongly > sets 'clk_pre' to 8000, which seems to hint that it's in picoseconds. > > So, let's fix the dphy core driver to correctly reflect the T-CLK-PRE > parameter's minimum value according to the D-PHY specification. > > I'm assuming that all impacted custom drivers shall program values in > TxByteClkHS cycles into hardware for the T-CLK-PRE parameter. The D-PHY > specification mentions that the frequency of TxByteClkHS is exactly 1/8 > the High-Speed(HS) bit rate(each HS bit consumes one UI). So, relevant > custom driver code is changed to program those values as > DIV_ROUND_UP(cfg->clk_pre, BITS_PER_BYTE), then. > > Note that I've only tested the patch with RM67191 DSI panel on i.MX8mq EVK. > Help is needed to test with other i.MX8mq, Meson and Rockchip platforms, > as I don't have the hardwares. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel