Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2371514pxb; Thu, 3 Feb 2022 05:20:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTPPIhuAFlAGZZV6KAdN2l6FfxP8tV5bXGBR2/9WJfZEz+IBgmDIxqb3nMyqFuDhus4QiZ X-Received: by 2002:a05:6402:4385:: with SMTP id o5mr35221180edc.48.1643894421712; Thu, 03 Feb 2022 05:20:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643894421; cv=none; d=google.com; s=arc-20160816; b=TjpEJ8uRX7xvQZiKQmUSUF7xYpA+zdJnL3g3zdH+pWHk+z1QgDHz5Kn84kDvdynb2j pHUYwbReuJjgYlNEIqj9qmZa5z9l3+mb0urhQWk/8FGHfYEqe77sZdRfAPiceIjXkjpn fzmQBHBOirDuFjtveu3udK6e3aQZwMAYN0t2iookuWsYl9YAUUiN+MYfr9eSxFgenqly KdNorY0hSLRqcUuh/uuQPP0NmD4bOwSdug595D1Khcydev3SLWps3Y6mk4Ed9ioTOBCr zmeD2MOWXRn0iPronuVVRT8p16VJaDZ+bcBXHYI6HZOiw6pF0d5yHPBUMLucQ0to5aFd zV+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gheDcf8mrDjM8MJ4iPD8l5quUQ90L7UsPdvwhJmvWys=; b=Xm3ZCtcaogzWqJBalnd6bHBF4zKMGXHmLyMMou6uk2SjPHiSSeA7orwIEf5U5FpWSX DvWFpDMPi3LptxRCnDqF9FHgNijl2R7s+n3Wc61HKLliQWcIbyhEcKA8N3qar8fRtxc1 gnvzpu5ysN4+j/HxAnOmHKYoNexkG6PuK4/wN/Sm9KGZqRFX6j2cJSKeokhzGXkbBZ+B ljzb+MP4mJY1AaFQjhbSNDt66rYMT6taEH81lyS/zEpFNYpXY3TIIzBQ8qCgIgQ8oVeG rybooHA2Gu7bAze3UcuuPVCOo+AdZuhZfKxxibUBF/hFvlTFD7uFDLyMpju+pLnSobT8 BMlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UxdeogQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he11si12721547ejc.807.2022.02.03.05.19.55; Thu, 03 Feb 2022 05:20:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UxdeogQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345429AbiBBPWK (ORCPT + 99 others); Wed, 2 Feb 2022 10:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbiBBPWI (ORCPT ); Wed, 2 Feb 2022 10:22:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A6EAC061714 for ; Wed, 2 Feb 2022 07:22:08 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 28193B83066 for ; Wed, 2 Feb 2022 15:22:07 +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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220124024007.1465018-1-victor.liu@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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