From nobody Tue Feb 10 15:44:49 2026 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 7F959413254 for ; Wed, 4 Feb 2026 14:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770215008; cv=none; b=J2wV86MVmJCWbaLT4gpLN6wsLz5rWOLwMdH8UZR9cB7dMRqWebkTn+2PNOecNc3RmzI1OXugWEbwKfkbTILGsQankQb+ZQeFp2wRNdon/FcXNciFSQIRzOsVFhygX7qU6gdZSPqohWBfO5E3BewZybU2L+yJ+RDoJWngMxBRzZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770215008; c=relaxed/simple; bh=KPVJTRz0ucSseFkmTa0BS3za7U+/6HbVZcxV1WMT/20=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=azMpKHuRKywXsqHC1W1lsahXUPE18vZbwwPsvBcEXB/x3MUCl0LMnLRZZWm81wvKhBWYHHqwGYWuj0jBX0jCbncNgYK2k6HCcjHsYIHBjnRfbPDo1FyjNLCUU0K/WeaBg+HQ9aeLX/P2QXWGzHCNU9v24i0ojnL+0y8VkySdGwQ= 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=lXkYXGNt; arc=none smtp.client-ip=209.85.208.52 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="lXkYXGNt" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-658034ce0e3so10884779a12.3 for ; Wed, 04 Feb 2026 06:23:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770215007; x=1770819807; 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=7PClPLuzQLIiCREY9O1ZTBwMqo8hf+l9T87+sxH7Xy8=; b=lXkYXGNt+uFLb/XNY+Ywz0dckOTZKQeK45bG1sa0GGwmz8tl8cGfxsSBUziFvciasY 73EDr0orVCXrt3xRy2hig9yJabAE4d4tqKHHXq4JkttGMRSe5XRJu0M79e02lRgz4+tn jQLgnUugZme0gKj8vaKNCu2hmoboCMMgXtDtVpZj6EEsPv6qxdKH8Nr7Xp6l0jnh3GOX aHSIC/cNp9I/iIWgHNVA1M1Oy/7PS53TTPaKgks5VZ4HMZ7Rg34nurrVb7YEHj6piUMy rIk0H/krdSi6k8Kn2geMRcgFLOipXTzkyoO6HAqxzN/CCyP/vbM+rPxtUec5319t4mod tOaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770215007; x=1770819807; 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=7PClPLuzQLIiCREY9O1ZTBwMqo8hf+l9T87+sxH7Xy8=; b=HUs9QZoyY3WnUnLOEEsSd9X93GTODFhG7fAKUoUiVpqFoZw8zuf9HyfJSBkaRjn2yO hKBTh2NMEqa4vpIF0bPZKzBl8Oy0j6XADlwP9aMqrK8gRzmznKSLOzE9ZCeJLr5qFIxZ j0dx2aM4tNfGJ2thXtQGTTj/Uf2cr6CozAM2nKdf8FOcAUZ/zH3cxoOEEpfJV6dHhxXt JoPQWeOKYH2UzDLXHKnPEOs9/FJ4t4bg8341dbt90n2xyZVIZ0Bxm6AAqMPmv7sTOPrX jtMbfMRxAlywdyMlQ5WRXT7UCuZhFefrFJiGnY8mHKsqmXc2Ink6mYsuV0zEUoapUNnE 0Spw== X-Forwarded-Encrypted: i=1; AJvYcCWFxgVBAkQqia/MnrCU26qHaWCsrwyjCLwYqR6Ow4kUTBO7B6Q5QV7PXL0qde73KVi9aPAa9OVpsUhUYcM=@vger.kernel.org X-Gm-Message-State: AOJu0YxyqNkblwwJggzj2wtuYRTv5CfmgsQMjUFHYJWcfeOceWqIjHS9 oPZb+07f6izqZXcbFXWUe42AyCLaoKF7dXU7ptTnsvIooOL8lO8XUcxNWrc4qxAh X-Gm-Gg: AZuq6aLiG0BPshKkQlmz2eAPg1H5JwB6kAycrRP0uXRbkwGoltglVDHSpAauV6yVvIq a138raMmtSSXhJwPEHC1f5hZE9PWxNJTP4ld6m96Zgr8OUGgqtIwrUIOmW0r6WYCTOqU432t65I AWpQKaw9tWN/YSepsiCENoMC5sJywHH5I1hr5lQipvP+CezxNga7FE7mSeTFxN6+8+AkSs1VZ7K H2QBD6GPD55Uhmy608sryMu6UDEQ/cQ+h2anH+0Qi+yw6aaZryW+HesQXAaIrrHVzlIaUNKEEHy PBWIQ00BjucgQEMuTasTuygJj571DZQKUlQZzMePQ+DudZUwdPbOh4VhpltdjC8UrNmQfTSbgCp ydDoxwaRCK8TZs7ysuEioVKuu+p/Z41mcT73RDXGHDXk9idfZomY9XaLdkl7k82xXFFK2bbKOq5 2XjesC81SY/lR72njvDyu89mVgYFwo16HY9U0= X-Received: by 2002:a17:907:d0c:b0:b8e:2a8a:4320 with SMTP id a640c23a62f3a-b8e9f2d8f05mr185302766b.49.1770215006647; Wed, 04 Feb 2026 06:23:26 -0800 (PST) Received: from localhost.localdomain ([2a00:23c4:a758:8a01:3c9f:a100:4d45:ebc7]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8ea001ea7dsm129038366b.47.2026.02.04.06.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 06:23:26 -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 6/8] irqchip/renesas-rzg2l: Add RZ/G3L support Date: Wed, 4 Feb 2026 14:23:14 +0000 Message-ID: <20260204142320.103184-7-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260204142320.103184-1-biju.das.jz@bp.renesas.com> References: <20260204142320.103184-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 IRQ is 16 instead of 8, out of this 8 IRQs 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 --- drivers/irqchip/irq-renesas-rzg2l.c | 47 +++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 0de7db45d4c8..06c439c98ff5 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -67,14 +67,16 @@ 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 { - u8 irq_count; - u8 tint_start; - u8 num_irq; + const u8 *tssel_lut; + u8 irq_count; + u8 tint_start; + u8 num_irq; }; =20 /** @@ -343,6 +345,9 @@ static u32 rzg2l_disable_tint_and_set_tint_source(struc= t 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]; + /* Clear the relevant byte in reg */ reg &=3D ~(TSSEL_MASK << TSSEL_SHIFT(tssr_offset)); /* Set TINT and leave TIEN clear */ @@ -607,6 +612,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 +653,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_= params); } =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_= params); +} + 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 +665,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