Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3870914rwe; Mon, 17 Apr 2023 05:00:40 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2bmozHlVoPs820/NJCso1wtuEb/kBphZqYfbGS8Q4FvGT9VVha6Sy4kEFVn/QSy5vrjOd X-Received: by 2002:a05:6a20:9144:b0:ef:dcb2:4ca7 with SMTP id x4-20020a056a20914400b000efdcb24ca7mr3718138pzc.13.1681732840105; Mon, 17 Apr 2023 05:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681732840; cv=none; d=google.com; s=arc-20160816; b=lkr/8j1V7rjPwBWNm+tIsPq7BlwpRgDTabAsyxJI7pL2zPzObwWd7U29gTdtjlkNfn q7vYNscqgafu44QP0JNTutvDJkzvi+VCxTv7jDHLEsx5jVPcfuBcMHPla6+SHw7lUeO1 VCOXlAa7+8V/BqCk1i1T4cs7bW9cX876ofAxkFFfZxkfkU5lK9/gNFzARs+buvDq3OTs EcVEWsOrj0TXmXqnHzFr56YlDBZXBbSmgGOxYzcozBmQpG3oikucB49lSiF0OgT0nsFt ExJ9YBUVpNgDH07oRbNVoEDkw7v9i2T5K5SWLKyskJFz2+dY8buL1VLueoDi1+YO3sE2 lTOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=W28jZlr43n4A+R8dw3oLWIHuParHAvf3EPiECCIvalU=; b=PZDMqbtIiqkRj65GbDMOcwUkTxNqwS1rxXxaKAXLlZUfolmwaEG6Z9wLnqWTfUcd7E iPAydF38hwhelAgn+2i1xEBsEhp0BJ4YG+aa/SOH83/ZXkQElGGtzUSDshWvPDOAwcVp 1WMLqaR9VY7vq0A1kX4c/9kBFD6BCZvW7N55iC7ueBMR+yItOEBT/ANz4Q+0Olj4LQLR c0WI10RYDix9fchcjcUA+H0q4DgIhtqaNS22LPWy0SEbWif0KsVmotpJlRBoj4LZZd6n KUG/2dDyS+wRumUZOD7whS5ruUCbZkRLrsa0VZN0MnxaUgQhMi5l2GBi5yGoW6FbtWyJ ae7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qhPUmExh; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a630201000000b00513973864fcsi11793198pgc.782.2023.04.17.05.00.24; Mon, 17 Apr 2023 05:00:40 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qhPUmExh; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230295AbjDQLyR (ORCPT + 99 others); Mon, 17 Apr 2023 07:54:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbjDQLyM (ORCPT ); Mon, 17 Apr 2023 07:54:12 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7398A65B5; Mon, 17 Apr 2023 04:53:22 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id o2so25329347plg.4; Mon, 17 Apr 2023 04:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681732399; x=1684324399; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=W28jZlr43n4A+R8dw3oLWIHuParHAvf3EPiECCIvalU=; b=qhPUmExhRfifkoU+BUpekMd1gF/UVzqbLp7FIrS0RngjO+zVlU+4wtXqvS81HXxTCH wXRI5D9rv6NJs6cPzwkxyvUaOqdBDHWyYDFRhROC3ZUQLD1x7IHGLBg6qpYIwBNX6pi6 CkzwtJfULWhZeiHSwtLINQKAJqCW2VVWpHYYusPnxo0O3FBnUABeM5DxYyslSkMplp79 yFjDrQTb1F4ofmRWcjcKbA56LrHfFKDAtqGldGIq/aZBJGHNF6bqZ/WTSIRG7RYDTKZu /qxGVyyeADIj23M3ae8kc4bFZ8CVaxvsVMEqJfhYfai4YD6gJkShoqPFfBzbeE2DR3/S lERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681732399; x=1684324399; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W28jZlr43n4A+R8dw3oLWIHuParHAvf3EPiECCIvalU=; b=PPA5hbMEnfjpXH5IZj2nm1Qvf2SyC3p2RVuMHZaU8Y9kXSA+t5rP49XC73YE1QsxRX staNecrUErewwhBu1te8BiaMc85ljJ08ny4NCanS6Zfuy0dJ+c4KkRfsJ7rmP43mUTFA q3/jgf/dL5xz92zmqhqBV85yibY+tK10iZOnLiDHigWCkFU2tB+81uAv90lI6z+EsTzw AZp+pSpXZbBBrp3646SljwWGL4vsXX9IONXmAxT8VqTcfINymf0BkBhtzrHAXQWgNbW1 Ho20CVUDGN0zL21qV2we3U7p3y025lpLyZI1ytKA4jDQEzcGLJVj9NKBBk1IF32xG6h8 TDiA== X-Gm-Message-State: AAQBX9c1mclfnJOe8RtaeFpyHyKz1cwH9h9nJJyPOrJCAlBVJuY8H1Qt ZjRciN4h9arJhIbYPDNCacyj/snMuzNBshC/Fhk= X-Received: by 2002:a17:902:f90b:b0:1a6:655f:9efe with SMTP id kw11-20020a170902f90b00b001a6655f9efemr3499134plb.3.1681732398572; Mon, 17 Apr 2023 04:53:18 -0700 (PDT) MIME-Version: 1.0 References: <20230415104104.5537-1-aford173@gmail.com> <20230415104104.5537-4-aford173@gmail.com> <8db7ad8da4805d7eb4471051676d179e193ee399.camel@pengutronix.de> In-Reply-To: <8db7ad8da4805d7eb4471051676d179e193ee399.camel@pengutronix.de> From: Adam Ford Date: Mon, 17 Apr 2023 06:53:07 -0500 Message-ID: Subject: Re: [PATCH 4/6] drm: bridge: samsung-dsim: Dynamically configure DPHY timing To: Lucas Stach Cc: dri-devel@lists.freedesktop.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Mon, Apr 17, 2023 at 3:38=E2=80=AFAM Lucas Stach wrote: > > 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. I didn't know that was a thing. I like that idea much better than the table. I just pulled what NXP had and tweaked it to fit the mainline. I'll give it a try in the next few days, when I have some more time. adam > > 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 > > >