Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3681973rwe; Mon, 17 Apr 2023 01:43:41 -0700 (PDT) X-Google-Smtp-Source: AKy350Ycrsk7QDTnkEdV6zj6bM7T6PNjHjx5MOEZfXiHdsiysFWjzqzH0xIhAZtqPurK7SOCj7MU X-Received: by 2002:a17:902:e744:b0:1a0:76e8:a4d with SMTP id p4-20020a170902e74400b001a076e80a4dmr12266554plf.14.1681721021038; Mon, 17 Apr 2023 01:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681721021; cv=none; d=google.com; s=arc-20160816; b=xVKPVYjZXU9PCdKvf13ItZTlMM1kiAbaRrN5Bb5mRVMuo3IHt0UC44OpaBkI+BQDGl XE8jslgECNnFUr8QnuB65CAmdIBWjyWk1dRAjCZd0TGzBGgiZJCjwMOkQUYlyTtyfzZX 9+oX044j4tng6V2T4qVZwkfJoqClhS5DzUxCMBNeoVHRof79+vpscT/ltnc/kN5hDvfH cFV+FeBVfXo4h0TbgAgpsR7v6vgv88sdmuah+cNmkVmHrkWYpbQD6fGC0hs5cdri6S0c JQzjhTv2qtvabguCSpOrn/7JL2/iKKAp9XlMcEaubEyUuZCwSaHeD5JILjJje9sMMk1I OBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=TcgixQW90uLlM7AbqiN3PFInhBwnKf42Pqyg1/yxOr4=; b=nnmUL349LBDgArZRHoYHpNc4kEEbFPc4Un10I7aauZKedel6g8JTHaJM3kArs9r3dj qES0wNxUlKzgAYOOF0rMu4oeKcCOD3L9d0lFoSYuOHz28VjgJEb2fEgP4/32e6XMaS0B XDjqJCFSin+hopUazDnbUS0gQnr2jPlJNoMVy9hs1INdZenJrI02gVoIq4ZkZY9RlfTg nuIrmuiAr2g27oo6hGHdC2ggjJXc9JW5xXzbEYJurh8/IuTLCT3qkiaW+1uZ3/sqczYl lWzL3KZG8uRY7fAaETrGtnjLPwyRQTrwfQ+8NwfySlFxhDNHBSKOAa8erucJlYwgznVd gRvw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a1709026b0c00b001a221acb462si10841758plk.73.2023.04.17.01.43.27; Mon, 17 Apr 2023 01:43:41 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbjDQIia convert rfc822-to-8bit (ORCPT + 99 others); Mon, 17 Apr 2023 04:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbjDQIi2 (ORCPT ); Mon, 17 Apr 2023 04:38:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E8171FEE for ; Mon, 17 Apr 2023 01:38:26 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poKN5-0002M1-VM; Mon, 17 Apr 2023 10:38:00 +0200 Message-ID: <8db7ad8da4805d7eb4471051676d179e193ee399.camel@pengutronix.de> Subject: Re: [PATCH 4/6] drm: bridge: samsung-dsim: Dynamically configure DPHY timing From: Lucas Stach To: Adam Ford , dri-devel@lists.freedesktop.org Cc: Krzysztof Kozlowski , aford@beaconembedded.com, Frieder Schrempf , Laurent Pinchart , Andrzej Hajda , Fabio Estevam , m.szyprowski@samsung.com, marex@denx.de, Robert Foss , David Airlie , Jernej Skrabec , Jagan Teki , NXP Linux Team , devicetree@vger.kernel.org, Daniel Vetter , Jonas Karlman , Sascha Hauer , Inki Dae , Rob Herring , linux-arm-kernel@lists.infradead.org, Neil Armstrong , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Shawn Guo Date: Mon, 17 Apr 2023 10:37:56 +0200 In-Reply-To: <20230415104104.5537-4-aford173@gmail.com> References: <20230415104104.5537-1-aford173@gmail.com> <20230415104104.5537-4-aford173@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adam, Am Samstag, dem 15.04.2023 um 05:41 -0500 schrieb Adam Ford: > NXP uses a lookup table to determine the various values for > the PHY Timing based on the clock rate in their downstream > kernel. Since the input clock can be variable, the phy > settings need to be variable too. Add an additional variable > to the driver data to enable this feature to prevent breaking > boards that don't support it. > I haven't checked if this generates values close to the ones in this table, but I guess it should be worth a try to use phy_mipi_dphy_get_default_config() instead. Regards, Lucas > Signed-off-by: Adam Ford > --- > drivers/gpu/drm/bridge/samsung-dsim.c | 85 +++++++-- > drivers/gpu/drm/bridge/samsung-dsim.h | 254 ++++++++++++++++++++++++++ > include/drm/bridge/samsung-dsim.h | 1 + > 3 files changed, 326 insertions(+), 14 deletions(-) > create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.h > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c > index 73f0c3fbbdf5..c48db27adafe 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -18,13 +18,14 @@ > #include > #include > #include > - > +#include > #include