Message ID | 20220216071257.1647703-1-victor.liu@nxp.com |
---|---|
State | Accepted |
Commit | 3153fa38e38af566cf6454a03b1dbadaf6f323c0 |
Headers | show
Return-Path: <linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org> 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 D0C3AC433F5 for <linux-phy@archiver.kernel.org>; Wed, 16 Feb 2022 07:14:14 +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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=K37vO9XiuoV/0C3PY9kSNtlgl1LM+vyLsIDq8Wccdgg=; b=W97O1d2RBwI8xm IBNVgMZuK3c67/tLWi+W7GtrVHDHx0jEMo9EE7aFyLpf3f5iz6rErR88+3StFkrXXdGAI0bTvvwUp u+A6XTgKvix78ATUSBbeGrAmGkjPH83PxasuDcNS0Pwye2YuNRybdfzNV6Q2Gs3DuI1dDIpTa9rJb iDQ0YuTavoehHdAy3GKEUSajQHdgbHk2PEQaaVSe/D99+Ao8Uh52jMD0Vg7q7bNYchC7HqezlzmwU BBu4vMC9jzkfrPuM3yRiHJgboxBpJq0W9pdRgAw9PXSztl9M9zXxuX9zIWRTrfD66vHKGuU9s9zvm FQCVgWULt3ZMnT9MwwEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKEVy-005ooh-2H; Wed, 16 Feb 2022 07:14:14 +0000 Received: from mail-vi1eur05on20611.outbound.protection.outlook.com ([2a01:111:f400:7d00::611] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKEVv-005omi-9O for linux-phy@lists.infradead.org; Wed, 16 Feb 2022 07:14:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MW4kvM0nr7OwUd8wWrqd9TKQydSr1NODfM05OyPwJmhshVs2goSytQI6x9EIm4gkVIOXUqocwgm0pJcIMNEXcGLA/HnJitwEwqwRi5DTUdgvWZPD57N6C8hiGnuqlG107ufowBk88dHvQ+W3qJ6NJcZfGI5iRRkRccBl+sGm6v6mSgBpV/2oj6Z/L5o6aEU4qwt0RAiNGBMnikyH/OspyvBWrW6E7L3ntYH1zQKOaYb3HdPNLaNIDu1Zu3WDG6opAl94OuiBq3KUSc7W1uGXaQG4dhAq7tugfJwdy4Z4Zgh8NYRsfnFB96mpuFVKnIuFDt+XzM4+nrc0/awpiqox9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kExFFvUXbo3RwmK5ystYGVcQdKBZqI3DM0gcp19G7fs=; b=lNpUtXEhVo8fLE+BAWK491z11Ge0ANyU/ZrZCJjl8J/efXq0PwwqQOstHe3k13/X9xBmibi1TSLNnOtVKp/eo+4YXNZtWA/amBWZSvobW32kmLUCk5Ac+yNZ+p9adAlRd20xXTrRSVHV9owfl6FL8yQgATZIUA89NEcynt+jRydNkO7Ghe9HuJfamvmdCl+UkpIFJsdWJqWkvYMbUneH/SZp+YOzkLi7ZKXH6IxBkJpRbvPh+FSPrFD6GfFNYlHw8U8EbseryLVuLpHDi8hv9UpR4TbLMSSW4VY6kXivJJhTl8lhcPj0F2440Hbu42pZQuIpRqZ7q71zRVoZU/RW4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kExFFvUXbo3RwmK5ystYGVcQdKBZqI3DM0gcp19G7fs=; b=pFGuuwd0KCYTZqqdkFACXHtEBDUwYH5s9q9dSXuRmsBrTJYbkfWi+d165QE0YJCF7XnuYuDIvBoaAFoswWBvaWUqWjjPvpZLVZ6eF4jY05pl0AoCtsoDRhlZ1INndc59iQI6yeOK+HTXvOJqj385q5dAtxUH9TVuA47BMZrzRwY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AM6PR04MB6248.eurprd04.prod.outlook.com (2603:10a6:20b:bf::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.19; Wed, 16 Feb 2022 07:14:01 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::ddca:beb1:95b0:1ae1]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::ddca:beb1:95b0:1ae1%4]) with mapi id 15.20.4995.016; Wed, 16 Feb 2022 07:14:00 +0000 From: Liu Ying <victor.liu@nxp.com> To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linux-imx@nxp.com, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <narmstrong@baylibre.com>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Kishon Vijay Abraham I <kishon@ti.com>, Vinod Koul <vkoul@kernel.org>, Heiko Stuebner <heiko@sntech.de>, Maxime Ripard <mripard@kernel.org>, =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org> Subject: [PATCH] phy: dphy: Correct lpx parameter and its derivatives(ta_{get, go, sure}) Date: Wed, 16 Feb 2022 15:12:57 +0800 Message-Id: <20220216071257.1647703-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dce8cf30-711e-45be-33cf-08d9f11be7cf X-MS-TrafficTypeDiagnostic: AM6PR04MB6248:EE_ X-Microsoft-Antispam-PRVS: <AM6PR04MB62480A2D5E83D745F43E3C9C98359@AM6PR04MB6248.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RLTua+A3DN4MT4f0J7xtAvOcyW84zf0aU2VBUVFBNuNgJLgCwRViDbHFjGEbrMXPZaSzY54M4KhYI6EJbhefe+77DArSN3R2OuEog2to3S78hJjJDvbiDrglt7XphYHaCJDDmbT5oGcNP6sUBCSetl6pnAQ9K6PDYXKOF6fWgX9FPWBZfKopB+YdI9uZx9eaI3T3B7d2dnzqIGOsJY1LxkzR4WIyHI2U/GyBa3hcmYAKQO93KGhGgsQSMVA39KYcAiFCt8fsGSXR+uBBw62MpW8qQJ7WSvw3D9z8tfSDfhFFi18OfIyNcyA10UlQX+2Hl1DoJ9z0P9wc/jnhqUWxyZi/58rdYRzEWVWdVzaAqY2dBI4UC19VwE/I01UcMsaJncXTctCGiw8HrrWMmM/EqqmjOuIpzwKfAtSauKPTQcyvKFM3nzpZqjOZ8EMJ9HIvYzKNBfeYxfS1+kKgjFx5a/rxm7I1kljn3uewalKg/pXahxT27lB3fZ4czXM3jsTX7CwSGfvYXwiEK2pRh/fBb0D0d+bYUNgL/ssDE3VwuJLu495S6WgJV7iY/Ow34Fxkit0qRXb/ebQimmlyu6T8nF9CcGUxqbNjvlYUNVZKlxRVB48fl4rAcZM+OQlJXL90cEg6VlSIrbYZJ/1dqlcSzIIGv3Ygiw1rwqbTNcskw7cRVRXMSpPuJDnTciddZ0e3EnJIVkTOeUKaKWHsRFULUg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(508600001)(186003)(6486002)(2616005)(316002)(1076003)(54906003)(38100700002)(7416002)(5660300002)(52116002)(26005)(6666004)(38350700002)(6506007)(8936002)(86362001)(66556008)(66946007)(4326008)(8676002)(6512007)(66476007)(2906002)(83380400001)(66574015)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PgWeNdofkUJ1e4h/rHp9zZ7CdIxz?= =?utf-8?q?wiwjfokJKhWnLPh4/qubfAGU0j1g7RO7EXyTKpEZgUSMZGX0nEP6SBrY1yLBs/3rt?= =?utf-8?q?vR7MvcuE79O1cpb+e4peZ440o3Bf2Qc5/pZdoP8GPeVW+rNSSkMAJrBPs0yg3l86l?= =?utf-8?q?Oiwacm/9EtA/UECy0RyOgGzJhnfZ6H9DnfvZufBeSCeGmXrrJrU2ZU8BjR9bWCfO6?= =?utf-8?q?CEkhYmUwZVIDpXcUJAXBFnjR25FC6mqqDK/5FWNwWVqZZTIgPpmFe3mlTMPFerB9m?= =?utf-8?q?CkoDi8pc3P+JcxooITRUMk8WMwfjAtEVvvxL2HaQZVgzdhqK4VZPSnci3BOu0T/6Z?= =?utf-8?q?pH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J7YuyCI5nZalRaT7EbKcwxsDRU/ccMooAjtR0qc2U5i6vGFKPPLC+imEc5GVZ?= =?utf-8?q?3Y5GsVSZ2Q1ywTzwKiO+1zd6THx6+JYectGWhbI61XhRMfnihAfrdKT6PBI4NGx7+?= =?utf-8?q?uHXkOACgINHWvPZCfWPDpBLSxlBDEQiK5gYINwmCtzIi8PYMiptnWjS9F1LXN4hPu?= =?utf-8?q?RUY2bcKKiRPcY8GOJImNDsjOiapfPZHgvXSBCjfbXBcXn0B7L/7H1VmWM4kNi6lBZ?= =?utf-8?q?mKxm+7jnK0njvHy16/fx4dwA0ea6oewPQScnfwZtlfXmBQIptVOOS2+eAeDSfKb3h?= =?utf-8?q?2x1y9DzCnVzQoR6CCOmC/V79Nx7CI5TU6/AzQpJLSBgUWzLglLaOmW8=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dce8cf30-711e-45be-33cf-08d9f11be7cf X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2022 07:14:00.7350 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 11KmnTHfASVveuTajPyR93lyBBFhVakh4gY+veTalFdXxhiSi2ktKiWbAVeQSHyahS5NiYbGjwvYmjpYgwV2Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6248 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_231411_456638_6C980C0F X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list <linux-phy.lists.infradead.org> List-Unsubscribe: <https://lists.infradead.org/mailman/options/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-phy/> List-Post: <mailto:linux-phy@lists.infradead.org> List-Help: <mailto:linux-phy-request@lists.infradead.org?subject=help> List-Subscribe: <https://lists.infradead.org/mailman/listinfo/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-phy" <linux-phy-bounces@lists.infradead.org> Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org |
Series |
phy: dphy: Correct lpx parameter and its derivatives(ta_{get, go, sure})
|
expand
|
diff --git a/drivers/phy/phy-core-mipi-dphy.c b/drivers/phy/phy-core-mipi-dphy.c index ccb4045685cd..929e86d6558e 100644 --- a/drivers/phy/phy-core-mipi-dphy.c +++ b/drivers/phy/phy-core-mipi-dphy.c @@ -64,10 +64,10 @@ int phy_mipi_dphy_get_default_config(unsigned long pixel_clock, cfg->hs_trail = max(4 * 8 * ui, 60000 + 4 * 4 * ui); cfg->init = 100; - cfg->lpx = 60000; + cfg->lpx = 50000; cfg->ta_get = 5 * cfg->lpx; cfg->ta_go = 4 * cfg->lpx; - cfg->ta_sure = 2 * cfg->lpx; + cfg->ta_sure = cfg->lpx; cfg->wakeup = 1000; cfg->hs_clk_rate = hs_clk_rate;
According to the comment of the function phy_mipi_dphy_get_default_config(), it uses minimum D-PHY timings based on MIPI D-PHY specification. They are derived from the valid ranges specified in Section 6.9, Table 14, Page 41 of the D-PHY specification (v1.2). The table 14 explicitly mentions that the minimum T-LPX parameter is 50 nanoseconds and the minimum TA-SURE parameter is T-LPX nanoseconds. Likewise, the kernel doc of the 'lpx' and 'ta_sure' members of struct phy_configure_opts_mipi_dphy mentions that the minimum values are 50000 picoseconds and @lpx picoseconds respectively. Also, the function phy_mipi_dphy_config_validate() checks if cfg->lpx is less than 50000 picoseconds and if cfg->ta_sure is less than cfg->lpx, which hints the same minimum values. Without this patch, the function phy_mipi_dphy_get_default_config() wrongly sets cfg->lpx to 60000 picoseconds and cfg->ta_sure to 2 * cfg->lpx. So, let's correct them to 50000 picoseconds and cfg->lpx respectively. 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. Fixes: dddc97e82303 ("phy: dphy: Add configuration helpers") Cc: Andrzej Hajda <andrzej.hajda@intel.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Vinod Koul <vkoul@kernel.org> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Maxime Ripard <mripard@kernel.org> Cc: Guido Günther <agx@sigxcpu.org> Signed-off-by: Liu Ying <victor.liu@nxp.com> --- drivers/phy/phy-core-mipi-dphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)