Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1655515rwe; Sat, 15 Apr 2023 03:42:18 -0700 (PDT) X-Google-Smtp-Source: AKy350Z320fKIvKBaRgbvOv7H1wYRsLyLyNJK0s6nczM+8G6BBJUIx7sSS/56QDkGXmd1hE3v+Cu X-Received: by 2002:a05:6a00:2450:b0:626:cc72:51ac with SMTP id d16-20020a056a00245000b00626cc7251acmr12724996pfj.30.1681555338580; Sat, 15 Apr 2023 03:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681555338; cv=none; d=google.com; s=arc-20160816; b=B/UUOS3EHy3+Wg+zVUIvaD/hkptszAE5fGBTuF7G8lXaQlD6sbsJ/w1+ahXnnMcqcT Hz9FPBMFowQwnHHy2MDQGrRrTAV+kaaFwX9CQ3/BtxDlJPiWQJiYifflO6aHxDNfUL2f 4OBru27qnodqfJnskdvGsLtzQpCJEWc/N73JfK0aoXPNrmv3dMcJGPrpOPG06M7T3i0W bI7FbasfJE9uV3MFJDae96us3PkGRXdhv71ZCJhT4TbTQDSywWIZDYKDdycoU62ZoGm2 O9r0rNNaqAQUdoMxTHH3FfbWF3qhIhDvIJIVSOZLcK97AjIWFs1af9gzw2xmK0gNR02M 077Q== 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=kmntWpj6jP3zgjyFhcaEHunbjz6jl27uym42Yw7yqu8=; b=U/EMAmNBa1DDFBT9tSZD4YssCursd5TFs/pZxqAy/bxpOMeEJC5eZxuk0Y58Agj69a bYZc7YhIKeDah+MBSZTThhkCRLzLbXPPU7FyQh7VuhhMt04tN864iYtTeT8my++49JBx JVLnfrXr0mWhH0NKJ7+Gkr40erwRBgJbzYyGp1dG2BB/0kIBKrOd34ll242eQ4ZG83kI 3yYRJ+bKP70YABIISfAMU9tgaKs5WolI15H6Y9S1Qpg+18E6Mmj9Nmb6ogQ6Kn4eDtzN /hOoJonJjvZNzbaXpcx5FYIb2nQTHyZvJ/6ABGiRWMFx3WZgKlbOuZM0mnDCD9cxkY+Q AtsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OTI5anci; 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 y8-20020a626408000000b0063b6278dd52si4622993pfb.369.2023.04.15.03.42.07; Sat, 15 Apr 2023 03:42:18 -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=OTI5anci; 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 S229951AbjDOKl0 (ORCPT + 99 others); Sat, 15 Apr 2023 06:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjDOKlV (ORCPT ); Sat, 15 Apr 2023 06:41:21 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71C584C3F; Sat, 15 Apr 2023 03:41:20 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-76073fb4511so43234539f.0; Sat, 15 Apr 2023 03:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681555279; x=1684147279; 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=kmntWpj6jP3zgjyFhcaEHunbjz6jl27uym42Yw7yqu8=; b=OTI5anciovy+M1VMrYZU1itc+2zkRp5DYwYEQay8ttnHEIKbP7jOpC1gsfgNfV+vje +G8E6KtQ+tG6+oEaq3yHmmO07tm3smwptmIUTLFJjCX4iif+EKwtzRyZom3NXYfOZtKv q3i8J+UD5evCeOrpmjl/Vca8mYJNZk1F+wEp6TT4FuSa+C6ewErLul+wE/aQHxRIPxfe feY3zw9wNN0g+QsQnGXf0pPMcyGHuIWKZ1dN/VLeR/+cSY6yJCLwZddAfW9vycYe0IeO jmmYFDpJTC9kRDQoghuoGeDgMjr3/u5Np+SwuLi3KP7s99qtB1I1lBv8W/EUfFrsidhf JJ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681555279; x=1684147279; 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=kmntWpj6jP3zgjyFhcaEHunbjz6jl27uym42Yw7yqu8=; b=Mj+4Br8IF/R24h5nB3rjbJcNfvdbjPgMpjgxPeuAKWtO5DfJvFFqLsKcS8dG/j5NS5 zx1TsiJvwXwkrougEbz6Jk0JB1uNcQ4YJAyzE0V5vVoRd573Sj7IrWhYsC/fwGVkqxGp BLmCYqzMK7Jb0npzLaC9B+U7B5oXD01RcQogJ2JBJD2CcEl4b3Ls8993inhEZpKvIDFg 8F1B6y+SJVRNwPwQLtziQtRbbZmbfdRlWpufp1MsAYW2m12T5wwNO4plYskCiApJ6pWU JrA1bADP1tXWNpdGxPFQuMlXfY/bG22Yk3bKj8HRzZFwBNsn0wyam/bH0kVEnhnuH9KT fEnw== X-Gm-Message-State: AAQBX9c8tgB0+vmkKTF/ey9FskHKSHcI/+Avxum6Jen72sh6YaiTPakM TNk2BatMSCeAO7ejm4HBpx4= X-Received: by 2002:a92:da4f:0:b0:329:67e2:e360 with SMTP id p15-20020a92da4f000000b0032967e2e360mr5260428ilq.31.1681555279322; Sat, 15 Apr 2023 03:41:19 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Apr 2023 03:41:18 -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 , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically Date: Sat, 15 Apr 2023 05:41:00 -0500 Message-Id: <20230415104104.5537-3-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 Fetch the clock rate of "sclk_mipi" (or "pll_clk") instead of having an entry in the device tree for samsung,pll-clock-frequency. Signed-off-by: Adam Ford --- drivers/gpu/drm/bridge/samsung-dsim.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 9fec32b44e05..73f0c3fbbdf5 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1744,11 +1744,6 @@ static int samsung_dsim_parse_dt(struct samsung_dsim *dsi) struct device_node *node = dev->of_node; int ret; - ret = samsung_dsim_of_read_u32(node, "samsung,pll-clock-frequency", - &dsi->pll_clk_rate); - if (ret < 0) - return ret; - ret = samsung_dsim_of_read_u32(node, "samsung,burst-clock-frequency", &dsi->burst_clk_rate); if (ret < 0) @@ -1823,13 +1818,18 @@ int samsung_dsim_probe(struct platform_device *pdev) if (IS_ERR(dsi->clks[i])) { if (strcmp(clk_names[i], "sclk_mipi") == 0) { dsi->clks[i] = devm_clk_get(dev, OLD_SCLK_MIPI_CLK_NAME); - if (!IS_ERR(dsi->clks[i])) + if (!IS_ERR(dsi->clks[i])) { + dsi->pll_clk_rate = clk_get_rate(dsi->clks[i]); continue; + } } dev_info(dev, "failed to get the clock: %s\n", clk_names[i]); return PTR_ERR(dsi->clks[i]); } + + if (strcmp(clk_names[i], "sclk_mipi") == 0) + dsi->pll_clk_rate = clk_get_rate(dsi->clks[i]); } dsi->reg_base = devm_platform_ioremap_resource(pdev, 0); -- 2.39.2