From patchwork Mon Jan 13 04:49:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 205831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3C7C33CAB for ; Mon, 13 Jan 2020 04:50:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9445622527 for ; Mon, 13 Jan 2020 04:50:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sholland.org header.i=@sholland.org header.b="H4U1i2ZQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="suCHuiSv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387579AbgAMEtk (ORCPT ); Sun, 12 Jan 2020 23:49:40 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:43033 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733103AbgAMEtk (ORCPT ); Sun, 12 Jan 2020 23:49:40 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id EB0AB6126; Sun, 12 Jan 2020 23:49:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 23:49:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=reXcLSbb+prTw I8AliRHNqGV5b9kALgHS1AE29T8AYU=; b=H4U1i2ZQj1rYKQQzTkEtBJnqb6xbM Phiq+UP9EMm+BWiL4BjDtXfMY7v5LIA6f+h3m10scf6jaH8bXdheafC2ueYogxRU 5MQ66O6OP6l/XSoz5O2YVo4kgHEDI+QiIKpWoi5GNWJs9KAlG593RREQ2WQrixz9 XX50/Wnzanm5W98IwMeTj4Roafbzsr6J5MNZrxqGD+A8k35Rrxgbnqyrf8GX702f CQaO+bhgsp2CmR1cYkaU5r9HY5r7P71qLIG9Ss2WHFCRiQia9WRPWDI10SLc/N3p s+EIGf6v15/7H1fXhsdfvM+X+7Z6QvRszpzx7K6MsjV46Cag90pvGJp1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=reXcLSbb+prTwI8AliRHNqGV5b9kALgHS1AE29T8AYU=; b=suCHuiSv dgYZl1S5aUrQvib47ij59kfAFjwWGbgddDTSpnlvVTUB7q5ywK2hyb14Qx1zfb/4 uUc3/YxYyOnqc/XOp7swbCzwoUDh5WiU15UykHynx/vNCuvzWO5qI6RQz7+eig4k KT3TFWSmeZrC6TLTcwpahzfC0a44tH3hI+ipj59kN9kArE3Rng03UE+TRTNGKm9A 2qQ11mU+hw8T5xmDpbpoecf+CT5n6ny8kVD1kHYZk9z5LYLwDuVoSfLkza+qtEc/ sBSJII4HJ0qc9lnhrUB4Lyr/bkoxiiCuirS5KabpWLNJCtZB4pfE4vIMPPGg8c7R vhsGmDbvM7cleA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucfkph epjedtrddufeehrddugeekrdduhedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghm uhgvlhesshhhohhllhgrnhgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 2F96030602DB; Sun, 12 Jan 2020 23:49:38 -0500 (EST) From: Samuel Holland To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Russell King , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH 2/9] irqchip/sun6i-r: Add wakeup support Date: Sun, 12 Jan 2020 22:49:29 -0600 Message-Id: <20200113044936.26038-3-samuel@sholland.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200113044936.26038-1-samuel@sholland.org> References: <20200113044936.26038-1-samuel@sholland.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org We maintain a mask of wake-enabled IRQs, and enable them in hardware during the syscore phase of suspend (once IRQs are globally turned off). We restore the original mask (either nothing or NMI only) during resume. This serves two purposes. First, it lets power management firmware running on the ARISC coprocessor know which wakeup sources Linux wants to have enabled. That way, it can avoid turning them off when it shuts down the remainder of the clock tree. Second, it preconfigures the ARISC coprocessor's interrupt controller, so the firmware's wakeup logic is as simple as waiting for an interrupt to arrive. Signed-off-by: Samuel Holland --- drivers/irqchip/irq-sun6i-r.c | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/drivers/irqchip/irq-sun6i-r.c b/drivers/irqchip/irq-sun6i-r.c index 37b6e9c60bf8..f4a4e335061b 100644 --- a/drivers/irqchip/irq-sun6i-r.c +++ b/drivers/irqchip/irq-sun6i-r.c @@ -3,12 +3,14 @@ // Allwinner A31 and newer SoCs R_INTC driver // +#include #include #include #include #include #include #include +#include #include @@ -31,6 +33,9 @@ enum { static void __iomem *base; static irq_hw_number_t parent_offset; static u32 parent_type; +#ifdef CONFIG_PM_SLEEP +static atomic_t wake_mask; +#endif static void sun6i_r_intc_irq_enable(struct irq_data *data) { @@ -108,6 +113,21 @@ static int sun6i_r_intc_irq_set_type(struct irq_data *data, unsigned int type) return irq_chip_set_type_parent(data, type); } +#ifdef CONFIG_PM_SLEEP +static int sun6i_r_intc_irq_set_wake(struct irq_data *data, unsigned int on) +{ + if (on) + atomic_or(BIT(data->hwirq), &wake_mask); + else + atomic_andnot(BIT(data->hwirq), &wake_mask); + + /* GIC cannot wake, so there is no need to call the parent hook. */ + return 0; +} +#else +#define sun6i_r_intc_irq_set_wake NULL +#endif + static struct irq_chip sun6i_r_intc_chip = { .name = "sun6i-r-intc", .irq_enable = sun6i_r_intc_irq_enable, @@ -118,6 +138,7 @@ static struct irq_chip sun6i_r_intc_chip = { .irq_set_affinity = irq_chip_set_affinity_parent, .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_set_type = sun6i_r_intc_irq_set_type, + .irq_set_wake = sun6i_r_intc_irq_set_wake, .irq_set_vcpu_affinity = irq_chip_set_vcpu_affinity_parent, }; @@ -171,6 +192,36 @@ static const struct irq_domain_ops sun6i_r_intc_domain_ops = { .free = irq_domain_free_irqs_common, }; +#ifdef CONFIG_PM_SLEEP +static int sun6i_r_intc_suspend(void) +{ + /* All wake IRQs are enabled during suspend. */ + writel(atomic_read(&wake_mask), base + SUN6I_R_INTC_ENABLE); + + return 0; +} + +static void sun6i_r_intc_resume(void) +{ + u32 mask = atomic_read(&wake_mask) & BIT(NMI_HWIRQ); + + /* Only the NMI is relevant during normal operation. */ + writel(mask, base + SUN6I_R_INTC_ENABLE); +} + +static struct syscore_ops sun6i_r_intc_syscore_ops = { + .suspend = sun6i_r_intc_suspend, + .resume = sun6i_r_intc_resume, +}; + +static void sun6i_r_intc_syscore_init(void) +{ + register_syscore_ops(&sun6i_r_intc_syscore_ops); +} +#else +static inline void sun6i_r_intc_syscore_init(void) {} +#endif + static int __init sun6i_r_intc_init(struct device_node *node, struct device_node *parent) { @@ -215,6 +266,8 @@ static int __init sun6i_r_intc_init(struct device_node *node, /* Clear any pending interrupts. */ writel(~0, base + SUN6I_R_INTC_PENDING); + sun6i_r_intc_syscore_init(); + return 0; } IRQCHIP_DECLARE(sun6i_r_intc, "allwinner,sun6i-a31-r-intc", sun6i_r_intc_init); From patchwork Mon Jan 13 04:49:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 205832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 327EBC33CAB for ; Mon, 13 Jan 2020 04:50:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04A662082E for ; Mon, 13 Jan 2020 04:50:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sholland.org header.i=@sholland.org header.b="i0k4vXpt"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rZavhl8Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387588AbgAMEuG (ORCPT ); Sun, 12 Jan 2020 23:50:06 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:36525 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733196AbgAMEtl (ORCPT ); Sun, 12 Jan 2020 23:49:41 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 243A76212; Sun, 12 Jan 2020 23:49:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 23:49:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=2ekAlpSljFfQr TZx7XNCd5b2by7K3DL7GlymedphPIM=; b=i0k4vXptqYZXL+Owi2N8+DPbkOYfd LzfYHKQBIihIX0X43VHBhwp/iERjwq/ZDAocL8X8a5RWlzAOA8JnQVlOjsXUtWu1 iJCxof2lflZU6X8kfqVMB5UjDStLagt3AcStEY+1V/Sh4z2fuArjmMXYMlrtLqNe ORuTndsH221edDVXzrrcwBdcpC3cNMXdv+kdytq0I/+bp27XzUmQpGD2hVC3A5nS bKnyX6m2fXck2kBKWuIx28oYUh3m/D2EI/4QsfinnF3DB4ZLJSVOMzWzM9vMsINh 2/GdwNTIKglQV4x8C2Q8veJvH5yBrmwH4be+0iPfKYmmgwiZvH+BNMVgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=2ekAlpSljFfQrTZx7XNCd5b2by7K3DL7GlymedphPIM=; b=rZavhl8Q l/iBfmpCHwiS6ZsDBOn6gKOYlLTy9Sv0ppaeVY5ronq39g9wYY3xQBM5N/zdzvf6 3p2kEHbVm6kjCO9I/PSunFa3/ahWx9bpwShs6KD/8aPqLhSrdsqrX466R2Z2+yi0 yjB/MKnfzDoczHKyM/A3EWForAzuwR2tXhIxnoHA/+qMc/2VhI6+n4fu4PFmTfAZ 8qalBabrN5Am9ctB86J06kIQP6PUWuy6sAuySibk31wARF0hgnFfNZ3aZwNZlyxk W2pNJYaepG+ISmVXjk+UYReUOdrtoSKO3ESn1f7B/maKZSVNlQdtYDe63TvJY18e EpDUFaDda8L/CA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucfkph epjedtrddufeehrddugeekrdduhedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghm uhgvlhesshhhohhllhgrnhgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 65CFA30607B0; Sun, 12 Jan 2020 23:49:39 -0500 (EST) From: Samuel Holland To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Russell King , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH 4/9] ARM: dts: sunxi: h3/h5: Add r_intc node Date: Sun, 12 Jan 2020 22:49:31 -0600 Message-Id: <20200113044936.26038-5-samuel@sholland.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200113044936.26038-1-samuel@sholland.org> References: <20200113044936.26038-1-samuel@sholland.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The H3 and H5 SoCs have an additional interrupt controller in the RTC power domain that can be used to enable wakeup for certain IRQs. Add a node for it. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 107eeafad20a..62660108550a 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -814,6 +814,15 @@ #clock-cells = <1>; }; + r_intc: interrupt-controller@1f00c00 { + compatible = "allwinner,sun8i-h3-r-intc", + "allwinner,sun6i-a31-r-intc"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c00 0x400>; + interrupts = ; + }; + r_ccu: clock@1f01400 { compatible = "allwinner,sun8i-h3-r-ccu"; reg = <0x01f01400 0x100>; From patchwork Mon Jan 13 04:49:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 205834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EBC4C33CAC for ; Mon, 13 Jan 2020 04:49:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14CBA2082E for ; Mon, 13 Jan 2020 04:49:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sholland.org header.i=@sholland.org header.b="hru3Yt7a"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mGyPVWuH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387651AbgAMEtu (ORCPT ); Sun, 12 Jan 2020 23:49:50 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:45527 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387613AbgAMEtn (ORCPT ); Sun, 12 Jan 2020 23:49:43 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id F2FE96591; Sun, 12 Jan 2020 23:49:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 23:49:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=SrzKOkLSwyAw5 L9dj6C7jHF7WcI4gH8AwCRGv5SLZvU=; b=hru3Yt7atFl9GBt+GCtCPdBmDUR9R JFsrya4klAomB+LvN5NPEpMSccZh8GRZk8f3xh20zGGhbzVPqqHZKVBfayYNk4y3 SW8EUBPQps+TQJnwtmAJJJA36EM1n/9tJItjX96FlaQVdPDujRWhiPp4gY58e4vN W/QXV6/NCu0NWthbHDzRS5eezxwYtOMrtDTOZMUhkE9LqyaYg83o06o3wUilMqK2 3U3lAlqO3Mtvjg0deA3y/0mOX6XbNtagd4HaYaAoi3lPcLvFrIl+D8yhjvTHqETH JgZVXM+UOONjbtxSoYMVv/v4mu/SHG5y2Y0af1OUwHPPtlA0/FE7o12Rg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=SrzKOkLSwyAw5L9dj6C7jHF7WcI4gH8AwCRGv5SLZvU=; b=mGyPVWuH DroLBHr2/I3FUZxIhEsoxeLkyfSZOj5sNrZTA2IzaJjWWyN1JuOAkAx0lkLxAOh0 RNykru32xUuhC5DT9504IHKi38fZGJx9w4C2Atlgh+bn30A2ywhqgwADcmQv4Mvl iC0noBfdQdq34LY5skGnmqH40K+YGfKYaPQCQqpb/ridLzj/CaVQuuGkJ2PvQovf Zatll07XFvDdfwwy2QBhZzWh9hKhl56fNKOCYwaGjQ9oEyudF/dxu6uJVCzGFe8+ vw6mTSa3hH4lBl0I+6pJ5ZYIg4WizFfI3j9h299I7jULWCjj+f6YCjZphN/BT2Sk Qo28wD5gnkJAAg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucfkph epjedtrddufeehrddugeekrdduhedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghm uhgvlhesshhhohhllhgrnhgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 3EDDE30607B4; Sun, 12 Jan 2020 23:49:41 -0500 (EST) From: Samuel Holland To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Russell King , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH 7/9] arm64: dts: allwinner: a64: Move wakeup-capable IRQs to r_intc Date: Sun, 12 Jan 2020 22:49:34 -0600 Message-Id: <20200113044936.26038-8-samuel@sholland.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200113044936.26038-1-samuel@sholland.org> References: <20200113044936.26038-1-samuel@sholland.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. r_intc IRQ numbers are offset by 32 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 70f4cce6be43..7b2cacc0aecc 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -1044,8 +1044,9 @@ compatible = "allwinner,sun50i-a64-rtc", "allwinner,sun8i-h3-rtc"; reg = <0x01f00000 0x400>; - interrupts = , - ; + interrupt-parent = <&r_intc>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>, + <9 IRQ_TYPE_LEVEL_HIGH>; clock-output-names = "osc32k", "osc32k-out", "iosc"; clocks = <&osc32k>; #clock-cells = <1>; @@ -1094,7 +1095,8 @@ clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>; clock-names = "apb", "ir"; resets = <&r_ccu RST_APB0_IR>; - interrupts = ; + interrupt-parent = <&r_intc>; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&r_ir_rx_pin>; status = "disabled"; @@ -1114,7 +1116,8 @@ r_pio: pinctrl@1f02c00 { compatible = "allwinner,sun50i-a64-r-pinctrl"; reg = <0x01f02c00 0x400>; - interrupts = ; + interrupt-parent = <&r_intc>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; clock-names = "apb", "hosc", "losc"; gpio-controller; From patchwork Mon Jan 13 04:49:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 205833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D7F7C33CAD for ; Mon, 13 Jan 2020 04:50:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6191021744 for ; Mon, 13 Jan 2020 04:50:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sholland.org header.i=@sholland.org header.b="A7ihwOn9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ZvrKjUhF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387613AbgAMEt5 (ORCPT ); Sun, 12 Jan 2020 23:49:57 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:42137 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387615AbgAMEtn (ORCPT ); Sun, 12 Jan 2020 23:49:43 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 94A7C59EA; Sun, 12 Jan 2020 23:49:42 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 23:49:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=8AqTt0s+nWzUs USBLaiZYq4YnGomy2QjysCCyqzWOoU=; b=A7ihwOn9nV/1HcNKs5AXZcdfksKfK 8cNegpmGsc7s1ytMfij5BbDOXHokrAXY7dtMeFgXsgioo2HjL+wIsP9aR/xirvhT zxYSvSr4YdDUAyKi3ntTfWMSgtifOnIK4SqtH+ouimDRtSWXYz1s03/izvu4Vdek OVseO0BucXuNf0Q+Yf9F1junaZyYdgJbcTvdip5LRzI4u4IR1TzY1ieD+qf6V7DE 9lAbQpx2iK5WXET8CqkA2zx0rFS10Kl1303jETJHh0QBzm7eRbyqmC+207rnKf3l X/DhcwxEAydY5CHNA3BDK4BNw5DpPg6iH9gxPT21kGQP91vG/sRCDuGSA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=8AqTt0s+nWzUsUSBLaiZYq4YnGomy2QjysCCyqzWOoU=; b=ZvrKjUhF jSurR8QJXFZ7emsATjBCQo5bnC9WBtehJZZTeOaZA9CkEeaMz8OeHexANiMfmhdP PFxywPQyKPE68MJvhSXTsd3vUed41NMzDpuTRQO2/GKsDJ30ZqP7qBGJ46zoyWYi daOmdwZK4iFaCGtHVSS/kx0n0ESLgYZPl700gjTzKOFhmldsLZF8LsF1S4nx1/1J l1h0tmYd6/vsbi+s9GjOz2SD9mQHVgibueB53at3v9kFhYfi7zvfxnd708JvBBWt rvZN1PkynwzPDm6Y3txcJe8OMFxdVkNzQt4J5Bbjr7MBD/Nu0ZbXhxmtZo8HPaGS fN0vaZ28x90kQw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucfkph epjedtrddufeehrddugeekrdduhedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghm uhgvlhesshhhohhllhgrnhgurdhorhhgnecuvehluhhsthgvrhfuihiivgepje X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id D468830602DB; Sun, 12 Jan 2020 23:49:41 -0500 (EST) From: Samuel Holland To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Russell King , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH 8/9] arm64: dts: allwinner: h6: Fix indentation of IR node Date: Sun, 12 Jan 2020 22:49:35 -0600 Message-Id: <20200113044936.26038-9-samuel@sholland.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200113044936.26038-1-samuel@sholland.org> References: <20200113044936.26038-1-samuel@sholland.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This node was indented by two tabs when added instead of one. Remove the extra tab. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 0d5ea19336a1..f597f3fe06c1 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -766,17 +766,17 @@ }; r_ir: ir@7040000 { - compatible = "allwinner,sun50i-h6-ir", - "allwinner,sun6i-a31-ir"; - reg = <0x07040000 0x400>; - interrupts = ; - clocks = <&r_ccu CLK_R_APB1_IR>, - <&r_ccu CLK_IR>; - clock-names = "apb", "ir"; - resets = <&r_ccu RST_R_APB1_IR>; - pinctrl-names = "default"; - pinctrl-0 = <&r_ir_rx_pin>; - status = "disabled"; + compatible = "allwinner,sun50i-h6-ir", + "allwinner,sun6i-a31-ir"; + reg = <0x07040000 0x400>; + interrupts = ; + clocks = <&r_ccu CLK_R_APB1_IR>, + <&r_ccu CLK_IR>; + clock-names = "apb", "ir"; + resets = <&r_ccu RST_R_APB1_IR>; + pinctrl-names = "default"; + pinctrl-0 = <&r_ir_rx_pin>; + status = "disabled"; }; r_i2c: i2c@7081400 {