From patchwork Mon Aug 29 15:21:52 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: 12958050 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 EC6DAECAAD5 for ; Mon, 29 Aug 2022 15:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbiH2Pj3 (ORCPT ); Mon, 29 Aug 2022 11:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiH2PjY (ORCPT ); Mon, 29 Aug 2022 11:39:24 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24748E4FA for ; Mon, 29 Aug 2022 08:39:16 -0700 (PDT) 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-out1.suse.de (Postfix) with ESMTPS id C449D2211F; 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=hSx2RugW2hGO3Udg6o5omWweArbjd3LUOfNMZgn7SbE=; b=wVKFUWA5IVn5NFU5jeY2Tw9mWgQY4FWk7dWmrUMJFiiHJPcjHNEOBXKh+8lXMc1BihZ3Ni viobcC0d1iR2LaoMHzp0H07KpSMxJ73Rucpl26xmupWC8JjvtJ38NYcHETSeNSSo70CZRR z8D9bYeqRxj7fJ9mhl50owwb9x92SH0= 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=hSx2RugW2hGO3Udg6o5omWweArbjd3LUOfNMZgn7SbE=; b=0mlgITBmjXHzPtjD/4COkzzwfo8b3XC1KjeDdlQtRosPCkKZRHAIlM5yKL5Ni/G4MZx4Ia 8CPampTwXJqYkfBw== 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 A404B139C4; 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 QPm8J6LdDGPrDAAAMHmgww (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 , "Ivan T. Ivanov" , Dom Cobley , Maxime Ripard Subject: [RESEND v4 1/3] clk: bcm: rpi: Add support HEVC clock Date: Mon, 29 Aug 2022 18:21:52 +0300 Message-Id: <20220829152154.147250-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Export clock required for RPiVid video decoder hardware. Cc: Dom Cobley Acked-by: Maxime Ripard Signed-off-by: Ivan T. Ivanov --- drivers/clk/bcm/clk-raspberrypi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 73518009a0f2..8f560c6b602d 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -129,6 +129,9 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = { [RPI_FIRMWARE_V3D_CLK_ID] = { .export = true, }, + [RPI_FIRMWARE_HEVC_CLK_ID] = { + .export = true, + }, [RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = { .export = true, }, From patchwork Mon Aug 29 15:21:53 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: 12958047 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 D8776ECAAD2 for ; Mon, 29 Aug 2022 15:39:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiH2Pj1 (ORCPT ); Mon, 29 Aug 2022 11:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbiH2PjX (ORCPT ); Mon, 29 Aug 2022 11:39:23 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49625956B8 for ; Mon, 29 Aug 2022 08:39:16 -0700 (PDT) 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 DC1201F8EC; 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=Y3RYH38w0+cy1s7oBuiOAQr7S3GAFYYj32f7Seo0dPE=; b=lYP9JHQgK2eaGGZxmZLcLMphLbtx5lz3eNQ09RLETk+5/tyZhXtDvUm/GW6PLx9t7DEQK/ xVwJPxs2vo7uA5F+U1Qys0Z8r4YRpduK4enLb+7rO9IaHQOYDe2UdeLDjGc+cSM3kF30/8 UVrWWVDava4mLYFXnYp4EUKWb3cRYR4= 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=Y3RYH38w0+cy1s7oBuiOAQr7S3GAFYYj32f7Seo0dPE=; b=f/Q7j7xKpsVzNXI8rI1mDGWh3BpgC6DI8aT8S24KW0upA8dTq+kLQNslTeroT0yfrUjrdY kAWXgRiW//Oq7wBg== 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 C2DFD1352A; 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 EPJQL6LdDGPrDAAAMHmgww (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 , "Ivan T. Ivanov" , Maxime Ripard Subject: [RESEND v4 2/3] clk: bcm: rpi: Handle pixel clock in firmware Date: Mon, 29 Aug 2022 18:21:53 +0300 Message-Id: <20220829152154.147250-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The clk-bcm2835 handling of the pixel clock does not function correctly when the HDMI power domain is disabled. The firmware supports it correctly, so add it to the firmware clock driver. Acked-by: Maxime Ripard Acked-by: Dave Stevenson Signed-off-by: Ivan T. Ivanov --- drivers/clk/bcm/clk-raspberrypi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 8f560c6b602d..1248c0d64eae 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -129,6 +129,9 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = { [RPI_FIRMWARE_V3D_CLK_ID] = { .export = true, }, + [RPI_FIRMWARE_PIXEL_CLK_ID] = { + .export = true, + }, [RPI_FIRMWARE_HEVC_CLK_ID] = { .export = true, }, 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: 12958049 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 C327EC0502E for ; Mon, 29 Aug 2022 15:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbiH2Pj3 (ORCPT ); Mon, 29 Aug 2022 11:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbiH2PjY (ORCPT ); Mon, 29 Aug 2022 11:39:24 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4135956A1 for ; Mon, 29 Aug 2022 08:39:16 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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, + }, }; /*