From patchwork Mon Nov 7 17:53:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 16612 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2201781wru; Mon, 7 Nov 2022 09:56:24 -0800 (PST) X-Google-Smtp-Source: AMsMyM6z1ws4eOFwChQbgvwEIjn5S2ZVD0o/07AGodHvQcscQsccbfZPzDD/zeb2FH22FRuTFtEu X-Received: by 2002:a63:5606:0:b0:46f:714d:96ed with SMTP id k6-20020a635606000000b0046f714d96edmr43668505pgb.492.1667843783864; Mon, 07 Nov 2022 09:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843783; cv=none; d=google.com; s=arc-20160816; b=XVOPF8jvt94O5Up7eSNpDg+jzugo/6QGq+tm6HXQOGG9TkhtoD78QzJF2yRVIUBlLe ckVtT/1mo4x88PjYo9Taow8p+NRYIBKU2Rn9Kg84b5BEHT2FIZ04I7TJVL1cgRXtK7Mi 8EfJh990nws4RX7MhZE8a+j/1a/CKF3EMJfFffWJqOyBVoyethvDJ7qHB6cnS00BTP/z NG7+tvowffI0uoN5LfVCqlz7yPMHMABmI0wcr5DV5TdpCAhGX0SHM1kfvxvQh40uWJZB tCVDwFpdjXvV460WEsPadYaGw5z0aFQUvQzQjKoSd8ur1ajwQgIof3qxvaunphX7078h 49HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fZ1erY58kBlhlkmhk9QjyKuuzmHiyGJEgyZd797XqYk=; b=w5+/T3/24Fgy1C4FurZYPcmQfnYvVLul4vyyUfS95Zs4SaL5THK0x92GyDcYVIiQCT VksLr3T6GZFHiWnORi3MWmpUF1/x8uRNvTPB+hKb0oW6p0lM0vBvX8LHAAxCj9Kl68dK TIkpy1EmbxYi0sBzUzk+QJxn5wxZe7p9gHOsJ/zTmW3WHaLojNHe4KHXOum06PErd2rF Z0ptOX4WiSHPwEPB4O4XUf2xK9t0J3dUcuiPb5bCiMXnRaVkyvDMsn31ayTXCskddStp zKd/fznDqb2bOjyWwO5gxndjjTg6tP08fGO2GfivuMhB86g8VbwQvZeJWBIMBu9mhCr7 XnkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eyrR2GZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903120f00b00186b3cb49basi4674122plh.202.2022.11.07.09.56.11; Mon, 07 Nov 2022 09:56:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eyrR2GZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232076AbiKGRzH (ORCPT + 99 others); Mon, 7 Nov 2022 12:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbiKGRyN (ORCPT ); Mon, 7 Nov 2022 12:54:13 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D78A2496D; Mon, 7 Nov 2022 09:53:19 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id a14so17403962wru.5; Mon, 07 Nov 2022 09:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fZ1erY58kBlhlkmhk9QjyKuuzmHiyGJEgyZd797XqYk=; b=eyrR2GZIXjzm6iz1blmbSY//jE433W7wwwq2lG3UhlpeoKyc4FvX4tFcR1kQbKyZcA u+Ihdrjp6a2igl3uDxUCDm9QDuGFYXrlf47mAJf2xNSdHQbV3pXOUQKALB0kJEUCSpPz RoHjJR98iRDJE5RDMJCr4zeXP6pQ/EHDhlG7DXz6NS8RRIx9kHz6lVDSEUVWI5qidF9V D2JJaazfYsnjnig902R8l6htT3UgRON2KyxicuqtcN/aK9i3Ri5qfMFgSHARLCl8AfT2 KD45M1FgwaMqfgmfm7wHBhI8EQdxkxiT+jS5zxa5bMO3GcRJoBXdjTYBQtoeed3IXsXb zToQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fZ1erY58kBlhlkmhk9QjyKuuzmHiyGJEgyZd797XqYk=; b=2fh9QUtC40hUETPDLpz9e9G+aStpzTwyOq9JoBvBs5Jzx9a+IWSmUuX71qFicccZTF GpAFk0h/MzM8Qtg11Or0QJXrTCTXhgYQvo+4Lq5KwN6iWM9VO94/0p6I4eGGc1tYvNgK RIDTPW86oFV4BHr3DXzaITxSUO/4El+An5mvuASqE+tHHxu8UmLrmabuHyquWrwCRotF x97IECGfPtmoZ8i9VPsr15m88oKOj8cAaPw6kedaDqBqzsTP42m9tAIU8c0LBCZzOqNN pLDbqrTdDI84ZEEmy6BoZvs7vHt+OgeQi63yg8A4ujmD2CCvGhP1ldyGDZYCq56LvOdF KCHA== X-Gm-Message-State: ACrzQf0acmkjXoIg2rexpyENOOb3d1PyHESeyi/jmgI+NFxvwnNcSOYI PLed348cs2mNTWaIShN15b0= X-Received: by 2002:a05:6000:10c6:b0:236:6613:a7bd with SMTP id b6-20020a05600010c600b002366613a7bdmr33617622wrx.570.1667843597649; Mon, 07 Nov 2022 09:53:17 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:9c45:7ed3:c12e:e25b]) by smtp.gmail.com with ESMTPSA id v4-20020a5d4a44000000b002365254ea42sm8072454wrs.1.2022.11.07.09.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 09:53:17 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH RFC 1/5] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/G2UL SoC Date: Mon, 7 Nov 2022 17:53:01 +0000 Message-Id: <20221107175305.63975-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860963796252901?= X-GMAIL-MSGID: =?utf-8?q?1748860963796252901?= From: Lad Prabhakar Document RZ/G2UL (R9A07G043) IRQC bindings. The RZ/G2UL IRQC block is identical to one found on the RZ/G2L SoC. No driver changes are required as generic compatible string "renesas,rzg2l-irqc" will be used as a fallback. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven --- Note, renesas,r9a07g043u-irqc is added we have slight difference's compared to RZ/Five - G2UL IRQCHIP (hierarchical IRQ domain) -> GIC where as on RZ/Five we have PLIC (chained interrupt domain) -> RISCV INTC - On the RZ/Five we have additional registers for IRQC block - On the RZ/Five we have BUS_ERR_INT which needs to be handled by IRQC --- .../bindings/interrupt-controller/renesas,rzg2l-irqc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml index 33b90e975e33..8f3678a82ba4 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml @@ -26,6 +26,7 @@ properties: compatible: items: - enum: + - renesas,r9a07g043u-irqc # RZ/G2UL - renesas,r9a07g044-irqc # RZ/G2{L,LC} - renesas,r9a07g054-irqc # RZ/V2L - const: renesas,rzg2l-irqc From patchwork Mon Nov 7 17:53:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 16608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2201711wru; Mon, 7 Nov 2022 09:56:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Nf/MPhZ2Y4j/R+OS8MqPKw/jX+Rvr+T2GNJIbE78P48ylpPgLKQB34+QuNFb/QxjpPXl1 X-Received: by 2002:a17:902:ab08:b0:188:7919:77f3 with SMTP id ik8-20020a170902ab0800b00188791977f3mr11207158plb.44.1667843773563; Mon, 07 Nov 2022 09:56:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843773; cv=none; d=google.com; s=arc-20160816; b=z2d6GIbFY8EoTal/IF5teotzbFPkZ3hMl2Qu4AOV2dlIYzG+l82numjNVFdPctmmhr ulzgfAEnUTqTIoZlbUTtlJ4EFj06rjkKhVnFWOZhIEvNzxTMPGhqMZJUaevnEy/eKEcH b1qh92zeNxO3vf2z04rUqQklo8cJ4x88rp3fSOVSr3YBuSfw9thZy6ymfc2cdgjntUUV sZeeylCerKbHJmcgH2DEJPTGGI7L/ReM6tg0nfBfK0651zVUIUBBMgUIi/bm3vu4Ib6i rFoAbegTUN6OttVUUDBJBf9fzSIZT84AgNRUVir/eKYmUj9L7h9j5ILqG5Gfb3yTY1jX 4wkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zawac0oZnH0s6N9BmcF7Es7GdlbM3PMpMwX1yWYjaTo=; b=i1s8hvh0o/uKNrqClSKNpZ7ap2Ot5NguvCE5IApDQpJz6odrWcdwzXVzv/KDIuh5ov kxSSmfHc52owG5mqg0hSJua9+Tj/cwm49Ty5aML3oI1EZuzZGy70HiwumB4TpPYvS1j1 WS5bTHk7MHgjSdZdUDXg5UvjsoWEF46dS//+neS4EQ2GlXGJ0saFtgw6vsWyZDTI8Cdd ytKC33063z0i03sxalLJMv7AH3zaONWLnQ13ZDU9YEzj1FRjgiQ7M4fPy2EyxZR0GIbg FN7hHh5CM3it3ZtGtVlUm2gAzf8FXCvIo2zgLnIwbDfJRFDh7cPFcgcgWX4dUjQLy1Ts Th5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aeQJnX0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v69-20020a638948000000b00434d8692854si10492652pgd.541.2022.11.07.09.56.00; Mon, 07 Nov 2022 09:56:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aeQJnX0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232960AbiKGRze (ORCPT + 99 others); Mon, 7 Nov 2022 12:55:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232625AbiKGRyO (ORCPT ); Mon, 7 Nov 2022 12:54:14 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2A925E80; Mon, 7 Nov 2022 09:53:20 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id r132-20020a1c448a000000b003cf4d389c41so513439wma.3; Mon, 07 Nov 2022 09:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zawac0oZnH0s6N9BmcF7Es7GdlbM3PMpMwX1yWYjaTo=; b=aeQJnX0X9lWc+v6rMuS4tfwYDkYFXsu44LTAppZXyQBnkadQsryxirALgvlogjSP5B QjgvOgPlCpmxYpzR5Q0mTb4CYhiEwn0nSmk8Q/O+7oxMEcxBBskM/F68NaLVCmhlunIn W1axb8Cj0SCHjsq9JIpP4CZ/zWlkYlCWgNFlkumNOrFUJTc0UcObXjJF3K1T+WsxGiML F6/QJwu25G/WEaY9hRZSZszc2zGsDC5TLKwqtXmekLksiAIhkwp6xE34ve58aIco6hYN UQ0a6gGqJe+ajnVNjLBAHn5hSqV18g6bwhKy/fLLPYx28fqGEsIevJgsvP8eq16Fe4Ho +ZcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zawac0oZnH0s6N9BmcF7Es7GdlbM3PMpMwX1yWYjaTo=; b=T/Dw69AUiL33EDrBmqFf3OY8a3vwRwzdQRWHx744BJSQ89yhjQjT3Dq/0rAxCBTLvC 6SnZcQPdYp/KE53qMH2X2hLOb23zM5qS6L610BJELCx8ZItvXC6aPv0P7hNGVqUaMv2R TnmCqGlNiU1wcficIyEhuCWde9Rd3UnYGmv3HtWHderxPmkmTgVRPIq+3VeLoYQSOBOH wD478voIb9eeh5GEnnXojist8H/F4P4T5ufB8ZApXFlnLdUkuCBlwJ8URRbF8vaLShkL HqFn6thY1MwP3B/CLgbsqmlkB/br4y2fUp0DkW1Dvfsr75azmrh+7D+rhG71v4jenXmx VTqg== X-Gm-Message-State: ANoB5pkmeWWJFmdmkYKsEX2GUiu4o2rO2gjVCRXHBtPKFQjBUxan1s7z 7JjuXi9NOKm2t39JiXK+x58= X-Received: by 2002:a05:600c:5250:b0:3cf:a56a:6c9e with SMTP id fc16-20020a05600c525000b003cfa56a6c9emr6626958wmb.50.1667843598760; Mon, 07 Nov 2022 09:53:18 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:9c45:7ed3:c12e:e25b]) by smtp.gmail.com with ESMTPSA id v4-20020a5d4a44000000b002365254ea42sm8072454wrs.1.2022.11.07.09.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 09:53:18 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH RFC 2/5] pinctrl: renesas: rzg2l: Fix configuring the GPIO pins as interrupts Date: Mon, 7 Nov 2022 17:53:02 +0000 Message-Id: <20221107175305.63975-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860952900734100?= X-GMAIL-MSGID: =?utf-8?q?1748860952900734100?= From: Lad Prabhakar On the RZ/G2UL SoC we have less number of pins compared to RZ/G2L and also the pin configs are completely different. This patch makes sure we use the appropriate pin configs for each SoC (which is passed as part of the OF data) while configuring the GPIO pin as interrupts instead of using rzg2l_gpio_configs[] for all the SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index a43824fd9505..dcc495baa678 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -127,6 +127,7 @@ struct rzg2l_dedicated_configs { struct rzg2l_pinctrl_data { const char * const *port_pins; const u32 *port_pin_configs; + unsigned int n_port_pin_configs; struct rzg2l_dedicated_configs *dedicated_pins; unsigned int n_port_pins; unsigned int n_dedicated_pins; @@ -1122,7 +1123,7 @@ static struct { } }; -static int rzg2l_gpio_get_gpioint(unsigned int virq) +static int rzg2l_gpio_get_gpioint(unsigned int virq, const struct rzg2l_pinctrl_data *data) { unsigned int gpioint; unsigned int i; @@ -1131,13 +1132,13 @@ static int rzg2l_gpio_get_gpioint(unsigned int virq) port = virq / 8; bit = virq % 8; - if (port >= ARRAY_SIZE(rzg2l_gpio_configs) || - bit >= RZG2L_GPIO_PORT_GET_PINCNT(rzg2l_gpio_configs[port])) + if (port >= data->n_port_pin_configs || + bit >= RZG2L_GPIO_PORT_GET_PINCNT(data->port_pin_configs[port])) return -EINVAL; gpioint = bit; for (i = 0; i < port; i++) - gpioint += RZG2L_GPIO_PORT_GET_PINCNT(rzg2l_gpio_configs[i]); + gpioint += RZG2L_GPIO_PORT_GET_PINCNT(data->port_pin_configs[i]); return gpioint; } @@ -1237,7 +1238,7 @@ static int rzg2l_gpio_child_to_parent_hwirq(struct gpio_chip *gc, unsigned long flags; int gpioint, irq; - gpioint = rzg2l_gpio_get_gpioint(child); + gpioint = rzg2l_gpio_get_gpioint(child, pctrl->data); if (gpioint < 0) return gpioint; @@ -1311,8 +1312,8 @@ static void rzg2l_init_irq_valid_mask(struct gpio_chip *gc, port = offset / 8; bit = offset % 8; - if (port >= ARRAY_SIZE(rzg2l_gpio_configs) || - bit >= RZG2L_GPIO_PORT_GET_PINCNT(rzg2l_gpio_configs[port])) + if (port >= pctrl->data->n_port_pin_configs || + bit >= RZG2L_GPIO_PORT_GET_PINCNT(pctrl->data->port_pin_configs[port])) clear_bit(offset, valid_mask); } } @@ -1517,6 +1518,7 @@ static int rzg2l_pinctrl_probe(struct platform_device *pdev) static struct rzg2l_pinctrl_data r9a07g043_data = { .port_pins = rzg2l_gpio_names, .port_pin_configs = r9a07g043_gpio_configs, + .n_port_pin_configs = ARRAY_SIZE(r9a07g043_gpio_configs), .dedicated_pins = rzg2l_dedicated_pins.common, .n_port_pins = ARRAY_SIZE(r9a07g043_gpio_configs) * RZG2L_PINS_PER_PORT, .n_dedicated_pins = ARRAY_SIZE(rzg2l_dedicated_pins.common), @@ -1525,6 +1527,7 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { static struct rzg2l_pinctrl_data r9a07g044_data = { .port_pins = rzg2l_gpio_names, .port_pin_configs = rzg2l_gpio_configs, + .n_port_pin_configs = ARRAY_SIZE(rzg2l_gpio_configs), .dedicated_pins = rzg2l_dedicated_pins.common, .n_port_pins = ARRAY_SIZE(rzg2l_gpio_names), .n_dedicated_pins = ARRAY_SIZE(rzg2l_dedicated_pins.common) + From patchwork Mon Nov 7 17:53:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 16606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2201661wru; Mon, 7 Nov 2022 09:56:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4qHtTkuPlfxpZ1F0Lb2PGmD6YAxQeGi7lt8cREVJZqEeJ9NkxFFIPy1gKbS8pnY+jeoaKP X-Received: by 2002:a17:903:124c:b0:188:835c:4f55 with SMTP id u12-20020a170903124c00b00188835c4f55mr5000127plh.64.1667843767006; Mon, 07 Nov 2022 09:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843766; cv=none; d=google.com; s=arc-20160816; b=pEHD8w2UivXp5lTJCEtHzeTMGE/leJVwVvciET6hqmf9KB70sXi0uP9ugsyqV28Lga JVTESTXgxBWCDy0QLHx38ncFYEHlJc3vdLox2CVTO/RyaYUbMa6wWq+pNB7H/YeSIi94 KwiXpRsSdN9MTzwCEWzMEe8+O1ykNVdWea4rjOqrVbmYIxCxVWMpnrdaPVXIcMvjxIgS n14IhQY5lFmHUXYIDUkrDw74VflW3ph5LNmW+cZHWug9tzBQdm8nQOR+HrWYw9D4/bhv FCt6NERg6bpz7igHNMAKDdF34q+TVyCKfNwT2HY9d2tyIM+ue1THArvGoh9eZLw7N6Gk p61A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iQl1Hu5/nrSTnzRvbQ3bMIxhET8sBmMlsPi/XY+Y+k4=; b=ehpN2YJ5VyyluKUW4JK+mkiaO7NBBR7WKTHzYIPBI+chhvZSx6bGRG7qMLDRdz0vPx v5lPjpN1W3U5gOP/5omtd4lrgaK+Ld4hvnN77/TstwQz8pfCm6l9o7L8hJTWyuXV1lRi PofrWq55cWRlalFeiGtjZ3QctBBAnbgiLwAEAwlEVU+tkzjy26U7A1rkdfw/auVaWYa5 Hke9au8P2Td+RAYsaL8mtsOn0+TVrrQI8gLmURi/H0b5eY9VnGe1bMM9nFfhptkwSQC1 uFdWJKZU2InrYmQpbt+cOO29sr5P7uGwDHDwOe0XtPM8pNsEzXBruocUohvOypZMxcFI Q+yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bOlwmN8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020a63ec18000000b0043891d59cb7si10928572pgh.833.2022.11.07.09.55.52; Mon, 07 Nov 2022 09:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bOlwmN8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232644AbiKGRz0 (ORCPT + 99 others); Mon, 7 Nov 2022 12:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232617AbiKGRyO (ORCPT ); Mon, 7 Nov 2022 12:54:14 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38050197; Mon, 7 Nov 2022 09:53:21 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id o30so7366614wms.2; Mon, 07 Nov 2022 09:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iQl1Hu5/nrSTnzRvbQ3bMIxhET8sBmMlsPi/XY+Y+k4=; b=bOlwmN8wV1l4EKmTWFaCpg+tK20WDHNdisJNBG2s35YMFKLTU7viELgi2SOh/R5U8h hMaWWRXNG6oaolcKw7W0cblTpwhk6smh7gOxPSS0b7qRjZkgsXjHFAjazdUJjh/c3i3H qMW1HF61Y85kL/qRS1xevfZfHD2n2I2V+TAkrpvDGGdNpAnVXXg/eIU+nsyvRG5iC7br 5IgvRHeQCsaD5Vi2Ikh1TfQyK+3Mx7RCSXjrfKiqmZ8eNsQWQDRCVULODzSCDXd60qkk HzWMYW93EInfqkhzC3PThCRxo4JADogGvtrJbj7Qu/sAlgx8AeASlsVg5Xn+IHFbq9MZ 6bUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iQl1Hu5/nrSTnzRvbQ3bMIxhET8sBmMlsPi/XY+Y+k4=; b=2lowsKqrAJKV0jhKpsbifHqeCm5G4NYmPjmEAYlzuiMaN03P3dxWUWib/FxOVMk6iN +wz4P3kV1gZ9zfksu94upjXu2niDYgz4PMahxh7CXxXh3IyFr1txBdA5IaJrIvtS348V aYncuLfU0MDXWNJeg13HtYDaxm3NSHUlCvyPTjbEluGBaatBBVSAtumGrw/EkqdsXHGJ WRcDsxqQ+E5gGFbbH7mw7VgEMkCpFxyjfc2VHFjTAqkFiKThmhqMeIQlsAC6APVc9NXK MDlyIgPUw6OrQQNbAifb+v7Ls1vrk+EE5AOlyDwN9yQwVnd5dNRXXK+bqvs0qPRB3Oz0 qCgA== X-Gm-Message-State: ANoB5pkQ+vvyUoUA5vKq80vweV79EzgZ7EhQVash3jw8Qa2CcfhDT5SC +lxS2XSQgmUNfOBgF6ye/y4= X-Received: by 2002:a05:600c:314e:b0:3cf:a816:80dc with SMTP id h14-20020a05600c314e00b003cfa81680dcmr6090812wmo.88.1667843599761; Mon, 07 Nov 2022 09:53:19 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:9c45:7ed3:c12e:e25b]) by smtp.gmail.com with ESMTPSA id v4-20020a5d4a44000000b002365254ea42sm8072454wrs.1.2022.11.07.09.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 09:53:19 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH RFC 3/5] arm64: dts: renesas: r9a07g043[u]: Add IRQC node Date: Mon, 7 Nov 2022 17:53:03 +0000 Message-Id: <20221107175305.63975-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,UPPERCASE_50_75 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860945669028587?= X-GMAIL-MSGID: =?utf-8?q?1748860945669028587?= From: Lad Prabhakar Add IRQC node to R9A07G043 (RZ/G2UL) SoC DTSI. Signed-off-by: Lad Prabhakar --- Note, - clocks and resets are differnt when compared to RZ/Five hence its added in r9a07g043u.dtsi - We have additional interrupt on RZ/Five hence interrupts are added in r9a07g043u.dtsi - clock-names is also added in r9a07g043u.dtsi to avoid dtbs_check warning --- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 8 ++++ arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 50 +++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi index 3f7d451b1199..44b9bc6294be 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi @@ -538,6 +538,14 @@ pinctrl: pinctrl@11030000 { <&cpg R9A07G043_GPIO_SPARE_RESETN>; }; + irqc: interrupt-controller@110a0000 { + #interrupt-cells = <2>; + #address-cells = <0>; + interrupt-controller; + reg = <0 0x110a0000 0 0x10000>; + power-domains = <&cpg>; + }; + dmac: dma-controller@11820000 { compatible = "renesas,r9a07g043-dmac", "renesas,rz-dmac"; diff --git a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi index b8bf06b51235..7a8ed7ae253b 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi @@ -48,6 +48,56 @@ timer { }; }; +&irqc { + compatible = "renesas,r9a07g043u-irqc", + "renesas,rzg2l-irqc"; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + clocks = <&cpg CPG_MOD R9A07G043_IA55_CLK>, + <&cpg CPG_MOD R9A07G043_IA55_PCLK>; + clock-names = "clk", "pclk"; + resets = <&cpg R9A07G043_IA55_RESETN>; +}; + &soc { interrupt-parent = <&gic>; From patchwork Mon Nov 7 17:53:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 16607 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2201682wru; Mon, 7 Nov 2022 09:56:10 -0800 (PST) X-Google-Smtp-Source: AMsMyM7I2AecMN4n38mGjHSR131z5U1dUCtvHjxcWqavyNRg87PM/J+TXbbdV8t61yJ1rA73Gb4m X-Received: by 2002:a17:902:e5cb:b0:187:2d8c:a518 with SMTP id u11-20020a170902e5cb00b001872d8ca518mr39365169plf.132.1667843770074; Mon, 07 Nov 2022 09:56:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843770; cv=none; d=google.com; s=arc-20160816; b=aJrUF212xdZdXWHUxZAb7ru2Ik3EUGwRz4zGbIb+8CWVwSpH0Lf8udl4OURkJakHui eLbXmPQWYrPaXmxtoI6EPUeFTlHQQw1gM0nm4li51NmIwZBHoQOe7csbkWqmbsPXGUWX flstBGH66DRpwcXYJdoY4b07wzIDe4OqB8QLkH54HuGLB9vb/SvuuJdys5VPO2pjNQKy OrEY1gvJGLgAYFgu27ltNOJXyNzymwfS2u7U76Ia4qpsxxYK7gBYltwlk6bX7azLzBHz 6RozHarzaWpgIYOYVyTfw0d0twTNrxcm3XTIemDoyzXt9fXbviWBTqe/OAvev33cLqaw o+Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ol70elGXSkOXuxfrggtPBzq4RmwwfV6GuIgQ6Ej8CSA=; b=GppnfNkIsNmDZKCsCkNV3CgKpVQQlXgRDrOQbOSYCIgOzzRIBx0WFH3spuBB23LrhN 3vH9t7XI0Lws0IIWRUT7z0DAqAuPd6eGFmoz7PfGIIEsHicATP7CT82E/nWMA9h0XbCU sXqxU/fMhDmOCPcUdZONrr0URNnN1sEBVTSclCf+Lz3NxuPhN43Swc/FTW9EJ+I97asr Ma1zOVr0TUT+ovUws2JCfZEw4XXBOz1p+B5NY8+MdeGSlH6503gm62q/eRLJ28b9SN/V QW5OSfovzM9qkJLQCCGnb/IhdpxL6Xa0DS5B5XKNL9xMBdR0W/Iyn8++Gnb8ZpvT87ey M+8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cipDfNIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u25-20020a056a00099900b0056301324a24si12565344pfg.133.2022.11.07.09.55.56; Mon, 07 Nov 2022 09:56:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cipDfNIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232480AbiKGRzV (ORCPT + 99 others); Mon, 7 Nov 2022 12:55:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbiKGRyO (ORCPT ); Mon, 7 Nov 2022 12:54:14 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603302CC; Mon, 7 Nov 2022 09:53:22 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so10145943wmb.2; Mon, 07 Nov 2022 09:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ol70elGXSkOXuxfrggtPBzq4RmwwfV6GuIgQ6Ej8CSA=; b=cipDfNIYO9dRlaj4Jg1svXKSPG1N0oDpCTckBC7tkCqZ68QDlYxg+/nSo2jubRv+f9 jGOcxCqIAT302w9148xt4EMKC6mUR/0UWrDr56IIxNUFP7cqpIdt1y7pHxgwvNWp6dWe gcfcjjmCer46Ghofszo4b+7GIzN/w72D5+iCtCcFCoydxUGxtoWwz+W0pmJnbI1BRyWx I/M3BnYL1zyRXuYiI+jsBJTcbFwL+/JRm0fs1RczqZ5HcHzjl9CFWrXUysaZBGxlCHfE zLE9n5iVYlKrmQV2T7u94MjWOX17SGxDGWmhln6w5ai0YXOmtZZad2zQAjMf3F/6YjH0 eKow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ol70elGXSkOXuxfrggtPBzq4RmwwfV6GuIgQ6Ej8CSA=; b=DjLON1Syl9gF9SWGptJxKgpmHiP5dC7wCFrNouS6K0n8asOfGTGGtGLPqC903wnyxC FXQxtzVHrB8LTJaC0PCX4iCa0gBEdTd5mFGcPzx3MIC1l21+FL2kvxhbol5kD6z5tNFy 3IpGE6wDKkvaP9xDh81iVKHOwERXW/hmCRamv6uZlY0NifDQnCajJ8hDA5zVU2ygkAU1 QEFHi/zLmC9fdJkMCegEuCU3nnI1PFvoPmseSXy8GcGrRNQHT9/hhmZ+VgwblgtzjBsj enKjShy/2zL9JSRfG9u2piHHmg28Yab2YFB9d3t/VPu9h262pyAOdHuOzORp/9Atul6T BEMA== X-Gm-Message-State: ACrzQf3d+s9Kc1umEY/Tyi9rWLkcIojZAzkFb37CfB3WQ6qoGz483R5D CfBZJfwLL9u7jxwKKiCwwEo= X-Received: by 2002:a05:600c:4383:b0:3cf:6ab5:5c38 with SMTP id e3-20020a05600c438300b003cf6ab55c38mr31601777wmn.194.1667843600793; Mon, 07 Nov 2022 09:53:20 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:9c45:7ed3:c12e:e25b]) by smtp.gmail.com with ESMTPSA id v4-20020a5d4a44000000b002365254ea42sm8072454wrs.1.2022.11.07.09.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 09:53:20 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH RFC 4/5] arm64: dts: renesas: r9a07g043[u]: Update pinctrl node to handle GPIO interrupts Date: Mon, 7 Nov 2022 17:53:04 +0000 Message-Id: <20221107175305.63975-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860948917388530?= X-GMAIL-MSGID: =?utf-8?q?1748860948917388530?= From: Lad Prabhakar Add required properties in pinctrl node to handle GPIO interrupts. Note as IRQC is not enabled in RZ/Five the phandle for interrupt-parent is added in RZ/G2UL specific dtsi so that RZ/Five pinctrl driver continues without waiting for IRQC to probe. Signed-off-by: Lad Prabhakar --- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 2 ++ arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi index 44b9bc6294be..afb1abaa8b9a 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi @@ -531,6 +531,8 @@ pinctrl: pinctrl@11030000 { gpio-controller; #gpio-cells = <2>; gpio-ranges = <&pinctrl 0 0 152>; + #interrupt-cells = <2>; + interrupt-controller; clocks = <&cpg CPG_MOD R9A07G043_GPIO_HCLK>; power-domains = <&cpg>; resets = <&cpg R9A07G043_GPIO_RSTN>, diff --git a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi index 7a8ed7ae253b..65e7b029361e 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi @@ -98,6 +98,10 @@ &irqc { resets = <&cpg R9A07G043_IA55_RESETN>; }; +&pinctrl { + interrupt-parent = <&irqc>; +}; + &soc { interrupt-parent = <&gic>; From patchwork Mon Nov 7 17:53:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 16611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2201780wru; Mon, 7 Nov 2022 09:56:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM7a1ey6BZJARD8zqR4LjXUWrey3gVNT5RutjmRH7h5zhyMmgKY92i6MTMPuRYHXz5hwECDB X-Received: by 2002:a65:6951:0:b0:42b:b13:b253 with SMTP id w17-20020a656951000000b0042b0b13b253mr45455966pgq.555.1667843783234; Mon, 07 Nov 2022 09:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843783; cv=none; d=google.com; s=arc-20160816; b=QNGGJQP559hngzfTFl+iPO/DkYDq6/+lf2TYWY8uz9c6NJDAGSn4ErncryOyDQOnK0 emIgR9GDbY3+TLOElPixjFquwUca18gcLnEArzzBzYf3wQnDU0uP4THXivbVtVdwGOgU O2z7Jhha0+4iLuBGqkRkWblXvogrs8P6f4mSUPyJgLjVwutCzIBct0c1LvfKDD7MQmDF 0utZEAJr5E5jiuKjNA7VsZfP6L2rQVYEX5JtmyKXOHMob5loKijOnCh909pgj5o/Aac9 WMQMgoRRjcSfW0IwNgH6HTmbw8oLSy/n/cPdKnew0RjJPrHu7UklsJdFnUri8WpkjyKh DPxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q4TTGBwgL+ktdOw4ymdhP2iQ7Qgir5s0YZqnZpagiD8=; b=A16B/6mrPxtP44T9ZPRKQ4oVj39AWS6wFQb//wzT7wdNDkXhH98fKEIYHYSSnQAFiL pUftNfPVYrSTqHLlC0kvJlChZCldB0nN2lo/qPdrR8e7907f9C/QxQmT50oinIn6VwZf bhzHm9MmdoM//Nk5sFv644HkMVrL9uHjkReQUhPfjwMigFht0f5+ZJ6T40kL583wDCWV D2fGmflRUsbkV4FyL4mug6OF64ZImB0s6tk5xNlerWlLlrF7v4MWqpfQGSOM6WJxt5oF n8jQknqT6zL/JOsKZYZGbUHSsiHLiGiiEoBCO7ZzV98exR/EoD/5AX2oIxoGI+TFuv4x QDyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qzc1ZsNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl10-20020a17090b384a00b00212eb5485afsi14200385pjb.77.2022.11.07.09.56.09; Mon, 07 Nov 2022 09:56:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qzc1ZsNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232662AbiKGRza (ORCPT + 99 others); Mon, 7 Nov 2022 12:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232629AbiKGRyO (ORCPT ); Mon, 7 Nov 2022 12:54:14 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A93EBE1; Mon, 7 Nov 2022 09:53:23 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso7633262wmp.5; Mon, 07 Nov 2022 09:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q4TTGBwgL+ktdOw4ymdhP2iQ7Qgir5s0YZqnZpagiD8=; b=qzc1ZsNUdzsob01/2wRaVQHNLF4py4pCfex3JUed9atVJy7CuwemVZfzOMiCo6zYV6 2H8nF9UxAtBfgaxZsEOg6JIVVirPswkP6fXN0v0z94G7BEgAm4SgM5EY9CmohgFN6yDp 0bdn6aXfJ/C9quufF9vJwDGIBpq7MKLQIqkKy1QqV0w9TCKesd/XcjVj1m2jhPIZjWBU hN8P5oAuQrboUpdXg9DU52EOohOtP390+F9QCygoyXPSMKR7zwCoOFYQBpQVpy9trTF7 T9Q1vvuieZCCk2D4XjXCjpGQMQHH5n0OSRj7bYMEAAML+n5ilga1xsZh7617IUhPorvn u2SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q4TTGBwgL+ktdOw4ymdhP2iQ7Qgir5s0YZqnZpagiD8=; b=YTjy9v0yV5sbbNJignAF9HC9XfSl8T2/5h2sA+UjxxoacyvnDEpyb04qQHvaqoYalZ MO1oTReIwg+2TvS4BFH7Ktj9VP0nWmMuDpC9RveDliEtNm2wmTli1Kg+bzte2wkbYa7s BikmdbwA4wQoXCmbsw8wNXIsShMIwHwNzFjQOvr0XzXsNtVUuZVYyBgF2MKjFFziBBxs nq0uw9qN6rp/ozyRS7n8V1XoFRF9LYZPge5QzSe8qH6cePUSawniLQgsKDsCAbzdVWlK WadDpjKDfOnqRJAD16GCPruQjKDV8eUu86eIvUbbFxb0U9ETIsHo3afj5dlnZQakeeXG 1FNg== X-Gm-Message-State: ANoB5pm+v230R+x/k2eCI6nxrZ+cEzZHavqasy3FP3gpoBiToOjs5Abd 4FNl3Qw0MsaH37eTSUAuH/w= X-Received: by 2002:a05:600c:4f44:b0:3cf:b5dd:46f7 with SMTP id m4-20020a05600c4f4400b003cfb5dd46f7mr419523wmq.73.1667843601979; Mon, 07 Nov 2022 09:53:21 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:9c45:7ed3:c12e:e25b]) by smtp.gmail.com with ESMTPSA id v4-20020a5d4a44000000b002365254ea42sm8072454wrs.1.2022.11.07.09.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 09:53:21 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH RFC 5/5] arm64: dts: renesas: rzg2ul-smarc-som: Add PHY interrupt support for ETH{0/1} Date: Mon, 7 Nov 2022 17:53:05 +0000 Message-Id: <20221107175305.63975-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221107175305.63975-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860962953804491?= X-GMAIL-MSGID: =?utf-8?q?1748860962953804491?= From: Lad Prabhakar The PHY interrupt (INT_N) pin is connected to IRQ2 and IRQ7 for ETH0 and ETH1 respectively. Signed-off-by: Lad Prabhakar --- arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi index 931efc07d6fb..49ecd33aeeb8 100644 --- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi @@ -6,6 +6,7 @@ */ #include +#include #include / { @@ -77,6 +78,8 @@ phy0: ethernet-phy@7 { compatible = "ethernet-phy-id0022.1640", "ethernet-phy-ieee802.3-c22"; reg = <7>; + interrupt-parent = <&irqc>; + interrupts = ; rxc-skew-psec = <2400>; txc-skew-psec = <2400>; rxdv-skew-psec = <0>; @@ -104,6 +107,8 @@ phy1: ethernet-phy@7 { compatible = "ethernet-phy-id0022.1640", "ethernet-phy-ieee802.3-c22"; reg = <7>; + interrupt-parent = <&irqc>; + interrupts = ; rxc-skew-psec = <2400>; txc-skew-psec = <2400>; rxdv-skew-psec = <0>; @@ -151,7 +156,8 @@ eth0_pins: eth0 { , /* ET0_RXD0 */ , /* ET0_RXD1 */ , /* ET0_RXD2 */ - ; /* ET0_RXD3 */ + , /* ET0_RXD3 */ + ; /* IRQ2 */ }; eth1_pins: eth1 { @@ -169,7 +175,8 @@ eth1_pins: eth1 { , /* ET1_RXD0 */ , /* ET1_RXD1 */ , /* ET1_RXD2 */ - ; /* ET1_RXD3 */ + , /* ET1_RXD3 */ + ; /* IRQ7 */ }; sdhi0_emmc_pins: sd0emmc {