From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 B8CF2C433E0 for ; Fri, 8 Jan 2021 09:46:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BB7C23435 for ; Fri, 8 Jan 2021 09:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727294AbhAHJqE (ORCPT ); Fri, 8 Jan 2021 04:46:04 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:37869 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727661AbhAHJqE (ORCPT ); Fri, 8 Jan 2021 04:46:04 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id D9012580561; Fri, 8 Jan 2021 04:44:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 08 Jan 2021 04:44:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=t TtMNGskLOtyD7vtLn+5d15eH73b6jHQkp3x9E3BXt4=; b=mpQj9E0ih0BacLBI9 EyBqDyEi4/siFyN3iiI6PUpfUI2mkQz58BL4xQhZI+eSDYt6/jLRbpcA1oBMp5D9 rX+pMiQtqt5iMcxiha+qpQCX/4oTiIwX7Iqvswmd0gSpDE/oocyMHiiExgGM8bsD L8dLLBuhPcuBQMQpuMZfWcHH4Ni7S4FuW12lgc8dimOfd3WbwpUTWCbc8GoEm3SD K63Gtk4msfaZ2EOPuFI7ZGKo1xeEzBZ3ypYPj1mVfUDbZhv4legn/2Gq+W61+hFk 2bfRgjYNaB1/MXl4GL+FaNsb0NBI1qkULH4yN4/qfumijfdrf2ZSUSRL/o4XNMiL Qhj+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=tTtMNGskLOtyD7vtLn+5d15eH73b6jHQkp3x9E3BX t4=; b=UCn/KRtAmfT8TzrqE3VWYSPzJe5sSsc8mYA7qz9H/Y2f8VaXVCZdzBuqF aAs2bAQ7S1xYORf2L6IPA87Ei6Ad/AWx0nOEXYfL6oXWT9aFhmvjEZoMZofwljAY eFrY8rt9yjx79KIMehFj8NGI4EnwACaVZqjVhGw66nxvW7A78MR4B84qaBuOQikJ cZyO8hBUPO8kTwDTJgYaQz3stFNjBZl7qdPRnfTd5/arUzQ9/vqBkdh3bs9vPwrl 6EQfi6SSpRfJ4Wp/gxN1j1gZvpCxFjMOnbq/oxj/rnUXRhvxXnwoNoPSAnHheTpU h/0MIsJt4i8zZdHf5GlSZ7BU7w3ZQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeggedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgjeettdejgffgffdvteeutdehtdehgeehueetkeefgefhtdetjeekledu gedvudenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 0807324005E; Fri, 8 Jan 2021 04:44:54 -0500 (EST) Date: Fri, 8 Jan 2021 10:44:53 +0100 From: Maxime Ripard To: Samuel Holland Cc: Thomas Gleixner , Marc Zyngier , Rob Herring , Chen-Yu Tsai , Jernej Skrabec , Russell King , Catalin Marinas , Will Deacon , Ondrej Jirman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v3 01/10] dt-bindings: irq: sun6i-r: Split the binding from sun7i-nmi Message-ID: <20210108094453.7uk5lj6j6gdmydiw@gilmour> References: <20210103103101.33603-1-samuel@sholland.org> <20210103103101.33603-2-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210103103101.33603-2-samuel@sholland.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Samuel, Thanks a lot for working on this I'm fine with the rest of the work, but I have a couple of questions On Sun, Jan 03, 2021 at 04:30:52AM -0600, Samuel Holland wrote: > The R_INTC in the A31 and newer sun8i/sun50i SoCs has additional > functionality compared to the sun7i/sun9i NMI controller. Among other > things, it multiplexes up to 128 interrupts corresponding to (and in > parallel to) the first 128 GIC SPIs. This means the NMI is no longer the > lowest-numbered interrupt, since it is SPI 32 or 96 (depending on SoC). >=20 > To allow access to all multiplexed IRQs, the R_INTC requires a new > binding where the interrupt number matches the GIC interrupt number. > For simplicity, copy the three-cell GIC binding; this disambiguates > interrupt 0 in the old binding (the NMI) from interrupt 0 in the new > binding (SPI 0) by the number of cells. It's not really clear to me what the ambiguity is between the NMI and the SPI 0 interrupt? In general, it looks like switching to a 3-cell binding with the GIC SPI value looks weird to me, since the GIC isn't the parent at all of these interrupts. If the ambiguity is that a stacked irqchip driver needs to have the same interrupt number than the GIC, and that the 0 interrupt for the NMI controller (used by the PMIC) and is actually the 32 (or 96) GIC interrupt and thus breaks that requirement, can't we fix this in the driver based on the compatible? Something like if the interrupt number is 0, with a A31 or newer compatible, then add the proper offset in sun6i_r_intc_domain_alloc? Maxime