Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp205911iob; Mon, 2 May 2022 17:11:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzewPMOjRfnPNSK+GAdYj4bAehmQ9+6wOUSKk6/4tDS7dwpgGJX+bqfNXEi+bugOxdoKdf2 X-Received: by 2002:a17:902:a705:b0:156:9cc5:1d6f with SMTP id w5-20020a170902a70500b001569cc51d6fmr14164390plq.66.1651536667470; Mon, 02 May 2022 17:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651536667; cv=none; d=google.com; s=arc-20160816; b=W87WiVIft7+2qABTI/+RCvzQPt+mgEAQfYblh8p2DmwFNycFIA6dHquSqJaGJxa+Cd ntGCl7Opbfu06v1LepRW9PEJU3UvfTcYuBRuYifuJ0ktC4s//8/OhSpnD8azb1Bug3T+ td0Ryj+57AxgruJTh9bwCRk1JdGfz2JVnhwVz9RblB3/7feF+viLyQUs6psgk4/4O8d2 b1RarpOKAEC8qSqKUebV6Z4rsFbHKtMUZEm6yYYc9upROuEKi5aUbnV6M11bRHFQ7Vt5 zMx9OkwQ9urDH8PISBDZDI+Hi5xEGxOIrf6KQQZatRBhNUP24N/JXQT4Z4lQJS0ww8fg DlJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OIDuzCIPKhTa9WY+h3XLdVNOHnsiOuMLiCYEzErRMNU=; b=WjFxI3jhFKO+hLaBycSAWZmECoqZrhh2tW3hJjAXorCFamxds4nnDLUBy9tfdR1nrc EEz0Smg8gDV4HhrVGox3Ou5BHQ23ke3WEiDTN5/4Cx19CDV1yXEqkWTRDjWL+ZBxiC6D Br1tF4IMJWPjtsiwc54YBQOI8ZiCCHeWe81AcFQRcoiwZi555dRuOC78zvRIysRvXGjI rGXpUyDsLqT6gO30cOqJw229k9ezLF8FjM1YDeeedCHvLAq37ayjHLS9Gw0h+6NgBqH8 9JB6K30Z3wbXKv9724Sgeagveg/mkF+2k2BWup2B+WHG/NI5C9KFikUr908gN7pfIMrp CGJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ID64eCQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w21-20020a056a0014d500b004fa895878afsi16900747pfu.254.2022.05.02.17.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:11:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ID64eCQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B8C3936B5A; Mon, 2 May 2022 17:09:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357090AbiD2J4J (ORCPT + 99 others); Fri, 29 Apr 2022 05:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357058AbiD2J4D (ORCPT ); Fri, 29 Apr 2022 05:56:03 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CBAF45062; Fri, 29 Apr 2022 02:52:42 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-2f863469afbso55637277b3.0; Fri, 29 Apr 2022 02:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OIDuzCIPKhTa9WY+h3XLdVNOHnsiOuMLiCYEzErRMNU=; b=ID64eCQwM5vG2Ac3xYtFh5ylbucRhYDcdWMdQtnYcbSoca2Kv5LQaNs4dhfYd7gsTi I9RgSfDQNmSjxaGjEiJUrm7OigW1fMzDoL1MeL7TK0Lc/ByVQX1PnNqae29kDm/2HtgG SGn8O0wQETElJgTPj1moORJITZa+E40sM4fwhQRA8eKgJXmTvM/N2LBRB19R+fZrfMlx QA1xYQx7E801SAPpNAs166TM6cjgCbiMbNpJjA2mm8b0+JXlKT26bwwlnqK1wW2i1QjC 3tGltyNiA8k8Fi3WsH0f1NQEeMyW3ae9CgSVMnGJSNgGJDwRyEBObTMvbvzLkuuTlkzQ jnsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OIDuzCIPKhTa9WY+h3XLdVNOHnsiOuMLiCYEzErRMNU=; b=ZhQW3XzcXPdSnxH9ZCUUMp6xPDjvGmhYc/n3VqbDRorNe/SWI0lvCU9vEmipjP/Vo0 XP4drr77kTAWVkziHwCQtDmgHMdfnPDVtkzUIMVtOI5wqb+1h2t8rrdz5hFmz8JC8hMV 8nryiOFbjgjcodk8fPAG3PgdvF08XNIDOBlR+/2EAQ3n0kO1SgMp5VncejgdsRWcWIXu ETNxPO///3G/ZMW8KgfTFqSgWXlDAUcuPmMECQB9SzqK/afJwPGTh1BCrsEoSgGdEPXi W7TwZq2zHz2KZ7XoJ67UFK751pK/wYGXm6+L8et+tiagYNOoRTnsmntl1YbxtHQQOiqS Z6ZA== X-Gm-Message-State: AOAM531OjwEwH9iwWdP+1M8IVtFA0zhmFWqFd/H9VJyRojdonT2j/YRo dQNRXtJnV5il2Z1TkTghL1Fkx9+gOaDx4AJnN4E= X-Received: by 2002:a0d:dd16:0:b0:2f4:dc1e:e0d8 with SMTP id g22-20020a0ddd16000000b002f4dc1ee0d8mr37713832ywe.413.1651225961324; Fri, 29 Apr 2022 02:52:41 -0700 (PDT) MIME-Version: 1.0 References: <20220421221159.31729-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220421221159.31729-2-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Fri, 29 Apr 2022 10:52:15 +0100 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: interrupt-controller: Add Renesas RZ/G2L Interrupt Controller To: Geert Uytterhoeven Cc: Lad Prabhakar , Marc Zyngier , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Geert Uytterhoeven , Linux Kernel Mailing List , Linux-Renesas , Biju Das Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Fri, Apr 29, 2022 at 9:44 AM Geert Uytterhoeven wrote: > > Hi Prabhakar, > > On Fri, Apr 29, 2022 at 10:38 AM Lad, Prabhakar > wrote: > > On Thu, Apr 28, 2022 at 10:32 AM Geert Uytterhoeven > > > On Fri, Apr 22, 2022 at 12:12 AM Lad Prabhakar > > > wrote: > > > > Add DT bindings for the Renesas RZ/G2L Interrupt Controller. > > > > > > > > Signed-off-by: Lad Prabhakar > > > > > > Thanks for your patch! > > > > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml > > > > @@ -0,0 +1,131 @@ > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > +%YAML 1.2 > > > > +--- > > > > +$id: http://devicetree.org/schemas/interrupt-controller/renesas,rzg2l-irqc.yaml# > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > > + > > > > +title: Renesas RZ/G2L (and alike SoC's) Interrupt Controller (IA55) > > > > + > > > > +maintainers: > > > > + - Lad Prabhakar > > > > + - Geert Uytterhoeven > > > > + > > > > +description: | > > > > + IA55 performs various interrupt controls including synchronization for the external > > > > + interrupts of NMI, IRQ, and GPIOINT and the interrupts of the built-in peripheral > > > > + interrupts output by each IP. And it notifies the interrupt to the GIC > > > > + - IRQ sense select for 8 external interrupts, mapped to 8 GIC SPI interrupts > > > > + - GPIO pins used as external interrupt input pins, mapped to 32 GIC SPI interrupts > > > > + - NMI edge select (NMI is not treated as NMI exception and supports fall edge and > > > > + stand-up edge detection interrupts) > > > > + > > > > +allOf: > > > > + - $ref: /schemas/interrupt-controller.yaml# > > > > + > > > > +properties: > > > > + compatible: > > > > + items: > > > > + - enum: > > > > + - renesas,r9a07g044-irqc # RZ/G2L > > > > + - const: renesas,rzg2l-irqc > > > > + > > > > + '#interrupt-cells': > > > > + const: 2 > > > > > > What is the meaning of the cells? IRQ number + flags, I assume? > > IRQ number and the type. > > > > > How are the numbers mapped, do you need a DT bindings header? > > No, just plain numbers are used (driver handles the validation of the > > interrupt numbering), for example like below, > > > > ð0 { > > ... > > status = "okay"; > > > > phy0: ethernet-phy@7 { > > compatible = "ethernet-phy-id0022.1640", > > "ethernet-phy-ieee802.3-c22"; > > reg = <7>; > > interrupt-parent = <&irqc>; > > interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > > OK, so the number must be an external interrupt number (0..7). > Yep that's right. > > ... > > }; > > }; > > > > And for the GPIO: > > > > key-1 { > > gpios = <&pinctrl RZG2L_GPIO(43, 0) GPIO_ACTIVE_HIGH>; > > linux,code = ; > > linux,input-type = ; > > wakeup-source; > > label = "SW1"; > > }; > > OK, so in this case the interrupt number is obtained implicitly, and > no interrupts property is used. > Indeed. > > > Perhaps it would make sense to increase to 3 cells, so you can use > > > one cell for the type (cfr. e.g. GIC_SPI), and the second for the > > > plain index within the type? > > > > > Could you please elaborate on this. Are you referring to the type here > > as the type to be set up in the GIC? > > Please ignore, you don't need the type, as it's always an external > interrupt number, right? > Yep that's right. Cheers, Prabhakar > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds