From patchwork Thu Apr 28 06:57:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T . Ivanov" X-Patchwork-Id: 12830063 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EAADFC433F5 for ; Thu, 28 Apr 2022 07:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sUvNdz8i94nWLzUNFt6SKlD0LxeAYFUuPuvo9GHcQzU=; b=LoexfKxJ0GIvuG uVaZgCGd+gLOzV0Fx/QLRXXKhC7lqyzltuXSnpuI8fFfw5GUW9M+lzjLey7oNH/0J0/EvKNpNkPRD VnG84y1Buir8drsaH4eaBVdP/Z0OeqhBnMPpUiQk5Lp56eBUYBpDpMncVTOXuKTwCvkueXY3W7v1S vmT7ram8dL8bAKTGrB6q5LyP7SljCSGPRyRJbBHnodm4CzsKbiJ4JhIXScEktRSjuwhgRrxl0DpKX Wex3N5RSHcgOsZk3S1HsvtqIpF3b9S3RBbaCMevmgAKxfLSoukYXptIdBy43+iV/Dj0FE/hVN2qgT RefM5V/2UfkP4mwaLOUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njy9V-00513p-IN; Thu, 28 Apr 2022 07:01:26 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njy91-0050tb-MS; Thu, 28 Apr 2022 07:00:57 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 62E961F37F; Thu, 28 Apr 2022 07:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1651129254; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DIGiUnkyxHNS0uD6OrT7smx8n4IaG1rFE68rlCC4b8A=; b=PusB2URtH5dyrVl7zGBybD4Yzf+K3YgN+YdRDHMA/XJN24GiwB2Zt+PxoIXABELk3iSOZf 5xOOTJk1sE1JAX8r0a6DfOkIN0WdR8biRSF+2/VPbWV7C6vwJL0Eyf6P2BZJhQwoK1vVKS P/TD0Z7eZ6648iueNJKtm7BR4gc/fsY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1651129254; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DIGiUnkyxHNS0uD6OrT7smx8n4IaG1rFE68rlCC4b8A=; b=r5uIT3hgFRE83pNn3OuVjBGPUzSPZIubBsDvIERo/Bfogn+XQ5J91ijmjIs1YqJteamOoi mreqlSVhgQavr1BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0828013AFE; Thu, 28 Apr 2022 07:00:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uP2iAZQ7amJ3XAAAMHmgww (envelope-from ); Thu, 28 Apr 2022 07:00:36 +0000 From: "Ivan T. Ivanov" To: Michael Turquette , Stephen Boyd , Nicolas Saenz Julienne Cc: Maxime Ripard , Dave Stevenson , Guillaume GARDET , bcm-kernel-feedback-list@broadcom.com, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dom Cobley , "Ivan T . Ivanov" Subject: [PATCH v4 3/3] clk: bcm: rpi: Add support for VEC clock Date: Thu, 28 Apr 2022 09:57:43 +0300 Message-Id: <20220428065743.94967-4-iivanov@suse.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220428065743.94967-1-iivanov@suse.de> References: <20220428065743.94967-1-iivanov@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_000055_962694_D36B9F73 X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Dom Cobley Platform driver clk-bcm2835 gets an inaccurate clock for VEC (107MHz). Export VEC clock trough clk-raspberrypi which uses the right PLL to get an accurate 108MHz. Signed-off-by: Dom Cobley [iivanov: Adapted on top of v5.17-rc6] Signed-off-by: Ivan T. Ivanov Acked-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 530820d13104..d1dd01580573 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -33,6 +33,7 @@ enum rpi_firmware_clk_id { RPI_FIRMWARE_EMMC2_CLK_ID, RPI_FIRMWARE_M2MC_CLK_ID, RPI_FIRMWARE_PIXEL_BVB_CLK_ID, + RPI_FIRMWARE_VEC_CLK_ID, RPI_FIRMWARE_NUM_CLK_ID, }; @@ -51,6 +52,7 @@ static char *rpi_firmware_clk_names[] = { [RPI_FIRMWARE_EMMC2_CLK_ID] = "emmc2", [RPI_FIRMWARE_M2MC_CLK_ID] = "m2mc", [RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = "pixel-bvb", + [RPI_FIRMWARE_VEC_CLK_ID] = "vec", }; #define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0) @@ -138,6 +140,9 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = { [RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = { .export = true, }, + [RPI_FIRMWARE_VEC_CLK_ID] = { + .export = true, + }, }; /*