From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbdF3M4F (ORCPT ); Fri, 30 Jun 2017 08:56:05 -0400 Received: from foss.arm.com ([217.140.101.70]:41958 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751751AbdF3M4D (ORCPT ); Fri, 30 Jun 2017 08:56:03 -0400 Subject: Re: [PATCH 0/8] mailbox: arm/arm64: introduce smc triggered mailbox To: Maxime Ripard 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 References: <20170630095608.24943-1-andre.przywara@arm.com> <20170630122529.upjigip4hztrq67h@flea> From: Andre Przywara Message-ID: <7a58855c-7481-320e-19f0-83bd113ef2c0@arm.com> Date: Fri, 30 Jun 2017 13:56:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170630122529.upjigip4hztrq67h@flea> Content-Type: text/plain; charset=windows-1252 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, thanks for having a look! On 30/06/17 13:25, Maxime Ripard wrote: > Hi, > > 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 domains >> 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 WIP >> branch on my ATF Github repo [1]. With this branch and these patches here >> you get DVFS and temperature sensor support for the A64, just with this >> driver and the generic SCPI support. > > I would go even further, and say that these changes should be done by > the bootloader itself once it installed the proper monitor. > > 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. Yes, indeed that was my thinking as well. I just put those DT changes in here to demonstrate how it would look like. 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. Also that would mean that the base DT has to be somewhere accessible by the ATF. So while this is eventually feasible to do (since the dtb is loaded by U-Boot's SPL, for instance), it's just not trivial or already implemented, that's why I would revert to provide some static DT and match that up in some firmware image for the time being. So indeed this makes those DT change not subject to Linux' concerns - and might trigger more discussions on the future of DTs in the kernel ;-) Cheers, Andre.