From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbdGEG4E (ORCPT ); Wed, 5 Jul 2017 02:56:04 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:42061 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbdGEG4C (ORCPT ); Wed, 5 Jul 2017 02:56:02 -0400 Date: Wed, 5 Jul 2017 08:55:59 +0200 From: Maxime Ripard To: Andre Przywara Cc: Jassi Brar , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Chen-Yu Tsai , Icenowy Zheng , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: Re: [PATCH 0/8] mailbox: arm/arm64: introduce smc triggered mailbox Message-ID: <20170705065559.6iehfacpiq74crz4@flea> References: <20170630095608.24943-1-andre.przywara@arm.com> <20170630122529.upjigip4hztrq67h@flea> <7a58855c-7481-320e-19f0-83bd113ef2c0@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kgjn2oxrxfjv4y43" Content-Disposition: inline In-Reply-To: <7a58855c-7481-320e-19f0-83bd113ef2c0@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kgjn2oxrxfjv4y43 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 30, 2017 at 01:56:04PM +0100, Andre Przywara wrote: > Hi, >=20 > thanks for having a look! >=20 > On 30/06/17 13:25, Maxime Ripard wrote: > > Hi, > >=20 > > On Fri, Jun 30, 2017 at 10:56:00AM +0100, Andre Przywara wrote: > >> The remaining patches demonstrate usage of this feature to drive SCPI = services > >> implemented as part of the ARM Trusted Firmware implementation used for > >> AArch64 based Allwinner SoCs, the Allwinner A64 in this example. > >> It allows to provide DVFS services, sensors support, device power doma= ins > >> and potentially other services like clocks or regulators. > >> This allows to abstract those features in firmware, without the need to > >> implement explicit Linux support for each variant of some SoC design. > >> Those DT changes are not necessarily meant to be merged at this point. > >> I started implementing the firmware side of those services and put a W= IP > >> branch on my ATF Github repo [1]. With this branch and these patches h= ere > >> you get DVFS and temperature sensor support for the A64, just with this > >> driver and the generic SCPI support. > >=20 > > I would go even further, and say that these changes should be done by > > the bootloader itself once it installed the proper monitor. > >=20 > > These patches represent not a state of the hardware itself, but the > > state the bootloader let the hardware in, and that state will change > > from one bootloader to the other, and one version to the other > > (obviously). This is already what we do for the other things the > > bootloader initializes (like simplefb, or PSCI). It just feels natural > > to do the same thing here. >=20 > Yes, indeed that was my thinking as well. I just put those DT changes in > here to demonstrate how it would look like. >=20 > Technically ATF (as the provider for the SCPI services) should do the DT > change. That would also assure that those changes are always in sync > with what's implemented. Mainline ATF seems to include libfdt now, but I > haven't checked in detail how much this covers and how easy it is to > use. Even with just the libfdt's DT manipulation functions, this should be quite easy. The steps needed would be: - Retrieve the phandle of the CCU node - Delete the CCU node (or mark it disabled, and remove its phandle property) - Add the SCPI nodes with the original's CCU phandle in your variable clocks subnode The last part especially might be a bit painful, especially the generation of the indices and names. You also have the option of using an overlay and applying it if your libfdt is recent enough. That way, you'll just need to care about keeping the phandle in your code, but that's all. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --kgjn2oxrxfjv4y43 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJZXI1/AAoJEBx+YmzsjxAgvggQALEHeJGvR2uvN65euFHJqIXw qMIZBM3mhbORXIUSdX1WyXs6NgEyWKwVL8VZluVzbFZSM/RnFBFE0aQGeyo8SBJs 5O82c702Y1cx8IfONZlZMJcbiYjCvzGgMCRR8cchHV+ldRWsWE293UQkPOVJvA+0 mq2o8bKr/Y081ZRKWUjb8VQg39DrgzE6T1IuQufOa/BC99ooNCjKGZjVBUOjdPRx yiJuGRfvT+tkAA7oWSguQyR6/xT+sK3dxRrwVCvyPZl1Hu46SmYJBZZCDpa2RCEM DV5CBy6Dsa75aEDGUmohZd3RVi9bv3yQwv7P0lb1ySqeixUNFVQiWOEMeVHnavJm Ce3alZmZTe5RKLQbEUOLz1WSNaHS5LNLvMQhVvXsGfMvkfqR3fbBbg5c3b00dTcq XY2IbHqJiZK0OQep4AGTR5o9bhubj6bw8Gq5n3OMRi4JJCw0twx4Y1iKnZxFH1L1 I3z6qsL3xj/8YOxdFvcH+AaNmbSWlghY/F3Kl8grfJbHCAcAGZQGT1nZ1YCK9z5J or6R2vvrYeRXQH9cyLxFv24gAoqEiZ1CB/qaaLKzHyF6Z2oQT3TwqP2Js0dNSP6W hfG5FAKnmcdEdZZNZNTyUMUOCxW+LNTkj4UOpr3xjSIU74MB58QqF/NEDQGZcwOY Nkb6yhgEWMw+m8psdq1R =JaeG -----END PGP SIGNATURE----- --kgjn2oxrxfjv4y43--