Received: by 10.223.176.5 with SMTP id f5csp2571488wra; Thu, 1 Feb 2018 02:34:46 -0800 (PST) X-Google-Smtp-Source: AH8x224G4HKjiD/OTYkDNotyCeh2eXG3KZ8LqpRGTeCwyMkkKdmQN5hcrpsZmOhB3Ef1arWLHe/5 X-Received: by 10.99.126.84 with SMTP id o20mr28465568pgn.329.1517481286079; Thu, 01 Feb 2018 02:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517481286; cv=none; d=google.com; s=arc-20160816; b=Sx7cNVr2WY8buIn2racSW5OAaxhqzMXcNVuqVXIOPJNLD3j3IrN7vo9wIdznTTToa1 IqxFJ6yPabm+wUSbRcT5RQN2gq4uo4zn6Kie+NEy6RjCBRICYlNWujsIAemaxYaJwL/6 SJ915F54KYilvP/5j7I+UKmxR5fDSz/oTQTPPhuSbo90V1l39LAcouG6tLOyKjsQ2Ojd QQZ2gUsn4iRaTGQPafk3qvKpCxYEtll8LeWtmYPLd/aAgKCSwpJJOR+blPhXhwkw/o/Q GD193InknLCFeiyAX7Uo+Cay5nlrGALIIAyqN001TvYAFfPCNVI4YRgxkZOnahrSPhJr rJ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ow2LFr1cjZOh5X2dXEV8PMxkene4DamZiy6PYTKxe3U=; b=wfzQ701NgIB7OcX7fR54jhltlNBs7ive293mlCLcYGBAwiWeR9oVp3dA+b+hwnPvC1 pqlWO4oId3jAlwQP51F5L02DiWtzdbNMaQTA3hLW8ZPkF9O/DqBgeXxtXGRtKKeTtBjh u0SOBA0brTrdO+r/AVM5ib6ZTurGXEViHx9Y+MYgUh5e4Bzxg5kHYiZaz9ukQ1MQsPzw 2/1tYpxBTj36KAUDHAfjXmSFCO0NRWaUrc8Xnsnzj/JR0Mrq+ej+TeZjlcrAeL/86K/k Ojg2REypWfDU64Pfrv+stw9YxNvW/aMUHi4DkBEZdzx1xM4Sr9n0l/F8ovZljfNjBB0l P10w== 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 e3si7633810pfi.191.2018.02.01.02.34.31; Thu, 01 Feb 2018 02:34:46 -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 S1752122AbeBAKdb (ORCPT + 99 others); Thu, 1 Feb 2018 05:33:31 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47362 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbeBAKd1 (ORCPT ); Thu, 1 Feb 2018 05:33:27 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DBBEB80D; Thu, 1 Feb 2018 02:33:26 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43ADE3F25C; Thu, 1 Feb 2018 02:33:24 -0800 (PST) Date: Thu, 1 Feb 2018 10:33:21 +0000 From: Mark Rutland To: Jolly Shah Cc: "ard.biesheuvel@linaro.org" , "mingo@kernel.org" , "gregkh@linuxfoundation.org" , "matt@codeblueprint.co.uk" , "sudeep.holla@arm.com" , "hkallweit1@gmail.com" , "keescook@chromium.org" , "dmitry.torokhov@gmail.com" , "michal.simek@xilinx.com" , "robh+dt@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Rajan Vaja Subject: Re: [PATCH v3 2/4] drivers: firmware: xilinx: Add ZynqMP firmware driver Message-ID: <20180201103321.fftn37mgzbk6oltl@lakrids.cambridge.arm.com> References: <1516836074-4149-1-git-send-email-jollys@xilinx.com> <1516836074-4149-3-git-send-email-jollys@xilinx.com> <20180131182012.oshjmvahetaizlbu@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 01:23:48AM +0000, Jolly Shah wrote: > Hi Mark, > Thanks for the review, > > > -----Original Message----- > > From: Mark Rutland [mailto:mark.rutland@arm.com] > > Sent: Wednesday, January 31, 2018 10:20 AM > > To: Jolly Shah > > Cc: ard.biesheuvel@linaro.org; mingo@kernel.org; > > gregkh@linuxfoundation.org; matt@codeblueprint.co.uk; > > sudeep.holla@arm.com; hkallweit1@gmail.com; keescook@chromium.org; > > dmitry.torokhov@gmail.com; michal.simek@xilinx.com; robh+dt@kernel.org; > > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > > devicetree@vger.kernel.org; Jolly Shah ; Rajan Vaja > > > > Subject: Re: [PATCH v3 2/4] drivers: firmware: xilinx: Add ZynqMP firmware > > driver > > > > On Wed, Jan 24, 2018 at 03:21:12PM -0800, Jolly Shah wrote: > > > This patch is adding communication layer with firmware. > > > Firmware driver provides an interface to firmware APIs. > > > Interface APIs can be used by any driver to communicate to > > > PMUFW(Platform Management Unit). All requests go through ATF. > > > > > +/** > > > + * zynqmp_pm_set_wakeup_source - PM call to specify the wakeup source > > > + * while suspended > > > + * @target: Node ID of the targeted PU or subsystem > > > + * @wakeup_node:Node ID of the wakeup peripheral > > > + * @enable: Enable or disable the specified peripheral as wake source > > > + * > > > + * Return: Returns status, either success or error+reason > > > + */ > > > +static int zynqmp_pm_set_wakeup_source(const u32 target, > > > + const u32 wakeup_node, > > > + const u32 enable) > > > +{ > > > + return invoke_pm_fn(PM_SET_WAKEUP_SOURCE, target, > > > + wakeup_node, enable, 0, NULL); } > > > > I see many functions take a "Node ID" parameter, but these don't appear to be > > in any DT binding, and drivers (other than the debugfs driver) aren't using them. > > > > What's the plan for making use of these? Where are the node IDs going to come > > from in practice? > > > Node ids are defined in firmware.h. Node id refers to targeted PU/subsystem/peripheral for required action. Ok. What I was asking was how a node id would be associated with particular peripheral instances (which are presumably going to be nodes in the DT). e.g. if I have device@foo { compatible = "xlnx,some-device"; reg = <0xf00 0x100>; ... }; ... how does the kernel know which node id(s) the device is associated with? I assume that those will need something like a xlnx,eemi-node-id property. [...] > > > +/** > > > + * zynqmp_pm_pinctrl_request - Request Pin from firmware > > > + * @pin: Pin number to request > > > + * > > > > No DT binding for the pinctrl bits? > > > > [...] > It doesn't require any bindings. Calling drivers will have DT binding for pins they use. For those drivers to be able to refer to the EEMI FW as a pin controller, we'll need a pinctrl node in the DT (and hence a binding). > > > +/** > > > + * zynqmp_pm_clock_enable - Enable the clock for given id > > > + * @clock_id: ID of the clock to be enabled > > > + * > > > > Likewise for the clocks? > > > It doesn't require bindings too. As with pinctrl, for drivers to be able to refer to these clocks, we'll need a clock node in the DT (and hence a binding). Thanks, Mark.