From patchwork Sat Apr 15 10:41:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 674096 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8623EC77B76 for ; Sat, 15 Apr 2023 10:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbjDOKl2 (ORCPT ); Sat, 15 Apr 2023 06:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjDOKlZ (ORCPT ); Sat, 15 Apr 2023 06:41:25 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67C184C3F; Sat, 15 Apr 2023 03:41:22 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id e22so5485518ioc.13; Sat, 15 Apr 2023 03:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681555282; x=1684147282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QillMvAEPm/LpmzxL3hBE8ZF9N5FQcLOapSkD5fSfyg=; b=LPpHb42UTFz1UHtn26MamexilwDzCAKJ77JDh0ea1r5XO4R3/fe/UiQcRXqpbcYO4t oQ1RGoZvvdZNnQibfRKK/B2U78EtAKjQTs3Vvaj8UR8F6DPeL0TgXoo3P3Dpq6a8hlRV 2Ner9iyVVf9+XaPXcFxdkmnEWCt96y4dbzojqlpzh+Lqoi9ur7QEGM0V3xGzLPeSJn3Z AtkRGWrUMPzRbtRx8/v+d42D8OTvEQzwcOzeyimQsmhmZaT3PYDpYox1H30qnbtuWllm qkXe4uKM0vuWQqKX7s5fXY3LSUKmgW8XmnyecIHmUZ+JrxWsguOyBOyXOD0b1syAoKY8 tbUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681555282; x=1684147282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QillMvAEPm/LpmzxL3hBE8ZF9N5FQcLOapSkD5fSfyg=; b=A60Y3L8rzUJPgM9n88Rh0u7TgSSk4cVmhIxwfGf5s8fBSXiVBLSDJKxBXlFqs9H7C1 leYHzV5oEHi2GVlZ/8ho1evrRz0RfPz9vlQs3pmuNUskX+/KlVT33cU/8GqTw4mWhwVu 19dprhKkLoTLKi07abEHLdfG+LIE/iVo7GlT+uF1B6kj88/WyQvaekJRUCWkpVijnSVR 3WI366bgocFWAn/iuJ4/rZ6nAXg8mHLi2ItszG3qxsq5lYFsM1uskUOB0WgfIJ4WYGDK NBn9l0uDN63aXY+J0KJ05h6w3NAgOtAbmD3iY9I0SkNcglnsdmtU+C7gLKXeMYiAdKXP l7ng== X-Gm-Message-State: AAQBX9erzWan8ZmYs980b8mowJgGuF/4g3LWxAy47DTzNFTb5aDevQIL MAsBnfnnihD3uLZgPmdE8mg= X-Google-Smtp-Source: AKy350Yn2vXixHDjfe1oL94ULicmmfb5+omvinXc3gJ8Jgz4kxYriE9bwsCRbzmcEhx9njG+ct12jQ== X-Received: by 2002:a5e:9917:0:b0:760:e9b6:e6da with SMTP id t23-20020a5e9917000000b00760e9b6e6damr47732ioj.1.1681555281537; Sat, 15 Apr 2023 03:41:21 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:40bb:6fe6:ddbc:cc9a]) by smtp.gmail.com with ESMTPSA id bp11-20020a056638440b00b0040b38102b79sm246536jab.82.2023.04.15.03.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Apr 2023 03:41:21 -0700 (PDT) From: Adam Ford To: dri-devel@lists.freedesktop.org Cc: m.szyprowski@samsung.com, marex@denx.de, aford@beaconembedded.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Inki Dae , Jagan Teki , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Frieder Schrempf , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] drm: bridge: samsung-dsim: Dynamically configure DPHY timing Date: Sat, 15 Apr 2023 05:41:01 -0500 Message-Id: <20230415104104.5537-4-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230415104104.5537-1-aford173@gmail.com> References: <20230415104104.5537-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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. 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