Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1655568rwe; Sat, 15 Apr 2023 03:42:23 -0700 (PDT) X-Google-Smtp-Source: AKy350bvxIEGTkkOdgBduA0kJUWtLHIZXQLe87KDDO+Z2LbzOjmHOpe6jGu4lqtptLx9cCQlWVmG X-Received: by 2002:a17:902:c950:b0:1a6:a7d4:7474 with SMTP id i16-20020a170902c95000b001a6a7d47474mr5224390pla.44.1681555342938; Sat, 15 Apr 2023 03:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681555342; cv=none; d=google.com; s=arc-20160816; b=qYhyMEP74sBlJLZAj7EsV+zl5fJCrQO9Ea5KJtvNHaVLNqIF4FCCIxhQF8rxQ3Bol7 L59Qmmi105gty/Bo1hL6O79mqFl35vgRbwznWG72ZUa9BxAYNPoEZExKU3uPyIJosmob m//THfdMPBxu8tY/5FvNWLAIu+5iSrg2IllZf2qJ/6Iuwo2cb9abcfyzuU2xA9G8LJAS tD1CBRO6LWKQLOulGigFuPgXqkbnNnH9HQWnR4z8WC6CyKz+oqWH23P2uUrrxwMl9Cdo CIxuUtOhiix9TvXh6uz9XVlwcDeyZpL0aaPxpaqVqAnFLm0JxT5H+y+gh3JsX873/vj0 cijg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QillMvAEPm/LpmzxL3hBE8ZF9N5FQcLOapSkD5fSfyg=; b=MA9hyUmEMDn2SHraC8B68X6GdYjPDBw3rnzdSlKA/zvu6Sf7i6uGiqxObwICrrTGIb KGCnQLKiHB3yxydKG3QqtP77c9fjoYLySTFNesxJ6B3k1/SYGiislxqL8Voe8HKkNRs8 5ZtjWfYqa+lpFbGNZFodfEDmpsuSc9nj0a6Jw+8GlPSlNz8ChxIXjHw3t7rQyWM2qslm MiNqwu76vkiR9owOayZ24Gx9Vc/aYORasXRfk9mtp9a9dngYP1WZdj9d97aSZOih/8ys CjR21R8rb53+k/AMgD/Od8PEKUCzHFKR/OqJb34uTgnZ+Xz799PsGU3ISc8eZWtLIZWB mz7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LPpHb42U; 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 u34-20020a632362000000b0050bf225ba32si6568903pgm.706.2023.04.15.03.42.11; Sat, 15 Apr 2023 03:42:22 -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=LPpHb42U; 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 S229945AbjDOKl3 (ORCPT + 99 others); Sat, 15 Apr 2023 06:41:29 -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-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 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 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 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