From nobody Tue Apr 7 20:25:20 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F79343901D for ; Fri, 27 Feb 2026 14:03:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201010; cv=none; b=n/bzWuIqppXQxJYbRxfH3BYLvxcBPgAgw4p8zNPKFTGX84w8YD8a9drefUPWC4zGMh+rJQtYy5WQ0zM0nXMZpPB3F5XcJD4e0Id+oYziXfVYquXYoREhVuuEZJ6SkIJ5VvLYrVaeG/JmxJN4LnoRLWBJrc0ZQSi8sxjRuUkpSrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201010; c=relaxed/simple; bh=MKUQLvFr1iT5myl4XHCt9t+le8qYMnyu662x3Ql5bY8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VpA1XIah7UmIDsfuMNYNLow8DSplJ0k5w4LgSzAx3laeJYE3DzftmuSC+KmJ6HhjJrAHYwlJoORilr+2czqQU2vdlzR41eW+7r+WkuTrXGQNL9t6aucbzCXdgWlC4dTG323BdyFOUOz1EYWU9j9j8NRsMjg8hojmeFMxsmYEdE0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VdtXhE3D; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VdtXhE3D" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-4398d9a12c6so1619278f8f.2 for ; Fri, 27 Feb 2026 06:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201007; x=1772805807; darn=vger.kernel.org; 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=warcM3LovriiR1qe/xbK+forV1iKLkvB/qLDY0EdHzA=; b=VdtXhE3DwcNQCXF5SD8HttPjy3EWtABZVzPv53/aRJcZ/oOFltGXjgpE7Rvcr9c8O8 4DLYdBlU7zlRyDQw3MrwpX3fxFSKJLilWKNLZ3nbqSYRUBsCuwS0oGV4SxjXbgak3Vp7 FhAT7t6psxgyt9hMaDi7IUv3hPVIj9atENRjQHJUeB5LliqXhsOCpbFX8cJ/SQ4bZVpl 33/7ab9M7CoGrR9xXAX6ZS1aw+J56g2c+14ULJ7K30ALfDGQ8d6ElhOCyNAK1uAS83UT lfTdZOwZoSmiL5Wrgmwi+nE7N69UwMedm3RTY0ODeIDrMGsTwplinc6C9VGjGKP/ReuG 461g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201007; x=1772805807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=warcM3LovriiR1qe/xbK+forV1iKLkvB/qLDY0EdHzA=; b=cJn/KkdzmuSVNM9wXzYlA7MEHh8z3OR4uWtV2ySDF0Fx3q3IG5chV8ofa9XXFME6UU NvGJG22alyxru+PJ3+4nileHS2C68gxfmrriqKE7hADPN5TFGoJ/kFoQZ4FTT8h68zr9 6L9Nxn8mb3GcLDv9PDjtowFNTHQSkfuZm1BTqBkM+P3S11V72uGtl7ztHfQ+WIhybUuT xRXFp6DgaZxLTrjcCu+haIL+wTbvmTxF26sG/QNfc40ojbri4GSDdeOfyzPL8y50F/I7 00nYS2S+ZlI78+MpGutPmBPcK765RQrHDvoLLbL3XnYWOxa8ZKps4HZzKDi0pD4NQpxm p9nA== X-Forwarded-Encrypted: i=1; AJvYcCVJbE06N4vJiunUSf6nMg9KO09tjfTvdwrhEDljbVkQjkGyl9hbYJHzMpQNxQxhV/WKKxBs16P0F6EHM6g=@vger.kernel.org X-Gm-Message-State: AOJu0YzKjdfAQitJs0y5tIHSU3gn9OhNH/5hXKvVaeOymQgPfjlTulVA 4tfp4oUejQMu3eCXTVsS6tTqR4dLXqV3oo04w4CSjxD6Jg+Diig+rlJF X-Gm-Gg: ATEYQzx978bJg3mq6aWNONL4x007wx7BlugaeDz2fw3Cc6rJ0Wv355kZ4gO3005NCgG GF8yS4NfE4BAAbiG0AgaZIGmJIPH18kT3EJYK5LYd3iSK87PsKtn5Luf26uTeT3ITeah9bEABq1 C/8KRJgd2UY4y9U5s5EpElRsTtE3G6dWVGDocSdzMU315zFmwO52sw5zDm9mpQe6/1u8Ml4rXIU PU8RbC+4tPSQFjPuUDbJVBr6PuXJ2kmqiOV9ze5dY4thkh1+Q+0gCPbV2pnttYpCmQooerawTlb J2juPo8ljIs/nxjK2IJYVQGfTXKp69NDubNI6xQdrDp3b5nX40i+syErFmahDPslNY5HD4sNcyE e6rD0+jt0jRLxhb+kiFMhU6i69kt5+JU03UbMcrgccyD8YFpB34gi4Fiug0U5EdWW7ReTnHMC40 yrqC9j3JGZPDrOlNDsByY1H5GJJkQkhig= X-Received: by 2002:a05:6000:22c3:b0:437:70d3:44e7 with SMTP id ffacd0b85a97d-4399de2b5e7mr4991338f8f.30.1772201006634; Fri, 27 Feb 2026 06:03:26 -0800 (PST) Received: from biju.lan ([2a00:23c4:a758:8a01:4d8b:fefb:26cf:1906]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c60feeesm7658811f8f.1.2026.02.27.06.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:25 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Thomas Gleixner Cc: Biju Das , linux-kernel@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v4 7/9] irqchip/renesas-rzg2l: Add RZ/G3L support Date: Fri, 27 Feb 2026 14:03:07 +0000 Message-ID: <20260227140316.308106-8-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260227140316.308106-1-biju.das.jz@bp.renesas.com> References: <20260227140316.308106-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Biju Das The IRQC block on the RZ/G3L SoC is almost identical to the one found on the RZ/G2L SoC, with the following differences: - The number of GPIO interrupts for TINT selection is 113 instead of 123. - The pin index and TINT selection index are not in the 1:1 map. - The number of external interrupts are 16 instead of 8, out of these 8 external interrupts are shared with TINT. Add support for the RZ/G3L driver by filling the rzg2l_hw_info table and adding LUT for mapping between pin index and TINT selection index. Signed-off-by: Biju Das --- v3->v4: * Updated commit description IRQs->interrupts. * Updated rzg2l_disable_tint_and_set_tint_source() for making tint assignment very clear in the code. * Formatted rzg3l_tssel_lut as table format. v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 5e30dc2328e0..3010247fe3ef 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -67,11 +67,13 @@ struct rzg2l_irqc_reg_cache { =20 /** * struct rzg2l_hw_info - Interrupt Control Unit controller hardware info = structure. + * @tssel_lut: TINT lookup table * @irq_count: Number of IRQC interrupts * @tint_start: Start of TINT interrupts * @num_irq: Total Number of interrupts */ struct rzg2l_hw_info { + const u8 *tssel_lut; unsigned int irq_count; unsigned int tint_start; unsigned int num_irq; @@ -343,6 +345,11 @@ static u32 rzg2l_disable_tint_and_set_tint_source(stru= ct irq_data *d, struct rzg u32 tint =3D (u32)(uintptr_t)irq_data_get_irq_chip_data(d); u32 tien =3D reg & (TIEN << TSSEL_SHIFT(tssr_offset)); =20 + if (priv->info.tssel_lut) + tint =3D priv->info.tssel_lut[tint]; + else + tint =3D (u32)(uintptr_t)irq_data_get_irq_chip_data(d); + /* Clear the relevant byte in reg */ reg &=3D ~(TSSEL_MASK << TSSEL_SHIFT(tssr_offset)); /* Set TINT and leave TIEN clear */ @@ -607,6 +614,36 @@ static int rzg2l_irqc_common_probe(struct platform_dev= ice *pdev, struct device_n return 0; } =20 +/* Mapping based on port index on Table 4.2-1 and GPIOINT on Table 4.6-7 */ +static const u8 rzg3l_tssel_lut[] =3D { + 83, 84, /* P20-P21 */ + 7, 8, 9, 10, 11, 12, 13, /* P30-P36 */ + 85, 86, 87, 88, 89, 90, 91, /* P50-P56 */ + 92, 93, 94, 95, 96, 97, 98, /* P60-P66 */ + 99, 100, 101, 102, 103, 104, 105, 106, /* P70-P77 */ + 107, 108, 109, 110, 111, 112, /* P80-P85 */ + 45, 46, 47, 48, 49, 50, 51, 52, /* PA0-PA7 */ + 53, 54, 55, 56, 57, 58, 59, 60, /* PB0-PB7 */ + 61, 62, 63, /* PC0-PC2 */ + 64, 65, 66, 67, 68, 69, 70, 71, /* PD0-PD7 */ + 72, 73, 74, 75, 76, 77, 78, 79, /* PE0-PE7 */ + 80, 81, 82, /* PF0-PF2 */ + 27, 28, 29, 30, 31, 32, 33, 34, /* PG0-PG7 */ + 35, 36, 37, 38, 39, 40, /* PH0-PH5 */ + 2, 3, 4, 5, 6, /* PJ0-PJ4 */ + 41, 42, 43, 44, /* PK0-PK3 */ + 14, 15, 16, 17, 26, /* PL0-PL4 */ + 18, 19, 20, 21, 22, 23, 24, 25, /* PM0-PM7 */ + 0, 1 /* PS0-PS1 */ +}; + +static const struct rzg2l_hw_info rzg3l_hw_params =3D { + .tssel_lut =3D rzg3l_tssel_lut, + .irq_count =3D 16, + .tint_start =3D IRQC_IRQ_START + 16, + .num_irq =3D IRQC_IRQ_START + 16 + IRQC_TINT_COUNT, +}; + static const struct rzg2l_hw_info rzg2l_hw_params =3D { .irq_count =3D 8, .tint_start =3D IRQC_IRQ_START + 8, @@ -618,6 +655,11 @@ static int rzg2l_irqc_probe(struct platform_device *pd= ev, struct device_node *pa return rzg2l_irqc_common_probe(pdev, parent, &rzg2l_irqc_chip, rzg2l_hw_p= arams); } =20 +static int rzg3l_irqc_probe(struct platform_device *pdev, struct device_no= de *parent) +{ + return rzg2l_irqc_common_probe(pdev, parent, &rzg2l_irqc_chip, rzg3l_hw_p= arams); +} + static int rzfive_irqc_probe(struct platform_device *pdev, struct device_n= ode *parent) { return rzg2l_irqc_common_probe(pdev, parent, &rzfive_irqc_chip, rzg2l_hw_= params); @@ -625,6 +667,7 @@ static int rzfive_irqc_probe(struct platform_device *pd= ev, struct device_node *p =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(rzg2l_irqc) IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_probe) +IRQCHIP_MATCH("renesas,r9a08g046-irqc", rzg3l_irqc_probe) IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzfive_irqc_probe) IRQCHIP_PLATFORM_DRIVER_END(rzg2l_irqc) MODULE_AUTHOR("Lad Prabhakar "); --=20 2.43.0