From patchwork Wed Oct 26 13:17:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13020605 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 762B1C38A2D for ; Wed, 26 Oct 2022 13:20:40 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=shyv4J6Iho8E539Ahj6GW6CqQgGWszwtRs0SoMiraIs=; b=ZB6xP5h2oXI6NA s0AU+kn4LhNq/tRglKm1mpBmRUFyhoqwribgdlS8f4dDppz8Bwd30VXf4/AHtr0IQVsqS0BJPeZrT 2hQlzs0SnSyzmulz/Hn/rsv/nq4qACYjr8QpJKjSuGymNtnhSt3Urm69g76CI+MzYC6H9dk2xFpIV br8RNNtt2V93hlB5NUsfBCX7DekzZeuQZTEfZBcM/jYWVzkIelHX7gXYdSiSb0yKP5SS/mNSqK1Ur a1YjBI5mB425AdwPF+ZD8LFs6fvgrgBWwxygwtIOxn8YPzcDhUUhwbQfoVWGiZ7SQ3xk+5o4EadRK aPI+zaWdQzeXh74nTBWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ongJW-009S6L-IZ; Wed, 26 Oct 2022 13:19:22 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ongJJ-009S1i-6w; Wed, 26 Oct 2022 13:19:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 4F337580628; Wed, 26 Oct 2022 09:19:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 26 Oct 2022 09:19:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666790348; x= 1666797548; bh=TLywN80PBRSGp1V7EoHZWP5yAlnJT7LvlPlsl/LopeQ=; b=K vVDUGuAsJPAAANUw0L3cfSLaL0YauHgYtmYc0AS93jMRR0vR7LJK6ZLI7GRKZOI9 fuItjjJjuN2nXfwcNRBj6LkLopSrSR4Vsgo5zNsW9Hg44Hbbg0e2CDGuL137jLOU in1TX3SqB19cvK8OemEI5L1jbpVzACsZ14Lsh/0k3PbuTkB95KB17d9n1fkrQjet cC6vNM4CFUINvoyCXRUWVCjjfnTJNleaDE6CTiMHAyaXGT1M6Q+f6fRv8+Sm1qQ2 JZ6fprP670ZY+Hn0yfs//e60xOGVpoihlnyuXlPxXDeDJz1kcIvH8N8iX4tM2gFD cTums7LqLTRtPF0I8ga4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1666790348; x= 1666797548; bh=TLywN80PBRSGp1V7EoHZWP5yAlnJT7LvlPlsl/LopeQ=; b=g nqT2+3XrQg7c1oXRlXRozHMxTPHBtzzY48/WaveMrAqb+rf+NKkq6GXF99J4Z4d8 NFH3a1H62sr3c66YKAllmytzEX5asgq4EJTYyr1HnNvIs6GYX9Eg1lvwcL6YlW4n fH4QHUZvLvY9JEqyRX7r3AKN0IgqEYbBi4ITvIlOuHG+/+aV96TTPg76zaYMQoD2 qnWFLQm87K0HkFZUNTtzdXKRp09epdU7L0HfpxHJ5LhZQC5YFAZDWZdan97odszT cRt+iSYbmVeOtZ3z0YUK3fkO9MC3nJX2MXiM470AdjO1ClKDgVA2UmkXAV4Nzf2W K7tF29+Z3F59iMFqo2h4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtddvgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhfffugggtgffkfhgjvfevofesthekredtredtjeenucfhrhhomhepmhgrgihi mhgvsegtvghrnhhordhtvggthhenucggtffrrghtthgvrhhnpeelleejkeejgfekteduhe euteevleeukeekleeukefgfeeghfeguedvheeuudfhheenucffohhmrghinhepkhgvrhhn vghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Oct 2022 09:19:07 -0400 (EDT) From: maxime@cerno.tech Date: Wed, 26 Oct 2022 15:17:39 +0200 Subject: [PATCH 2/2] ARM: dts: bcm2835-rpi: Use firmware clocks for display MIME-Version: 1.0 Message-Id: <20221026-rpi-display-fw-clk-v1-2-5c29b7a3d8b0@cerno.tech> References: <20221026-rpi-display-fw-clk-v1-0-5c29b7a3d8b0@cerno.tech> In-Reply-To: <20221026-rpi-display-fw-clk-v1-0-5c29b7a3d8b0@cerno.tech> To: Rob Herring , Krzysztof Kozlowski , Ray Jui , Scott Branden , Broadcom internal kernel review list , Florian Fainelli Cc: linux-rpi-kernel@lists.infradead.org, Maxime Ripard , Dave Stevenson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Phil Elwell , linux-kernel@vger.kernel.org, Dom Cobley X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1272; i=maxime@cerno.tech; h=from:subject:message-id; bh=4odMoAG1abpvun5lAxsDv4lzD0ztevxrOrt8+5rnofY=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMmRxsWTjk13zmBZW8H69PDa7m1b02PbOSd69C1l72R/FlIi sehMRykLgxgXg6yYIkuMsPmSuFOzXney8c2DmcPKBDKEgYtTACai7MPwz+DaYQMXi/+7X/f3b1cTYp zUd67cz/nhpzMR/msvxDVuvcnw3+uj/BL1phwl/b5EbqGu05xqe8MV4vdmfz+zZOGk7nWzGQE= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_061909_877096_37CA596B X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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 We've experienced a number of issues around the cohabitation between the "real" clock driver in Linux and the one backed by the firmware. One solution around this is to follow what the RaspberryPi foundation in its downstream clock, which is also what we've been doing on the RaspberryPi4: to use the clocks exposed by the firmware. Link: https://lore.kernel.org/linux-clk/20221021140505.kjmw5x4s6qhnrfif@houat/ Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/bcm2835-rpi-common.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835-rpi-common.dtsi b/arch/arm/boot/dts/bcm2835-rpi-common.dtsi index 8a55b6cded59..4e7b4a592da7 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-common.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi-common.dtsi @@ -7,6 +7,23 @@ #include +&firmware { + firmware_clocks: clocks { + compatible = "raspberrypi,firmware-clocks"; + #clock-cells = <1>; + }; +}; + +&hdmi { + clocks = <&firmware_clocks 9>, + <&firmware_clocks 13>; + clock-names = "pixel", "hdmi"; +}; + &v3d { power-domains = <&power RPI_POWER_DOMAIN_V3D>; }; + +&vec { + clocks = <&firmware_clocks 15>; +};