From patchwork Mon Aug 29 15:21:54 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: 12958042 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 9D827ECAAD5 for ; Mon, 29 Aug 2022 15:40:32 +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=Zbu/pX2tYLaoX7U56XCw717OEA0nphLi3NaFSbT4Oe0=; b=AlFDxl4EgK3cAF 07eX0t5HhuIbyLMvuvRWw+Ht7PIHJ/+BmS5swSh0ImTpHVRcZLs7mkpASpp+UnOzeDx/rB/2uVadr W/san5MsYSubsNNfC0ksKtVuMAeH3VGtaUjjhji/02lEx+U/OzAVyonKrX3DdZmCbIhnNY4fzoLy0 fS5QSA6780dNWqDKI4XyrhctRYTDEYDOTZexXsW5YCbYhSF+6Q7Cag1Rdlx+bvgRe3gVY9tWE/jS3 23JKdNnUglPX4NbpGoM1u+Uk3rDKVELlv0BvUcuxe0IuRJPVYIlugACSon/xZAW5mg2oFpZaTiExq gsoF8qw5vziLraMQ2yrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSgrC-00BPbw-OF; Mon, 29 Aug 2022 15:39:22 +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 1oSgr9-00BPa0-FI; Mon, 29 Aug 2022 15:39:20 +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 EDEB71F8F4; Mon, 29 Aug 2022 15:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661787554; 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=ueNs86UFTJjj7RHZjMtBbl+FZzSEy2RU3fTLV1g4LWQ=; b=1qqKObPR5uXbaLX9jU1Tfys9jf1NjWdo23ibzfp458QNFJ7ej+X5cjot7IjL27SjMlI3+p NJ7lueh2RZQJ3kDQel9l1ideNxWEZUp/zjCegPDPtSLab7y/LRFKDVA3dHM0up8F16NwID hiTXtWjP7Q+BMcdxCqd3uaIcT8SzJa0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661787554; 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=ueNs86UFTJjj7RHZjMtBbl+FZzSEy2RU3fTLV1g4LWQ=; b=69y+U27EYL0AWFZsx/cFkhdzguhMVPY2aUGt6S69NwJO6CB72A7wSQ5cJ+ScOIKTyIr4th tZM45L8EJ1vTBwDw== 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 D8AAB139C4; Mon, 29 Aug 2022 15:39:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8Hm2NKLdDGPrDAAAMHmgww (envelope-from ); Mon, 29 Aug 2022 15:39:14 +0000 From: "Ivan T. Ivanov" To: Stephen Boyd Cc: Stefan Wahren , Dave Stevenson , bcm-kernel-feedback-list@broadcom.com, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Guillaume Gardet , Nicolas Saenz Julienne , Dom Cobley , "Ivan T . Ivanov" Subject: [RESEND v4 3/3] clk: bcm: rpi: Add support for VEC clock Date: Mon, 29 Aug 2022 18:21:54 +0300 Message-Id: <20220829152154.147250-4-iivanov@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220829152154.147250-1-iivanov@suse.de> References: <20220829152154.147250-1-iivanov@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220829_083919_681252_18F56DCE X-CRM114-Status: GOOD ( 10.44 ) 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 --- 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 1248c0d64eae..d70bb9283af7 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, + }, }; /*