Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3764127ybv; Tue, 25 Feb 2020 06:57:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyrYdkUodhpit1dO9EERL2AMO0CaUbdTCD5cafYzYvDzoFmZYTY7L3EBGwWNa71nuqWOVZP X-Received: by 2002:aca:4c9:: with SMTP id 192mr4055500oie.105.1582642627498; Tue, 25 Feb 2020 06:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582642627; cv=none; d=google.com; s=arc-20160816; b=dny1DbUzgYK+KJJBEkGxzpytdRtlHtOtHNN/vyP8GNZOlxB261p2NM/4UdIFuUZRK1 av+wmhKqbNxtUxvuPUIHikN1iAdUAzAlBWcaloehZP86ESnRI/IQbQq0arP3FLiHcz4Q wNCjHEMtZ4KKUkCa2nPyGCjMH4OsjRdQjdGRnp7sL0l7fo9ASqg6xqugDesLCEKYF3si Dqga8Jyji/s9m1fhBZJCe/3QZKpihFhC1Mpr+n4JzX/p/aiTPfTpQz3FzQiIDLhXqlzb DahIzYW4h/b3w3YEY/oxiqA1M4lVyF2L8/zvjk4JlkEUAGokCCCsOzkyDKYts+ghQ8BB XANQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=TNBTl4IkLfNZH2f7yd4EqmqOVaqCfecYs0HJbrtUj0A=; b=f9OJpB4ldclJxosLAeRNqAZVs49/kQFVS2vOE+opXLtDr5VLDUofhJJ/P8poH6mVG/ 2Wf5hveB9TAzUAmQ+9RE7fKfgDO2gyUkOhJA/Y86wsi1AaDEGdfSkLJAPkZ9zhw6LT+c IP7axLXuXS/fvMTX17QwA6VTPKzNpY2Bfjoy968ox9gDBRA52hvCiALKkUuYDhjAulun kNWhvwQTaWjL0ggRXxg77FY71FrqnEj5bIVKPIVaPBnEqiEWcXEqd1yXCy+gxBcUX8SZ FF11qcb/o/rVWknXYh3euzrlR6TVYjsPJ8tvrRYe29Unk+CcX5sl4uXYn/Gj4LD4D7NR xdKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si6370288oic.169.2020.02.25.06.56.42; Tue, 25 Feb 2020 06:57:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730704AbgBYOd2 (ORCPT + 99 others); Tue, 25 Feb 2020 09:33:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:43716 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729048AbgBYOd2 (ORCPT ); Tue, 25 Feb 2020 09:33:28 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BCCD8B14B; Tue, 25 Feb 2020 14:33:25 +0000 (UTC) Message-ID: <5754451af3663ba39e8358dd15e586ee1485f86a.camel@suse.de> Subject: Re: [PATCH 16/89] clk: bcm: rpi: Add clock id to data From: Nicolas Saenz Julienne To: Maxime Ripard , Stefan Wahren Cc: Eric Anholt , Tim Gover , Dave Stevenson , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Phil Elwell , linux-arm-kernel@lists.infradead.org Date: Tue, 25 Feb 2020 15:33:23 +0100 In-Reply-To: <20200225095433.tyxamibqyrgw5355@gilmour.lan> References: <3028e04887c7b8a6ffc150c016aa63281461b434.1582533919.git-series.maxime@cerno.tech> <67855a10-f7cb-b6b3-7b9f-d9c9baa5f105@i2se.com> <20200225095433.tyxamibqyrgw5355@gilmour.lan> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-k9G+OdjwEzh2rr0BSMKX" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-k9G+OdjwEzh2rr0BSMKX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Maxime, On Tue, 2020-02-25 at 10:54 +0100, Maxime Ripard wrote: > Hi Stefan, >=20 > On Mon, Feb 24, 2020 at 08:25:46PM +0100, Stefan Wahren wrote: > > Hi Maxime, > >=20 > > Am 24.02.20 um 10:06 schrieb Maxime Ripard: > > > The driver has really only supported one clock so far and has hardcod= ed > > > the > > > ID used in communications with the firmware in all the functions > > > implementing the clock framework hooks. Let's store that in the clock= data > > > structure so that we can support more clocks later on. > >=20 > > thank you for this series. I looked through it but i couldn't find an > > explanation why we need to expose firmware clocks via DT instead of > > extending clk-bcm2835. The whole pllb / clk-raspberrypi stuff was an > > exception to get cpufreq working. I prefer to keep it an exception. >=20 > Thanks for pointing this out, I indeed forgot to address it in my > cover letter or my commit log. >=20 > I'm not quite sure what the situation was with the previous > RaspberryPi, but the RPi4 firmware does a bunch of things under the > hood to make sure that everything works as expected: >=20 > - The HSM (and V3D) clocks will be reparented to multiple PLLs > depending on the rate being asked for. > - Still depending on the rate, the firmware will adjust the voltage > of the various PLLs. > - Depending on the temperature of the CPU and GPU, the firmware will > change the rate of clocks to throttle in case of the cores > overheating, with all the fallout that might happen to clocks > deriving from it. > - No matter what we choose to do in Linux, this will happen so > whether or not we want to do it, so doing it behind the firmware's > back (or the firmware doing it behind Linux's back) will only > result in troubles, with voltages too low, or the firmware trying > to access the same register at the same time than the Linux driver > would, etc. >=20 > So all in all, it just seems much easier and safer to use the firmware > clocks. I agree with your assesment. Both DVFS and overheating/overvoltage protecti= ons will cause trouble, if not, make a Linux solution impossible while using th= e Foundation's firmware. Please note that, as Stefan says, it'd be nice to keep track of those argum= ents somewhere in the commit messages. Regards, Nicolas --=-k9G+OdjwEzh2rr0BSMKX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl5VMDMACgkQlfZmHno8 x/4/WQf+Kyv1s3y5c1zna47wu/wkKyIjrM7qRGSnveL9N9nIqBjK0Z4BH7iLDXBx 25kFxVsa9SyNx5ipe612NlRgWcyYHbOxwaWI7SynhXnoSHvAd990CGpEAMA/WZx4 jvB2Ll/SRJuHXtpAyRmZyOOBUE6vX7hnM/wC/Rl3pdd9jvc6phjEza5bB54BTGXW /CLu1E+DR/Yr1KPkeP6odZ+Xfc5UIuyYGqDi9lALXg7mPJhYjKYdMRHtbueyyNMI VGh5So6ZKwPMRCqruOh8C2A2+UqHg2Q8vq5x52uFBUC4PZXKgzpgDRWJBiPJLqhu pVGAeN2+7Odf4HzO6fexgYGCxlooRg== =yNC6 -----END PGP SIGNATURE----- --=-k9G+OdjwEzh2rr0BSMKX--