Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4077986imu; Fri, 30 Nov 2018 10:34:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/XnMI9Qwec0GAUqbJZXT0VigbvPsVzEQiDycVW7MK7Qb19ASCwjNbtCixjSxOItE3uSXvYv X-Received: by 2002:aa7:810c:: with SMTP id b12mr6622281pfi.44.1543602877552; Fri, 30 Nov 2018 10:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543602877; cv=none; d=google.com; s=arc-20160816; b=gGDKk4gho4Qpg3dgFdAnjKprlVt1iEnxjEMbLJ2QhX++Wbr+mOPdnyS/LQvShBHApF o8/6YVymmSBSTrIjr3Dvw4li5VBWoA7BPRy0KKKUF/V5uDN6m/tjWUfn3QGAI0AP+D95 EtPEYz/A5yH9e4FoC5q0OSOJbh3N3393syGqXt4nGWQJvC03+k7ZZzgwwxOxbE/YRbNG PgbvNH0SjIvYa5k6RlagHmZjkwhcYx5yNNlKSVYGSLYjE6ffftlvZ2VYDjDvr7k0IcVN 6BUpGpjAd41uM4/zEjH/kQN8tTzcQ9LcThqZT6dx3xANuorF315xcijo6uFJHIAcg+oe TSjw== 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:dmarc-filter:dkim-signature:dkim-signature; bh=w1YOISgnFGQ9t25xcC2pzlLpTrEx04CYGtevYBKAJrs=; b=EPSvovux68vfyh3DQx1/Y9hED65zIH1bE5K15pLI58DOEUhi9plmrxMsSw1hSJ44W6 uVekqoYswr3nb0jjZDhzpUWQIFI+3+U6PLoP8yk6VsKglK2EabH16m5tJrM19Yv5Xp01 wN+Aix3+otT0nDCw7QErqOyhAGBPBpbI5riXJMXqdZAx9RtWFAdx3cOapLUlSdJSjKTs JE38+253Nx5XCC0t00ojQIxl9CzOcTPvRM1hYuupxR3zwb+56dMtLnDXHuAZAucuplr8 +xxvtyfnK42RpjjFPeoC6iput9XmFjXzzbRXgRn7ji28+OSM6TiBQ5aEFuOIBj0Z82XR DYGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tjd8VjpE; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tjd8VjpE; 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 o1si5847255pld.79.2018.11.30.10.34.22; Fri, 30 Nov 2018 10:34:37 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tjd8VjpE; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tjd8VjpE; 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 S1726597AbeLAFn3 (ORCPT + 99 others); Sat, 1 Dec 2018 00:43:29 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:47916 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbeLAFn3 (ORCPT ); Sat, 1 Dec 2018 00:43:29 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C746260722; Fri, 30 Nov 2018 18:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543602798; bh=w1YOISgnFGQ9t25xcC2pzlLpTrEx04CYGtevYBKAJrs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tjd8VjpEqZyWMhSUiRR8IlA2dGtjPggR2s+DorIwiEbMdpBkKjZwPASI4j+W2JIHS 9T9n3AIHKd9twcH1NDoos2Ts+QcwFVcMdLN2VzvP7bUrmNPSpFn+VYbvmqz9KchvRr vaLQR3XYlPTuunF+OctG6lLJTnzqAOgkmelxX/1s= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 547C660251; Fri, 30 Nov 2018 18:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543602798; bh=w1YOISgnFGQ9t25xcC2pzlLpTrEx04CYGtevYBKAJrs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tjd8VjpEqZyWMhSUiRR8IlA2dGtjPggR2s+DorIwiEbMdpBkKjZwPASI4j+W2JIHS 9T9n3AIHKd9twcH1NDoos2Ts+QcwFVcMdLN2VzvP7bUrmNPSpFn+VYbvmqz9KchvRr vaLQR3XYlPTuunF+OctG6lLJTnzqAOgkmelxX/1s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 547C660251 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Fri, 30 Nov 2018 11:33:17 -0700 From: Lina Iyer To: Bjorn Andersson Cc: Stephen Boyd , evgreen@chromium.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, rplsssn@codeaurora.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, thierry.reding@gmail.com Subject: Re: [RFC v3 2/3] dt-bindings: sdm845-pinctrl: add wakeup interrupt parent for GPIO Message-ID: <20181130183317.GL18262@codeaurora.org> References: <20181121000648.29262-1-ilina@codeaurora.org> <20181121000648.29262-3-ilina@codeaurora.org> <154283618199.88331.10217252750356423959@swboyd.mtv.corp.google.com> <20181126161455.GA28236@codeaurora.org> <154330994255.88331.11409511159882116164@swboyd.mtv.corp.google.com> <20181127182123.GC28236@codeaurora.org> <154335513853.88331.9713562640538396853@swboyd.mtv.corp.google.com> <20181128173959.GC18262@codeaurora.org> <20181129002457.GJ24969@minitux> <20181129214539.GG18262@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181129214539.GG18262@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29 2018 at 14:45 -0700, Lina Iyer wrote: >On Wed, Nov 28 2018 at 17:25 -0700, Bjorn Andersson wrote: >>On Wed 28 Nov 09:39 PST 2018, Lina Iyer wrote: >> >>>On Tue, Nov 27 2018 at 14:45 -0700, Stephen Boyd wrote: >>>> Quoting Lina Iyer (2018-11-27 10:21:23) >>>> > On Tue, Nov 27 2018 at 02:12 -0700, Stephen Boyd wrote: [...] >BTW, I am discussing with the internal folks here on if we need to mask >TLMM when the wakeup-parent is MPM. If we don't have to, we should be >able to follow the same model as we done in this patch and don't even >have to check the compatible or use the approach suggested by Stephen. > The TLMM and the MPM are not active at the same time. However, there is a small chance they might be (a few clock cycles) when the system is going down, but even then, since we replay the interrupt from the MPM driver before the interrupts are serviced by Linux, we would not see multiple GPIO interrupts. The way we have MPM working downstream, for a wakeup GPIO IRQ - a. Application cores gets a wakeup interrupt either from RPM or GIC (if TLMM was not powered down) while still in the interrupt locked context. b. In the hardware, apps core handshakes with the RPM and then starts resuming from the platform's system idle driver. c. The first CPU to wake up calls MPM driver from the idle driver, which reads the shared memory to find the MPM pins that are set. Converts the MPM pins to their corresponding linux interrupt and replays the interrupt. d. Idle driver exits and wakeup GPIO interrupt is handled. The MPM pins are not updated after the RPM lets the application core to run. Since TLMM is functional after the RPM handshake, it takes over. Note, the downstream design is predicated on the OS-Initiated support for all MPM based SoCs which serializes the last CPU going down and the first CPU coming out of idle. Thanks, Lina