From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.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 C4F12421F11 for ; Fri, 27 Feb 2026 14:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201003; cv=none; b=qsHB+YK1F1qHcNlWNi7bIpkRmUJm2DPila+peCrPL831qsvkOV/WAIdcKJfkdCWc4Z3A0/fuAiuaM9m82CUC1U66uDLTE4XmUBNv3ZP8/2Fj+vXlDOymb5rIpsMXiwErUGTv3FMItp8WuV48g7WEeI+YJLa8OVYwEVT2jdDYivM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201003; c=relaxed/simple; bh=H3kxOxp2ALJIVSC0YsDxjDp/bguYng3VF566NylkaO4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R7k32Q/DioQbnRAAhDpUu3/exWop1UPc4ujq/aH3NvAlB2JBjJjMc9k1KVCpT4ORlg+oO4N2+aiT6fhBfvCOm3g5TtzQCXA9l+YyFW7HCsmgVXY51SncC80v+wo1TNPMnoAv/+FBxGErr2VNkFjsksRnsnHJ3zMYs4fN0LkNids= 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=F4FdZcfR; arc=none smtp.client-ip=209.85.221.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="F4FdZcfR" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4399dd8d7b3so651977f8f.0 for ; Fri, 27 Feb 2026 06:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201000; x=1772805800; 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=5usUo2XpJhaTxmQdTpUBGqGDBLyO4HnKXMdTPdQM54M=; b=F4FdZcfRglxtW/bie4jgstVEhjkwonP6D53ugxsIUUTAK9N3GZNyb4B1q7PzbZml/8 CuHGR9fFTS7e//hrbXBF9jHtDdgxszb7YaFYAWZ1PILLmuSTb/dHzwsbwy5DX6j6BLPw A++GBdBoHuwFxtYMeMt6IVVBq4CdaJf7o/6FkZHuZyd6mhsq5ND0uxjTy0b3jEQna/cz Q371PRvxkjRNV5R2RM5eamswEajBE6oS+rwUvljVDhNVRnPaEd4Ra+cHMUn66OuEYzSn pXBSCQmHdf+A7W2mY+5/zN8gOvImm6vJxcOmkAjxobLli+w9QAgDCPHRX9YUqY1i/Gnf LBrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201000; x=1772805800; 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=5usUo2XpJhaTxmQdTpUBGqGDBLyO4HnKXMdTPdQM54M=; b=vWs9DgG4FuJMc/c1soX815rWXv7FJBJK+zZQj/k5WyLRhtvjm0Z16GD7bu+SIuVUIs 3/vDSHV8RSFVQRsB14Yx3tOUtkddqDReGMVNGefC/5UahwId77u1FFy7YTWRUQLOd3j+ UVFZwTyhjedHiU6GSDqqJHPZcZ02lbpTgpWrNCUPxC4CBJF9YS7dqJWmd8GH0x5sawFh /LKdmF36wU1hvFya83UA7BVAthDh8PTPiAUD69i/OSBN4wOjzRpJaa94ZYqXXqhNc2dA tPVzjqnxOUe2HCPzmzROOcGkJxV7tbT6fjKKyuxjLGA9hG/Lm2RtH9IB0WNmOZuVgNys Uwqg== X-Forwarded-Encrypted: i=1; AJvYcCXRw+8fIanBURjZ95+JXMtuzpvcDwPKVdClwVNheD13q1wtzrW941gtepygwHtoPhYGZnONeJVrTuvl88g=@vger.kernel.org X-Gm-Message-State: AOJu0YzDazmDVY58QJkFujjkpH0gdmheta2r97WZ1yzu9IMqqaNQV9zn zjdbAcTNFwc57HDlW4wpADT/ws50aJp0dDL8upDyWevd7/JZ5ABwBaup X-Gm-Gg: ATEYQzzta9EB25X0mTiUVoVpP0rshyhO1Oo2xKOs7T1Shcc1BtuPCaaU8eJ+i8uaUiN HYk0sAmqQb/TS4QLZZtVzrGXwaxgStgVoCaIi8X7T7omUBBEcJIS28QuXmrSdluucBQb1zIQrfP 7bti0XUZoAGYFrZWEm4e9Br5jRGXmbXT0OJnZwkdjMjzL7NACQq0KbzZn1FAWwoGSjqztiOyptk Bkn2rC/fg9YbDmTUL8UZdkc7l9BU6zNysLr0m4tu4fJln05Dq0wewwbZ4sfkSKvYu9D2QqhzhkT OsSZbyEVpeGXacelyIVGSH2++K5p1VGslH+lBiLHtkV9/wqAba9ls7RD/JZILNAfN050Qlxt47v xh+vDIX1Sp8waDt0zVyrYd4bDt8lAAgmdsFcV6+WrJsufue4Tks0RcLUVj30GOAUruaODZdsyNo PLRnKBVf1yhBfk3zxVkqB8IWTaP2RmbI8FVlgVtu77Dg== X-Received: by 2002:a05:6000:2583:b0:436:36cb:70b7 with SMTP id ffacd0b85a97d-439971ae732mr13388933f8f.7.1772200999713; Fri, 27 Feb 2026 06:03:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:19 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm Cc: Biju Das , Lad Prabhakar , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Subject: [PATCH v4 1/9] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Use pattern for interrupt-names Date: Fri, 27 Feb 2026 14:03:01 +0000 Message-ID: <20260227140316.308106-2-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 Simplify the bindings by using pattern property for interrupt-names. It also allows to change the ordering of interrupts. Signed-off-by: Biju Das Reviewed-by: Rob Herring (Arm) --- v3->v4: * Collected tag from Rob [1] * Updated commit description and kept the tag as it is trivial change. v2->v3: [2] * No change v1->v2: * New patch [1]. [1] https://lore.kernel.org/all/20260204180632.249139-2-biju.das.jz@bp.rene= sas.com/ [2] https://lore.kernel.org/all/20260206111658.231934-2-biju.das.jz@bp.rene= sas.com/ --- .../renesas,rzg2l-irqc.yaml | 120 ++++-------------- 1 file changed, 23 insertions(+), 97 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas= ,rzg2l-irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/r= enesas,rzg2l-irqc.yaml index 44b6ae5fc802..a0b57d808639 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-= irqc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-= irqc.yaml @@ -48,107 +48,33 @@ properties: =20 interrupts: minItems: 45 - items: - - description: NMI interrupt - - description: IRQ0 interrupt - - description: IRQ1 interrupt - - description: IRQ2 interrupt - - description: IRQ3 interrupt - - description: IRQ4 interrupt - - description: IRQ5 interrupt - - description: IRQ6 interrupt - - description: IRQ7 interrupt - - description: GPIO interrupt, TINT0 - - description: GPIO interrupt, TINT1 - - description: GPIO interrupt, TINT2 - - description: GPIO interrupt, TINT3 - - description: GPIO interrupt, TINT4 - - description: GPIO interrupt, TINT5 - - description: GPIO interrupt, TINT6 - - description: GPIO interrupt, TINT7 - - description: GPIO interrupt, TINT8 - - description: GPIO interrupt, TINT9 - - description: GPIO interrupt, TINT10 - - description: GPIO interrupt, TINT11 - - description: GPIO interrupt, TINT12 - - description: GPIO interrupt, TINT13 - - description: GPIO interrupt, TINT14 - - description: GPIO interrupt, TINT15 - - description: GPIO interrupt, TINT16 - - description: GPIO interrupt, TINT17 - - description: GPIO interrupt, TINT18 - - description: GPIO interrupt, TINT19 - - description: GPIO interrupt, TINT20 - - description: GPIO interrupt, TINT21 - - description: GPIO interrupt, TINT22 - - description: GPIO interrupt, TINT23 - - description: GPIO interrupt, TINT24 - - description: GPIO interrupt, TINT25 - - description: GPIO interrupt, TINT26 - - description: GPIO interrupt, TINT27 - - description: GPIO interrupt, TINT28 - - description: GPIO interrupt, TINT29 - - description: GPIO interrupt, TINT30 - - description: GPIO interrupt, TINT31 - - description: Bus error interrupt - - description: ECCRAM0 or combined ECCRAM0/1 1bit error interrupt - - description: ECCRAM0 or combined ECCRAM0/1 2bit error interrupt - - description: ECCRAM0 or combined ECCRAM0/1 error overflow interrupt - - description: ECCRAM1 1bit error interrupt - - description: ECCRAM1 2bit error interrupt - - description: ECCRAM1 error overflow interrupt + maxItems: 48 =20 interrupt-names: minItems: 45 + maxItems: 48 items: - - const: nmi - - const: irq0 - - const: irq1 - - const: irq2 - - const: irq3 - - const: irq4 - - const: irq5 - - const: irq6 - - const: irq7 - - const: tint0 - - const: tint1 - - const: tint2 - - const: tint3 - - const: tint4 - - const: tint5 - - const: tint6 - - const: tint7 - - const: tint8 - - const: tint9 - - const: tint10 - - const: tint11 - - const: tint12 - - const: tint13 - - const: tint14 - - const: tint15 - - const: tint16 - - const: tint17 - - const: tint18 - - const: tint19 - - const: tint20 - - const: tint21 - - const: tint22 - - const: tint23 - - const: tint24 - - const: tint25 - - const: tint26 - - const: tint27 - - const: tint28 - - const: tint29 - - const: tint30 - - const: tint31 - - const: bus-err - - const: ec7tie1-0 - - const: ec7tie2-0 - - const: ec7tiovf-0 - - const: ec7tie1-1 - - const: ec7tie2-1 - - const: ec7tiovf-1 + oneOf: + - description: NMI interrupt + const: nmi + - description: External IRQ interrupt + pattern: '^irq([0-7])$' + - description: GPIO interrupt + pattern: '^tint([0-9]|1[0-9]|2[0-9]|3[0-1])$' + - description: Bus error interrupt + const: bus-err + - description: ECCRAM0 or combined ECCRAM0/1 1bit error interrupt + const: ec7tie1-0 + - description: ECCRAM0 or combined ECCRAM0/1 2bit error interrupt + const: ec7tie2-0 + - description: ECCRAM0 or combined ECCRAM0/1 error overflow interr= upt + const: ec7tiovf-0 + - description: ECCRAM1 1bit error interrupt + const: ec7tie1-1 + - description: ECCRAM1 2bit error interrupt + const: ec7tie2-1 + - description: ECCRAM1 error overflow interrupt + const: ec7tiovf-1 =20 clocks: maxItems: 2 --=20 2.43.0 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 4AC8642EEDE for ; Fri, 27 Feb 2026 14:03:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201005; cv=none; b=MXphsrSz1NssCR1uXmf7lidgRIXB7NR97uqK4Z/596SwWuPxeeaG5fBBn7NNwsrCGaByw6fpjguarr3wRsHan1mjzPH15jqPRpx9FacUwH1TBJIM1QYPGbBZ3VpdKJ+JeWVR34uDUjq3H9KaLQ8sjCKnywzfhaM4/cd9d+3Dls4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201005; c=relaxed/simple; bh=QUqm//47sqzlR1bPqkDSPBBuMfJfXmjgP9rB2/PFcpo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eyzOkK6xizpdt5SjkLPOiACKwlMAs6r9YOnROkDpbgfh+5Mx3hNtsO4IqNRA4CoNYh+JXRS5GsjePQb+ZbSBQGhqQWToqxWH3g513IZEPtM28pLUBxYam2Bc+SBgl7tcqDAyBoKanBol3IE109POMg0PZHP+xCzqkFUf6eh6mr0= 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=WZacD31R; arc=none smtp.client-ip=209.85.128.42 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="WZacD31R" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-48374014a77so23966625e9.3 for ; Fri, 27 Feb 2026 06:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201001; x=1772805801; 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=Wna275egvqFrPSBNsVOGqQcVdyKY1fzBc45RIdU46c8=; b=WZacD31RtvoAB7QRWqXLi/nKfsIRAuNx8UGtksksve+IdfWK9rFUkOtyx+5NRARZJ1 NM2AfF2PF7ujpOYj3ygIYcZO7cUvJBue2O5XK1xo//XGENTZErmrcBNJL6UNs82WX4pO cf5UPGQXy+7qHDysqmdeCX5wmZwtUUNZ9anQ//Xd7S07/MNa+7+kTsdnI4VczE7mAeTi c5oYwLhw+iUwZGJ8TgC4WUzFLIIjSjKkD49OhxdKA/ksNC2cjUHb4tue/+xF3dlWcV0t 6/Kaw/f2c493eBYRVyqR2p2DSUcvmyRVW5FhcCrn7ksIopM11tvFkCmXACePhUntxaeP IcYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201001; x=1772805801; 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=Wna275egvqFrPSBNsVOGqQcVdyKY1fzBc45RIdU46c8=; b=Y9vatmK5ZIG2ScaFnoPK4McTaaWNixZjHO6TQzfQXC6SbgDdui1xOTBaCFNQJ9JA/p 2+2hobc2VUJFwLz4b8ygv0MQy/TIJGFoBjKD+INMAj/9Hg+DPQJcoyZTjCFZt1gyP+9o ET4sbMpJMqLexaQ+rhzsf/jG+YOBzcANy2HOxJaGhM1dZRbsdBKLzrNsP8U9ZoL9kajo PIPJff5qjP3292WzQOci1XDqn0jOFy/iLylEYAu9YkSXiOreeN0ednb6DwQrkcrTZDBP jNAtVgnKKonCnFIMjf1dkUgjFDhchoiINEP91Y+/yaaCw1GS4+BaGbN0ysLQ84A9rkGc NPXQ== X-Forwarded-Encrypted: i=1; AJvYcCXhMlHHA+YqDcDaTOHuWjdf2UsxlGF4IX0s0EqaRxwidbjDK6YEMkUm8f8hCy6RWAeG101I96KiSXNfs94=@vger.kernel.org X-Gm-Message-State: AOJu0Yzs+XYw+bRJiU+zRGdDTvlO4XUIl6CuIv6w/gb+GN9boFZCEsYQ wog1kGaSzUn2SlQZxkY7GkXpX8vmhT9wy7v2CM77mzLt9rJKZcX6Ttt4 X-Gm-Gg: ATEYQzz1+dUdvCcnclC3D4oOyBN1aJR2I0DIs17J9zdXFijzFOpV/y6FMUQk8Jm9v00 TPJ4avFqeP1Gp0HFNJ+vTbO4fEGmIyuQO+fdqigbMjIlQreRnTHRq6RW8t6yecCs5ANU3porde1 1kqcxQzQZjGA76DsD5l6+1AWBUgC6J6x1Pr+2LWmxoqGqbZjAhgnhe4iD1FrUi2+6VFb9P9W4Bs O0ECGl5cYMeIZC4fPoXupBlT13TmOWnGcoMiC3mSx8+qTzGmKpdLJ/dmvD2JjrQJYsrpIVEFO9v AsPmGkRn8pcZVUByHfiPx5CYEzyUlFC9mx07mj8ofUiTRtvOMI3MLiW7nesFhK7IQWZuWf21MYN uY1fgO4+O+4zq8j2obv2aHk+16M8ERz1fqsua6y5y/StmuTf3sRXK4wxnZiKmPCA4FMrqPp9Xhb hZZHGz563gQXdnHqw4/W2Tj2T/VCIBrLc= X-Received: by 2002:a05:600c:3b02:b0:483:6fe1:c057 with SMTP id 5b1f17b1804b1-483c9c02efcmr43428985e9.21.1772201001265; Fri, 27 Feb 2026 06:03:21 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:20 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm Cc: Biju Das , Lad Prabhakar , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Subject: [PATCH v4 2/9] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/G3L SoC Date: Fri, 27 Feb 2026 14:03:02 +0000 Message-ID: <20260227140316.308106-3-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 Document RZ/G3L (R9A08G046) IRQC. The IRQC block on the RZ/G3L SoC is nearly identical to that found on the RZ/G3S SoC, with the following differences: it supports more external interrupts and GPT error interrupts, and adds registers for GPT/MTU interrupt selection and shared interrupt selection between external interrupt and TINT. A new compatible string "renesas,r9a08g046-irqc" is therefore introduced for the RZ/G3L SoC. Signed-off-by: Biju Das --- v3->v4: * Updated commit description. v2->v3: [3] * Dropped items and instead used enum for single compatible values * Add minItems for interrupts and interrupt-names properties of=20 the RZ/{G2L,G2UL,Five,V2L} SoCs * Replaced maxItems->minItems for interrupts and interrupt-names properties of the RZ/G3L SoC. v1->v2: [2] * Simplified the binding using pattern [3] https://lore.kernel.org/all/20260204180632.249139-3-biju.das.jz@bp.rene= sas.com/ [2] https://lore.kernel.org/all/20260206111658.231934-3-biju.das.jz@bp.rene= sas.com/ [1]https://lore.kernel.org/all/20260204142320.103184-2-biju.das.jz@bp.renes= as.com/ --- .../renesas,rzg2l-irqc.yaml | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas= ,rzg2l-irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/r= enesas,rzg2l-irqc.yaml index a0b57d808639..3a221e1800a0 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-= irqc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-= irqc.yaml @@ -30,7 +30,9 @@ properties: - renesas,r9a08g045-irqc # RZ/G3S - const: renesas,rzg2l-irqc =20 - - const: renesas,r9a07g043f-irqc # RZ/Five + - enum: + - renesas,r9a07g043f-irqc # RZ/Five + - renesas,r9a08g046-irqc # RZ/G3L =20 '#interrupt-cells': description: The first cell should contain a macro RZG2L_{NMI,IRQX} in= cluded in the @@ -48,17 +50,17 @@ properties: =20 interrupts: minItems: 45 - maxItems: 48 + maxItems: 61 =20 interrupt-names: minItems: 45 - maxItems: 48 + maxItems: 61 items: oneOf: - description: NMI interrupt const: nmi - description: External IRQ interrupt - pattern: '^irq([0-7])$' + pattern: '^irq([0-9]|1[0-5])$' - description: GPIO interrupt pattern: '^tint([0-9]|1[0-9]|2[0-9]|3[0-1])$' - description: Bus error interrupt @@ -75,6 +77,8 @@ properties: const: ec7tie2-1 - description: ECCRAM1 error overflow interrupt const: ec7tiovf-1 + - description: Integrated GPT Error interrupt + pattern: '^ovfunf([0-7])$' =20 clocks: maxItems: 2 @@ -106,6 +110,24 @@ required: allOf: - $ref: /schemas/interrupt-controller.yaml# =20 + - if: + properties: + compatible: + contains: + enum: + - renesas,r9a07g043f-irqc + - renesas,r9a07g043u-irqc + - renesas,r9a07g044-irqc + - renesas,r9a07g054-irqc + then: + properties: + interrupts: + minItems: 48 + maxItems: 48 + interrupt-names: + minItems: 48 + maxItems: 48 + - if: properties: compatible: @@ -118,12 +140,19 @@ allOf: maxItems: 45 interrupt-names: maxItems: 45 - else: + + - if: + properties: + compatible: + contains: + enum: + - renesas,r9a08g046-irqc + then: properties: interrupts: - minItems: 48 + minItems: 61 interrupt-names: - minItems: 48 + minItems: 61 =20 unevaluatedProperties: false =20 --=20 2.43.0 From nobody Tue Apr 7 18:48:22 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 35904436358 for ; Fri, 27 Feb 2026 14:03:24 +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=1772201005; cv=none; b=hKmt+bvCsHEUG2TBUoASh9OP7t42oBG4Q5uHXtT1NWbWuF+ILtl9gTYAPTj9rsAjLflW7+dAkC2QCfz1LBPSsi/pLzTH54mZKLgrzkCCmBUV72TD7HWlNQVITmwjnvsiHo5wtcBoAC5KOph7L3GQkW1hVBUOtghvBRcntv/ylBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201005; c=relaxed/simple; bh=kLeeIwZXTuFQwtGnRJO66Ia78cNfNKwFGZTAghybjU8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lkUER6+6+7MTrU8Yxw+Rw4NwWOUC9y5MkNeLAvydTlv/EEtiVjTrw+IYjgrSmBVbwETNT7cI/C5y6eEnVsc2yBJrlfCqhGBQgLNLpRxQjCPCPn4kYLZPGg/My7h+zskQUv6TNgTwvs762u0edCDSOs1+yt9msBRIUJ1NukSvJPA= 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=FadsBg+6; 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="FadsBg+6" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-4375d4fb4d4so1316972f8f.0 for ; Fri, 27 Feb 2026 06:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201002; x=1772805802; 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=sM4T+t8m45keIBSgHiKAJa/srl0mBmQUoM29VE9GTM0=; b=FadsBg+6bVXxxUXLHscyYjln+jkfT4fMO22JWFTpCufZSdukSQ5rIdjuKjUNfQ0Htf zO9jJnzQP/hafPx0n4oK22D70OE/ixnG2CKeDm2/GHolnJjU+U7oWQpCHDncJ32BdDqi VjEXLfI81OyfaJaRG9+YdsF2fCHSWmRusbCD/LzeK0IQ9BN5weUuQPRQNbSYJHiDBgPL 2MC1zGA4ZFsqWRKplYAXRnJXrcwhdvhFYtnn1bdCahXSDMn20I2kjeadV1CL6iRf/8Dz mnDtOT4KxF4/SX/eFYgfqjllwi6uTXn9wFaGDdUyh03DLZEUuuQeWh+ARLoHmdCNTZ/M /vbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201002; x=1772805802; 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=sM4T+t8m45keIBSgHiKAJa/srl0mBmQUoM29VE9GTM0=; b=cn1n5x/DBEoOuPwiNqJdEdhUDDHNR63uXtZQRjciugvA7SBm/Maay4cl0tLWi3x0eu y051zze40YJ7cWs4m5xV1z2B1gUbXF+GFSJNrc3CM/HygN+sUbwgAna7SGAUxwNwVYVE 69h6ZPHQIb9WZnZRlm6Fd5ky/F1E4E9o/FTSeHqx2lIn+bGQksajG/c/JldG+4CfWczu ahBTGKJJhLO4NlPRUnoUqFchJkeaHL8e7lpyqL/qUVPETRRKhiFvrPQsfxcTwjLc1Jbk yi349uPLH2NkR4oyWBat0gycGkyezA2qkuWL2lLWZ1tUnAxAFjca8NcEswjGkp5XxdKy R5Rg== X-Forwarded-Encrypted: i=1; AJvYcCUKBDBkCKA6I0kWZoUzGR7IYLtkf1j/nhqCnwUW18/+nSJB6vUnbG05x+CKmbuaLExA/negQH16wJ8Am7w=@vger.kernel.org X-Gm-Message-State: AOJu0Yybb8Ay98TpvpJlCzcNtn+01PWYU6xDCxlvnYr7disQZ/xnYdzn KdJzos8vtGlVwK/vx1zWJJG+k9GUh9pnSCNSJsZdAYc09qJnAtSzzsJa X-Gm-Gg: ATEYQzyWjkwMyzqU3739Em1fzbTHi++xS1PWTUZUrz2I+eyLhb8yhXXvcazmlrplVPj djLW7ON8Pv+CpE4dwmI2BxORbk7ZwS4s7M5cpYxZXbL2yopMVcI54Smjv+ZO34Y9ygUl7hQIBzU hjtM6pXx1qmKTL9O7ze3KOAufRxIiSS5dkJyFiOdlEcFOKjb9Gd31Drosf5Ybpmg/W8+MSLzjiy aQd9byFMLjy6C09L2fQyu3c1nVilKj+XX5pXUDQRn4Uyl5Jrr0qvlZiBiJQTiB5jNQ3N2iovD9B j7X/9oX90aSoyc77U3dtWDeqFpUyfVVYXzyndKASiGHTmVvANksEK2/ABfDCgvkMAu//2S08+p6 S6m5E9rUZLUo2Oqx7vKR1OHlLWJz51t/7KVv9ZLwl1N3SIyMb6qLz/Lj74KLzSNpFV+N5aJ1dLR THI53wyI/R7VlF1PWZ13jUyxZPtCGtzEM= X-Received: by 2002:a5d:5f54:0:b0:439:8a14:ba2c with SMTP id ffacd0b85a97d-4399de20554mr4797809f8f.35.1772201002341; Fri, 27 Feb 2026 06:03:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:21 -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 3/9] irqchip/renesas-rzg2l: Dynamically allocate fwspec array Date: Fri, 27 Feb 2026 14:03:03 +0000 Message-ID: <20260227140316.308106-4-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 total number of interrupts in RZ/G2L and RZ/G3L SoC are different. The RZ/G3L has 16 external interrupts whereas RZ/G2L has only 8 external interrupts. Dynamically allocate fwspec memory instead of static allocation to support both SoCs. Signed-off-by: Biju Das --- v3->v4: * Updated commit header * Replaced IRQs->interrupts in commit description * Fixed the typo Dynamicaly->Dynamically v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index e73d426cea6d..20e2b1c4587b 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -79,7 +79,7 @@ struct rzg2l_irqc_reg_cache { static struct rzg2l_irqc_priv { void __iomem *base; const struct irq_chip *irqchip; - struct irq_fwspec fwspec[IRQC_NUM_IRQ]; + struct irq_fwspec *fwspec; raw_spinlock_t lock; struct rzg2l_irqc_reg_cache cache; } *rzg2l_irqc_data; @@ -554,6 +554,11 @@ static int rzg2l_irqc_common_probe(struct platform_dev= ice *pdev, struct device_n if (IS_ERR(rzg2l_irqc_data->base)) return PTR_ERR(rzg2l_irqc_data->base); =20 + rzg2l_irqc_data->fwspec =3D devm_kcalloc(&pdev->dev, IRQC_NUM_IRQ, + sizeof(*rzg2l_irqc_data->fwspec), GFP_KERNEL); + if (!rzg2l_irqc_data->fwspec) + return -ENOMEM; + ret =3D rzg2l_irqc_parse_interrupts(rzg2l_irqc_data, node); if (ret) return dev_err_probe(dev, ret, "cannot parse interrupts: %d\n", ret); --=20 2.43.0 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 7527842EEDA for ; Fri, 27 Feb 2026 14:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201007; cv=none; b=u6Gr/hY+flpJTduQYIB9d51jjvKRQRQAV5yg32iY9z+JaTpEJ3FzjAmjTeRg/VfJh0HLhboHzQl6mHlDAEY3ScfsQhqvE0HkSUFYmHxXlSaHVVcSs0M6opiyq/428FLsbJh0MdJ7fL4kuUn6dAztXUAA3BeVMVBfHyJSL7s3z7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201007; c=relaxed/simple; bh=JLbO7nrtSBUift2nVEJXrrhfQrzPc7khnz+/JaIykdk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FEfN/wNGFezzDewejTcPUcYNYfULeyJaNk5h1aMUvpgVB4FNucZ06BmOiiydLrGizKr5kjcQk6kPR5UOlrtUQrfoon92wxGoDlkCmggkbXdxvWqH/jNFcgzCQRvgRrhbjX1VFQ0YKSr9ythuVUTTb7KN+ldgZPonQv26f5aZjII= 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=NECgLFBH; arc=none smtp.client-ip=209.85.221.51 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="NECgLFBH" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-4398dd671daso2283866f8f.0 for ; Fri, 27 Feb 2026 06:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201004; x=1772805804; 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=zYkO8MxlQEPV3kcnl5T84e14+1veD0w7RuMWCMjQrjk=; b=NECgLFBHnJDOXtSuPuu632ISLIEhk2qnAOHBe3KI3UWbGHh2yOm3lAXQprKekwQJ8H Yb6nq0s6AVVy9+8dIVpmOXieAQhlvrPDxvDLyKkvecFdSJV0wK0HmsVomGPaK6z63/LZ 8TrpcQEpT8XxXNw5BMLknCi+pkwiKIDXXHOjyFPgRPrWMHe9P2gYcKARPAxm/KVjq7Bt n7PTxaiQmGS008GCQTMgFlPf9kZpHHWIiqy6hXcdOnHKE6ldT/hjjpZFExxq/w4QeAUe fDYCBS5SwUD9ePHGUyWcIE+0MOjZboZHl97roJLkZO+p9ZSA8vMZdjdSys7GqDvCmWM5 sQyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201004; x=1772805804; 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=zYkO8MxlQEPV3kcnl5T84e14+1veD0w7RuMWCMjQrjk=; b=Ygv48yT+Y1ThC3xh9NANFKwsEsXHvvRTnGSz3NStMQaZalp5DOcx4J/q7ExvPDTTSF nYiyAgsCf0fDYZhu9izycyumtCaNjxxspPM7VUxDJN2h2KLbL8ezCS2niWJoOBz0MhUh sMqNVIV1RThJm3Vw82ZkSED9GR1pd3d79JXyE1yfn0D+doJ4PvISmLgAEor/2yQk/Pv5 AEtkKGYo3+h0JkfqhwDPQSi4B3EE0e8Ej1EAWSbjr4dxrnDZRqPwXnicXa3sgxjJLrkj llB4qhageiAdNz1Q7MBC8i09xkcIjFaJVR62CTLG2AGV1CS4jtFjPUg+hNAY5pS8c7xw j9ig== X-Forwarded-Encrypted: i=1; AJvYcCV9xaJnh8/iqNgqDZQe2Z6BxoFKPJjmaJKkooLEe/k7ESdwfL7lbW3C5jmYH63Okby7t4OCI62W9ysAGhc=@vger.kernel.org X-Gm-Message-State: AOJu0YwnCZNxDa7u0gue2dKB9KuGKgPHgWhWRrWsmav+vtVB5gxDqP3c bLtitzkKXDA1G0S4UkcEW+fAWi7jrppLIoVGpuldL+GVmxYKkzSQdrRcRLWZz/sz X-Gm-Gg: ATEYQzzEMmtUH6PMiZYz1LKzgBRoO9N19unlGpOC+XZ5HJ1lZmWEgz0jcigPN4Gx6kf vvOT+bqBQ7LCTZDONHbxQ5ojwkFrKH4QoIt0pvnszhBMXi9oBh5+4iRmF8FOPs6jq0t4GXI+Dm+ U2wMVPrtqUvfZxmpWzguiTbib7eo4ACS7z6X1k49hxIctP/4Ukx5KeOjoWiRW1xcAWm9MUjom10 B77lCNEhoYcD1Ri0fx56ibpHI+OhP2pLfTmzPTRfGLootKvRAwYXwJsTbSSrt/hGn+ifr7wjguM HPFuf8T/HMc1xowm7nTKyuV4KPjrNEn/zRPRWpEGeMIbwmyM3/x0OGFmmHTixY58zgjhgv3LVhm VJpT9o84zj08+n5Bbks/ebmrBdnThVWZWRWwBcrcAMynTXmwHwnVhcYmIwxrHMKHhkoRmVzEoSH yzZaRlO1iQlb1bZRo+w5wSKuTHnt5K5bw= X-Received: by 2002:a5d:5f54:0:b0:435:dbc4:3af0 with SMTP id ffacd0b85a97d-4399de14d57mr4960056f8f.14.1772201003661; Fri, 27 Feb 2026 06:03:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:22 -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 4/9] irqchip/renesas-rzg2l: Drop IRQC_NUM_IRQ macro Date: Fri, 27 Feb 2026 14:03:04 +0000 Message-ID: <20260227140316.308106-5-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 total number of interrupts in RZ/G2L and RZ/G3L SoC are different. Introduce struct rzg2l_hw_info to handle the hardware differences and replace the macro IRQC_NUM_IRQ with num_irq variable in struct rzg2l_hw_info. Signed-off-by: Biju Das --- v3->v4: * Updated commit description IRQs->interrupts * Replaced the variable type for num_irq in struct rzg2l_hw_info from u8->unsigned int * Replaced the pointer variable info from irqc_priv and instead embed a struct hwinfo into irqc_priv and copy the data into it at probe time. * Replaced the check 'hwirq > (priv->info->num_irq - 1)' with hwirq >=3D priv->info.num_irq v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 46 ++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 20e2b1c4587b..412273ae860f 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -24,7 +24,6 @@ #define IRQC_IRQ_COUNT 8 #define IRQC_TINT_START (IRQC_IRQ_START + IRQC_IRQ_COUNT) #define IRQC_TINT_COUNT 32 -#define IRQC_NUM_IRQ (IRQC_TINT_START + IRQC_TINT_COUNT) =20 #define ISCR 0x10 #define IITSR 0x14 @@ -68,12 +67,21 @@ struct rzg2l_irqc_reg_cache { u32 titsr[2]; }; =20 +/** + * struct rzg2l_hw_info - Interrupt Control Unit controller hardware info = structure. + * @num_irq: Total Number of interrupts + */ +struct rzg2l_hw_info { + unsigned int num_irq; +}; + /** * struct rzg2l_irqc_priv - IRQ controller private data structure * @base: Controller's base address * @irqchip: Pointer to struct irq_chip * @fwspec: IRQ firmware specific data * @lock: Lock to serialize access to hardware registers + * @info: Hardware specific data * @cache: Registers cache for suspend/resume */ static struct rzg2l_irqc_priv { @@ -81,6 +89,7 @@ static struct rzg2l_irqc_priv { const struct irq_chip *irqchip; struct irq_fwspec *fwspec; raw_spinlock_t lock; + struct rzg2l_hw_info info; struct rzg2l_irqc_reg_cache cache; } *rzg2l_irqc_data; =20 @@ -136,7 +145,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d) raw_spin_lock(&priv->lock); if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) rzg2l_clear_irq_int(priv, hw_irq); - else if (hw_irq >=3D IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) + else if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) rzg2l_clear_tint_int(priv, hw_irq); raw_spin_unlock(&priv->lock); irq_chip_eoi_parent(d); @@ -182,7 +191,7 @@ static void rzfive_irqc_mask(struct irq_data *d) raw_spin_lock(&priv->lock); if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) rzfive_irqc_mask_irq_interrupt(priv, hwirq); - else if (hwirq >=3D IRQC_TINT_START && hwirq < IRQC_NUM_IRQ) + else if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) rzfive_irqc_mask_tint_interrupt(priv, hwirq); raw_spin_unlock(&priv->lock); irq_chip_mask_parent(d); @@ -196,7 +205,7 @@ static void rzfive_irqc_unmask(struct irq_data *d) raw_spin_lock(&priv->lock); if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) rzfive_irqc_unmask_irq_interrupt(priv, hwirq); - else if (hwirq >=3D IRQC_TINT_START && hwirq < IRQC_NUM_IRQ) + else if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) rzfive_irqc_unmask_tint_interrupt(priv, hwirq); raw_spin_unlock(&priv->lock); irq_chip_unmask_parent(d); @@ -207,7 +216,7 @@ static void rzfive_tint_irq_endisable(struct irq_data *= d, bool enable) struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hwirq =3D irqd_to_hwirq(d); =20 - if (hwirq >=3D IRQC_TINT_START && hwirq < IRQC_NUM_IRQ) { + if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) { u32 offset =3D hwirq - IRQC_TINT_START; u32 tssr_offset =3D TSSR_OFFSET(offset); u8 tssr_index =3D TSSR_INDEX(offset); @@ -249,9 +258,10 @@ static void rzfive_irqc_irq_enable(struct irq_data *d) =20 static void rzg2l_tint_irq_endisable(struct irq_data *d, bool enable) { + struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hw_irq =3D irqd_to_hwirq(d); =20 - if (hw_irq >=3D IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) { + if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) { struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); u32 offset =3D hw_irq - IRQC_TINT_START; u32 tssr_offset =3D TSSR_OFFSET(offset); @@ -385,12 +395,13 @@ static int rzg2l_tint_set_edge(struct irq_data *d, un= signed int type) =20 static int rzg2l_irqc_set_type(struct irq_data *d, unsigned int type) { + struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hw_irq =3D irqd_to_hwirq(d); int ret =3D -EINVAL; =20 if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) ret =3D rzg2l_irq_set_type(d, type); - else if (hw_irq >=3D IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) + else if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) ret =3D rzg2l_tint_set_edge(d, type); if (ret) return ret; @@ -496,7 +507,7 @@ static int rzg2l_irqc_alloc(struct irq_domain *domain, = unsigned int virq, return -EINVAL; } =20 - if (hwirq > (IRQC_NUM_IRQ - 1)) + if (hwirq >=3D priv->info.num_irq) return -EINVAL; =20 ret =3D irq_domain_set_hwirq_and_chip(domain, virq, hwirq, priv->irqchip, @@ -520,7 +531,7 @@ static int rzg2l_irqc_parse_interrupts(struct rzg2l_irq= c_priv *priv, unsigned int i; int ret; =20 - for (i =3D 0; i < IRQC_NUM_IRQ; i++) { + for (i =3D 0; i < priv->info.num_irq; i++) { ret =3D of_irq_parse_one(np, i, &map); if (ret) return ret; @@ -532,7 +543,8 @@ static int rzg2l_irqc_parse_interrupts(struct rzg2l_irq= c_priv *priv, } =20 static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct de= vice_node *parent, - const struct irq_chip *irq_chip) + const struct irq_chip *irq_chip, + const struct rzg2l_hw_info info) { struct irq_domain *irq_domain, *parent_domain; struct device_node *node =3D pdev->dev.of_node; @@ -554,7 +566,9 @@ static int rzg2l_irqc_common_probe(struct platform_devi= ce *pdev, struct device_n if (IS_ERR(rzg2l_irqc_data->base)) return PTR_ERR(rzg2l_irqc_data->base); =20 - rzg2l_irqc_data->fwspec =3D devm_kcalloc(&pdev->dev, IRQC_NUM_IRQ, + rzg2l_irqc_data->info =3D info; + + rzg2l_irqc_data->fwspec =3D devm_kcalloc(&pdev->dev, info.num_irq, sizeof(*rzg2l_irqc_data->fwspec), GFP_KERNEL); if (!rzg2l_irqc_data->fwspec) return -ENOMEM; @@ -579,7 +593,7 @@ static int rzg2l_irqc_common_probe(struct platform_devi= ce *pdev, struct device_n =20 raw_spin_lock_init(&rzg2l_irqc_data->lock); =20 - irq_domain =3D irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ= , dev_fwnode(dev), + irq_domain =3D irq_domain_create_hierarchy(parent_domain, 0, info.num_irq= , dev_fwnode(dev), &rzg2l_irqc_domain_ops, rzg2l_irqc_data); if (!irq_domain) { pm_runtime_put(dev); @@ -591,14 +605,18 @@ static int rzg2l_irqc_common_probe(struct platform_de= vice *pdev, struct device_n return 0; } =20 +static const struct rzg2l_hw_info rzg2l_hw_params =3D { + .num_irq =3D IRQC_IRQ_START + IRQC_IRQ_COUNT + IRQC_TINT_COUNT, +}; + static int rzg2l_irqc_probe(struct platform_device *pdev, struct device_no= de *parent) { - return rzg2l_irqc_common_probe(pdev, parent, &rzg2l_irqc_chip); + return rzg2l_irqc_common_probe(pdev, parent, &rzg2l_irqc_chip, rzg2l_hw_p= arams); } =20 static int rzfive_irqc_probe(struct platform_device *pdev, struct device_n= ode *parent) { - return rzg2l_irqc_common_probe(pdev, parent, &rzfive_irqc_chip); + return rzg2l_irqc_common_probe(pdev, parent, &rzfive_irqc_chip, rzg2l_hw_= params); } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(rzg2l_irqc) --=20 2.43.0 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 6F3D9436377 for ; Fri, 27 Feb 2026 14:03:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201008; cv=none; b=pohe5vhnx3/yElys7c+R6JKg5T1jp6d9bBt5Ct7/m7Ef1+smGeHstcLzAEV0zKBPX0mlV91yzWIrJvxTtpe55cScTrnhG2GFT2V20KZa243rzk/4UCn4RZZwd+ll9dsLuIngwAIl9VIJAqrazOpaeQbPLrLQ7QOhaP20AoCJyXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201008; c=relaxed/simple; bh=5Ob4If5bM1vydiRMvU1sj5ib8uHPbHMbNwg2lGsnstQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HIL4FO8zZu4BGFdF5wW/Q3y9Flh0af/Nq5gIcrwPWtU+CTtozrJDcIDG99ymhzlLFIJvTbWWj7ELMDsADL3yDNMZS1l5fe52smPqu7DRrTjMoj8sYXaKk96LMF5HkECKpItH0eAXIVrt2JoLlQMAzjjh6y+7Puh7k6gw5mUrqGw= 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=M+DW3ld3; arc=none smtp.client-ip=209.85.221.41 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="M+DW3ld3" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-43770c94dfaso1971602f8f.2 for ; Fri, 27 Feb 2026 06:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201005; x=1772805805; 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=9EHC7NrypUxgz1lYY6iG3E5oOhgzT9flGec5pjdwbFc=; b=M+DW3ld3pjndjhmlwpB0x5E1OC4LqNUNqZ05U3e9vGQnNjUDbZvsEdqRh+Zw8umnc0 u/9uVQqYnMUv0pvphYEVCtuoWYrH645gTK4RTdKhj74xszXN/8XAOfJ+aEEozsF+sSf3 aUpWYtWM+w6e+rs9b4ONWIhrd/xmMbdWsH330ZlkudtGvB/NmtFrXLow9Y7OsUeh7XXZ FhKE3qCBnXcJu+vcco5H7d9CX7T7lmXSXEThmMHDO4gOxBz6nJVPYsrQ5UZCeuGwO2i3 7caFuW05FQa69DCWPJoZY/YTtTPcWcQmHegXfS9ZpB5NXAwE8RhoKXQKgrUmDFQuoW3H eGlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201005; x=1772805805; 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=9EHC7NrypUxgz1lYY6iG3E5oOhgzT9flGec5pjdwbFc=; b=QXdk1bnpf/BWl5IKXy3ajiWKgXPwEezV6rhge7uYqnKa83fdSSxt2eaI6mVXjip2tx iLokERWyHBieT5WwEsrSh6rHIzM/jC9jPkEHXPmloGJAo7WnH6MU+O/KIU77MMxD3Fe4 mzeIw8XFkJSmP3co4nix9FJng+gHDT5h3CQ08zypRwHmMBaf+q2etAXR30PiGpxCLINC toYzqqmmxIszzfGaHPhaC0WxwmluCsMhHDLYXfAlctJaCMkB/FeCpRRuY3F6eLdiPeKi kYsxUcx8MGmGN37DG9O7iZPFLXxYngdbSsJdfHyB/6KvrFCqrS1M8J/LmpnBsYrtcsys SMTA== X-Forwarded-Encrypted: i=1; AJvYcCW5xjApthsqkdGtV4BFAN8IyK5EeZAhcL6+HN1zFfmJH6ymxBwVd/IZ9vfKjVX9QfoWQdKyUWAwbhM4FiM=@vger.kernel.org X-Gm-Message-State: AOJu0YwkDooWD94UlB9fC/O+Jg0iheb9sS/s7zKiDChdwNb37uvn7Xe6 9qvhQPBZ5K94Goxe0C715kPNaRDwA03Pf/N2HAlNht3RaTvkAv15LhxW X-Gm-Gg: ATEYQzzgq3FJWwExiGTZvWrXZginCUEP9zmyQfYv6kX9wzCIOkl7AMCP7VZmyACgLtt wY/SFwtQr3I45vweZXXh+/erZnnlHAdTojSZq1igdEOEKE1XsA6OjAET6LIdFRWQXpDY4kub5jt vPzGAlOy6s3gwFLbTAUFVQ+Mx7+/+FysBq5Hm6P62r2ARkM1E1sQYJLfuBSzGJinmh1FAyVV+zr owwx/IMDdLp729WY6Xx1UZki8sADoGNOKGFwZO1WIwQ+Et8QAvFGIg5SNqTldCnZTpPRso7H+HC dAfyJb6zdZ7K/izLZ67dxfaD/gvbYjhP6XboP3UMMhNyZh/cNK0rQSauBTtGFAc9hS+4elUssWA +ckeckHsf+0rLH1vZhKuV6EidHeiO3Wgg+ScXQMpKdLmCsTZExr1no1f+AOglIV7fiao9lYO74e 0rtYkNUa+9RKxq0pqLG42wdu3lu7jcbpg= X-Received: by 2002:a05:6000:240d:b0:436:3536:f698 with SMTP id ffacd0b85a97d-4399de3e4d4mr4811989f8f.30.1772201004687; Fri, 27 Feb 2026 06:03:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:24 -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 5/9] irqchip/renesas-rzg2l: Drop IRQC_TINT_START macro Date: Fri, 27 Feb 2026 14:03:05 +0000 Message-ID: <20260227140316.308106-6-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_TINT_START value is different for RZ/G3L and RZ/G2L SoC. Add tint_start variable in struct rzg2l_hw_info to handle this difference and drop the macro IRQC_TINT_START. Signed-off-by: Biju Das --- v3->v4: * Updated commit description 'this differences->this difference'. * Updated tint_start variable type from u8-> unsigned int. v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 412273ae860f..6bd20aedbcea 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -22,7 +22,6 @@ =20 #define IRQC_IRQ_START 1 #define IRQC_IRQ_COUNT 8 -#define IRQC_TINT_START (IRQC_IRQ_START + IRQC_IRQ_COUNT) #define IRQC_TINT_COUNT 32 =20 #define ISCR 0x10 @@ -69,9 +68,11 @@ struct rzg2l_irqc_reg_cache { =20 /** * struct rzg2l_hw_info - Interrupt Control Unit controller hardware info = structure. + * @tint_start: Start of TINT interrupts * @num_irq: Total Number of interrupts */ struct rzg2l_hw_info { + unsigned int tint_start; unsigned int num_irq; }; =20 @@ -123,7 +124,7 @@ static void rzg2l_clear_irq_int(struct rzg2l_irqc_priv = *priv, unsigned int hwirq =20 static void rzg2l_clear_tint_int(struct rzg2l_irqc_priv *priv, unsigned in= t hwirq) { - u32 bit =3D BIT(hwirq - IRQC_TINT_START); + u32 bit =3D BIT(hwirq - priv->info.tint_start); u32 reg; =20 reg =3D readl_relaxed(priv->base + TSCR); @@ -145,7 +146,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d) raw_spin_lock(&priv->lock); if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) rzg2l_clear_irq_int(priv, hw_irq); - else if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) + else if (hw_irq >=3D priv->info.tint_start && hw_irq < priv->info.num_irq) rzg2l_clear_tint_int(priv, hw_irq); raw_spin_unlock(&priv->lock); irq_chip_eoi_parent(d); @@ -170,7 +171,7 @@ static void rzfive_irqc_unmask_irq_interrupt(struct rzg= 2l_irqc_priv *priv, static void rzfive_irqc_mask_tint_interrupt(struct rzg2l_irqc_priv *priv, unsigned int hwirq) { - u32 bit =3D BIT(hwirq - IRQC_TINT_START); + u32 bit =3D BIT(hwirq - priv->info.tint_start); =20 writel_relaxed(readl_relaxed(priv->base + TMSK) | bit, priv->base + TMSK); } @@ -178,7 +179,7 @@ static void rzfive_irqc_mask_tint_interrupt(struct rzg2= l_irqc_priv *priv, static void rzfive_irqc_unmask_tint_interrupt(struct rzg2l_irqc_priv *priv, unsigned int hwirq) { - u32 bit =3D BIT(hwirq - IRQC_TINT_START); + u32 bit =3D BIT(hwirq - priv->info.tint_start); =20 writel_relaxed(readl_relaxed(priv->base + TMSK) & ~bit, priv->base + TMSK= ); } @@ -191,7 +192,7 @@ static void rzfive_irqc_mask(struct irq_data *d) raw_spin_lock(&priv->lock); if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) rzfive_irqc_mask_irq_interrupt(priv, hwirq); - else if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) + else if (hwirq >=3D priv->info.tint_start && hwirq < priv->info.num_irq) rzfive_irqc_mask_tint_interrupt(priv, hwirq); raw_spin_unlock(&priv->lock); irq_chip_mask_parent(d); @@ -205,7 +206,7 @@ static void rzfive_irqc_unmask(struct irq_data *d) raw_spin_lock(&priv->lock); if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) rzfive_irqc_unmask_irq_interrupt(priv, hwirq); - else if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) + else if (hwirq >=3D priv->info.tint_start && hwirq < priv->info.num_irq) rzfive_irqc_unmask_tint_interrupt(priv, hwirq); raw_spin_unlock(&priv->lock); irq_chip_unmask_parent(d); @@ -216,8 +217,8 @@ static void rzfive_tint_irq_endisable(struct irq_data *= d, bool enable) struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hwirq =3D irqd_to_hwirq(d); =20 - if (hwirq >=3D IRQC_TINT_START && hwirq < priv->info.num_irq) { - u32 offset =3D hwirq - IRQC_TINT_START; + if (hwirq >=3D priv->info.tint_start && hwirq < priv->info.num_irq) { + u32 offset =3D hwirq - priv->info.tint_start; u32 tssr_offset =3D TSSR_OFFSET(offset); u8 tssr_index =3D TSSR_INDEX(offset); u32 reg; @@ -261,9 +262,9 @@ static void rzg2l_tint_irq_endisable(struct irq_data *d= , bool enable) struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hw_irq =3D irqd_to_hwirq(d); =20 - if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) { + if (hw_irq >=3D priv->info.tint_start && hw_irq < priv->info.num_irq) { struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); - u32 offset =3D hw_irq - IRQC_TINT_START; + u32 offset =3D hw_irq - priv->info.tint_start; u32 tssr_offset =3D TSSR_OFFSET(offset); u8 tssr_index =3D TSSR_INDEX(offset); u32 reg; @@ -354,7 +355,7 @@ static int rzg2l_tint_set_edge(struct irq_data *d, unsi= gned int type) { struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); unsigned int hwirq =3D irqd_to_hwirq(d); - u32 titseln =3D hwirq - IRQC_TINT_START; + u32 titseln =3D hwirq - priv->info.tint_start; u32 tssr_offset =3D TSSR_OFFSET(titseln); u8 tssr_index =3D TSSR_INDEX(titseln); u8 index, sense; @@ -401,7 +402,7 @@ static int rzg2l_irqc_set_type(struct irq_data *d, unsi= gned int type) =20 if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) ret =3D rzg2l_irq_set_type(d, type); - else if (hw_irq >=3D IRQC_TINT_START && hw_irq < priv->info.num_irq) + else if (hw_irq >=3D priv->info.tint_start && hw_irq < priv->info.num_irq) ret =3D rzg2l_tint_set_edge(d, type); if (ret) return ret; @@ -503,7 +504,7 @@ static int rzg2l_irqc_alloc(struct irq_domain *domain, = unsigned int virq, tint =3D TINT_EXTRACT_GPIOINT(hwirq); hwirq =3D TINT_EXTRACT_HWIRQ(hwirq); =20 - if (hwirq < IRQC_TINT_START) + if (hwirq < priv->info.tint_start) return -EINVAL; } =20 @@ -606,6 +607,7 @@ static int rzg2l_irqc_common_probe(struct platform_devi= ce *pdev, struct device_n } =20 static const struct rzg2l_hw_info rzg2l_hw_params =3D { + .tint_start =3D IRQC_IRQ_START + IRQC_IRQ_COUNT, .num_irq =3D IRQC_IRQ_START + IRQC_IRQ_COUNT + IRQC_TINT_COUNT, }; =20 --=20 2.43.0 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 84745439001 for ; Fri, 27 Feb 2026 14:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201009; cv=none; b=UekKnJncIUA0J2AM+kvCaZiqyhdMxgAA1Mh9xB+V3NBOxbaSwV2gaI+pqEz7r8XnquK56406sc4tfbTTfOOSS9/pfC6i48TX5WOkZPf/Fh2XBQ6nUWtmTnmp+IyJSxWh4SOtQX5Pdfs0sgTL3K+uude1e3xtBr8esh1FYiSyGfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201009; c=relaxed/simple; bh=TZ0Nhq9pboAkoeLu9YpOxbUkj3FPRhIy0on5upn3npE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XFQ3fTf97xBjJG3B40m7qZuSCxo4LGpXVB1mA9qOFLbs8qyNHsvAoTxpiFDB0QfXNnStmbyKNzXvKrGSymOIqpKi/YnMIC1poXSAJmLAF/EtRk63dJev/0/pGDeQ4lHQ9KoGq+9zB5jjV4ulT80L/EwD9JVaG9BY4ZqcE766fI0= 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=B+PFeZdS; arc=none smtp.client-ip=209.85.221.42 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="B+PFeZdS" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-4398f8e2837so1804342f8f.1 for ; Fri, 27 Feb 2026 06:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201006; x=1772805806; 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=CtfwJFU2C3F6SuqP8t7kDFFN/csxu26OVZQtc7hGK+U=; b=B+PFeZdSZmqb+lrLGF+w/6NVmgEDhhHhqiOt+JmocmVsC9xpSvstC/0k7p65hq2zRy gLs5Lv5mmRr1SDQef1A1CEvgCr2ieZm7VqX2RjxgLGrgS/W3BeiP/rRyJznkjMJyrNMZ LY2xMARLKWLU6LrL0PoyBKMijiicnU6Jsy25WGpZJj+dNBAex3l1fHArQ/rrn9j8XycF HMsGFJ4c5y/SnfTY0kjS6BP0hUDl/Mlb54uBD8t5uGS1ucHJ+eFXsi1U2p+hXzPY57J7 ZExQEjVyhN5yRzRS4OlHYH2UegYtm/C77VRNIJFwrK40IYpqsPWcw0K0R4+lFeWqlZZR Go0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201006; x=1772805806; 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=CtfwJFU2C3F6SuqP8t7kDFFN/csxu26OVZQtc7hGK+U=; b=feromJL5D+5eoXghF0csPZOCIBijL8pk5TtXQ0n4K9BTE15AW7sHW+6wlJZ039QwYl YtVlDEXJFhIJLyPr5Qxpe/OYeC7eeT9tRvMXLJ8TInrJNsitZ/GyN8dmPXt3z/C19iML AVJGLo9bmi607op+ySs7K8UVBbRjlR7gPAI161SZNunUJI0rcg955yBEJpzcQ9R8yXNU LOBP6OyYmQwXA8/80HoCnVrXvYCvifYk8MP32YE5UCaGRuMy56NtQmR4hZqs9Rp8DdVJ b4pMNl6Rc5o34pFlcCc/jqpYV6iQ9r7bEkMjsnFygfCjJF+Z7HSXFI4LpL0vh1CGSZyh Ry+A== X-Forwarded-Encrypted: i=1; AJvYcCVUv2VcQqGzEr/t8xkWCHhQ8V1h1oLJ+nxw3DFvEyQ5X+mJG8vG4ZAD8lActCTTt/7L2jng45zYgUmHdPc=@vger.kernel.org X-Gm-Message-State: AOJu0YzIgNMk5xTg4vJVcj8Lwp3nrUEuT2fLTead4IuVqGfdSa++S5M2 TOc7q0B4IrML8fJbEmPYHh6gKL8JwaAK5uBgmHlhQlGD6mxI+Rw8TgJiDNEkXXJG X-Gm-Gg: ATEYQzwXGwrXgCAKni2Fdi8fp7iUvZvcXyo2whwyvDNzGMl4JNCccMNWcvqHHXJaMVB SYlgvCF8FcU1fqhXyUiqDHXg3Y6KlosnMHpK44zh4QUKFMOUDvPDis1GTmOq4iEQ5lvO28Nr2Ln xAM7U7RRh2KqhvWYBNXbepymhtAr9H0ThvHzD0N2MVf4xcvfI0fxwo3Z/BcLZQr/iGC44qHCxjc gyGlvR6jtFCxoH2Xhc4Foq02OnT0Q5mb8tKoMeVff3sthC/F00uP7mVJgf3vBy1onUL8Jdf1PlZ cvu4F+Ac9RWMVm+UpVSUSVb5/LbahwLLYShe3YmH/C+q6W1QhxgPlRvwFmW4hN2neqmWlOqui1P /I/FZE+/kuo/NXCuPOr8SYmyu+ZZxTCCu5i18qD8QtNy3zNk4/31gYH26nBzM6l2c0HgKp+yMNz 6NDrV3bjP/ZW2VcW59Z2SwjhRyf0TAeIyaXZcuKdu5cA== X-Received: by 2002:a05:6000:290a:b0:439:98b8:6479 with SMTP id ffacd0b85a97d-4399de2c1femr4802368f8f.45.1772201005620; Fri, 27 Feb 2026 06:03:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:24 -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 6/9] irqchip/renesas-rzg2l: Drop IRQC_IRQ_COUNT macro Date: Fri, 27 Feb 2026 14:03:06 +0000 Message-ID: <20260227140316.308106-7-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 total number of external interrupts in RZ/G2L and RZ/G3L SoC are different. The RZ/G3L has 16 external interrupts whereas RZ/G2L has only 8 external interrupts. Add irq_count variable in struct rzg2l_hw_info to handle these differences and drop the macro IRQC_IRQ_COUNT. Signed-off-by: Biju Das --- v3->v4: * Updated commit description IRQs->interrupts. * Updated variable type of irq_count from u8->unsigned int. v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 6bd20aedbcea..5e30dc2328e0 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -21,7 +21,6 @@ #include =20 #define IRQC_IRQ_START 1 -#define IRQC_IRQ_COUNT 8 #define IRQC_TINT_COUNT 32 =20 #define ISCR 0x10 @@ -68,10 +67,12 @@ struct rzg2l_irqc_reg_cache { =20 /** * struct rzg2l_hw_info - Interrupt Control Unit controller hardware info = structure. + * @irq_count: Number of IRQC interrupts * @tint_start: Start of TINT interrupts * @num_irq: Total Number of interrupts */ struct rzg2l_hw_info { + unsigned int irq_count; unsigned int tint_start; unsigned int num_irq; }; @@ -144,7 +145,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d) unsigned int hw_irq =3D irqd_to_hwirq(d); =20 raw_spin_lock(&priv->lock); - if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) + if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D priv->info.irq_count) rzg2l_clear_irq_int(priv, hw_irq); else if (hw_irq >=3D priv->info.tint_start && hw_irq < priv->info.num_irq) rzg2l_clear_tint_int(priv, hw_irq); @@ -190,7 +191,7 @@ static void rzfive_irqc_mask(struct irq_data *d) unsigned int hwirq =3D irqd_to_hwirq(d); =20 raw_spin_lock(&priv->lock); - if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) + if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D priv->info.irq_count) rzfive_irqc_mask_irq_interrupt(priv, hwirq); else if (hwirq >=3D priv->info.tint_start && hwirq < priv->info.num_irq) rzfive_irqc_mask_tint_interrupt(priv, hwirq); @@ -204,7 +205,7 @@ static void rzfive_irqc_unmask(struct irq_data *d) unsigned int hwirq =3D irqd_to_hwirq(d); =20 raw_spin_lock(&priv->lock); - if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D IRQC_IRQ_COUNT) + if (hwirq >=3D IRQC_IRQ_START && hwirq <=3D priv->info.irq_count) rzfive_irqc_unmask_irq_interrupt(priv, hwirq); else if (hwirq >=3D priv->info.tint_start && hwirq < priv->info.num_irq) rzfive_irqc_unmask_tint_interrupt(priv, hwirq); @@ -400,7 +401,7 @@ static int rzg2l_irqc_set_type(struct irq_data *d, unsi= gned int type) unsigned int hw_irq =3D irqd_to_hwirq(d); int ret =3D -EINVAL; =20 - if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D IRQC_IRQ_COUNT) + if (hw_irq >=3D IRQC_IRQ_START && hw_irq <=3D priv->info.irq_count) ret =3D rzg2l_irq_set_type(d, type); else if (hw_irq >=3D priv->info.tint_start && hw_irq < priv->info.num_irq) ret =3D rzg2l_tint_set_edge(d, type); @@ -500,7 +501,7 @@ static int rzg2l_irqc_alloc(struct irq_domain *domain, = unsigned int virq, * from 16-31 bits. TINT from the pinctrl driver needs to be programmed * in IRQC registers to enable a given gpio pin as interrupt. */ - if (hwirq > IRQC_IRQ_COUNT) { + if (hwirq > priv->info.irq_count) { tint =3D TINT_EXTRACT_GPIOINT(hwirq); hwirq =3D TINT_EXTRACT_HWIRQ(hwirq); =20 @@ -607,8 +608,9 @@ static int rzg2l_irqc_common_probe(struct platform_devi= ce *pdev, struct device_n } =20 static const struct rzg2l_hw_info rzg2l_hw_params =3D { - .tint_start =3D IRQC_IRQ_START + IRQC_IRQ_COUNT, - .num_irq =3D IRQC_IRQ_START + IRQC_IRQ_COUNT + IRQC_TINT_COUNT, + .irq_count =3D 8, + .tint_start =3D IRQC_IRQ_START + 8, + .num_irq =3D IRQC_IRQ_START + 8 + IRQC_TINT_COUNT, }; =20 static int rzg2l_irqc_probe(struct platform_device *pdev, struct device_no= de *parent) --=20 2.43.0 From nobody Tue Apr 7 18:48:22 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 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.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 418E243C052 for ; Fri, 27 Feb 2026 14:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201011; cv=none; b=KFWlkvqS5t8ZSBwSjUejel86s4IkDE4KGTUvJQaIJJU26NcYkzakFsHUoqTzrVnQybKl4Pel2CTkKB4BX9fmDE2kmjeg7T6lPbMq4vSfRaMYJktiv9JyFohvuI5SCSYawUS9jCoDYpdxq0dBWDw0DIMk0vefVwA9yHVUj3sucYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201011; c=relaxed/simple; bh=kL2l/vaaZH0Mjb/6DP2cEVtv8HOl6c9ULYdSdt/q2RY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m2V4LGPPpoOQcyeWNOYEgAOlP2IW7CUq51MQdDOIjif/yWcyek0ZoLkvk0uI5Pg8C7PqXwLJxDRgBku6KJ2uNI20zcuwMJpshTAAjmaaRWTyEFHwLszAVWsU5U4DBu0TixrTUlGk93SiCAp3QfjJfpxf8U+212jA9ePEGOTKtFo= 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=MfSRYqGJ; arc=none smtp.client-ip=209.85.221.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="MfSRYqGJ" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4398e850783so1478821f8f.0 for ; Fri, 27 Feb 2026 06:03:29 -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=WTx1Ig68m3990TuaMC1o3YCGcen11kpdJBTmI/bujgA=; b=MfSRYqGJT9Urwy1Q9fLTqNUTqLtpBO5jYKrSZhWJFP7Lqv5tIEVsOMkhbfY2IONR5x czgxwY+M8626YvL9NUJnYLK8dNwzswO801NCKQcLVc2x8qvW0MbflkwkK6p4OV6hN47o 7hkkuPbo53TzmjBpyFkIo1y8q+B5vY/ZKUm1tBTbLNJvxQPDusEQaUnP08Nm6kjD3ZSg FsaXIjBYZluskAE2Aq3qudFEXld0TMSwBWroR2xVUqn7e8rxYRI7uOayNGhsK30Cpg37 ffT7B1mtr/DLTBkXSf7i5PuMxgzanDPZbi+oFpC3MO7HN1eblXWpEvfi/jbCGm7TMxo+ Emug== 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=WTx1Ig68m3990TuaMC1o3YCGcen11kpdJBTmI/bujgA=; b=IjbAgPGtVRXx/SVshJmMsqv0vpTpu3UP5vlq30MShnjuOF88c/+7K581nk51S49phv faJnyIJeMneQ9PNxWhLBFbpfSL+bDHUYuy5ShRiB5kAEkdQq2IOwzk1QY2binjz/dw6o 1fQAyFUsD7PwgGOZuGV41BAppELVHTofl1FfmWlMJcPSnh3nwRw/66+2+6h1UYrhl4U2 Kfjzcqka6YNdc72wMiaTWlEZM+dh7o+pMQjG4jdsigOBRT5QdPGjV+vvevhL9Q/slcbC RVd827fAxWdfWIye5gwk5vvYrMMJhRtI+GlaEVWljP/d6E0Dr73AYZZ5rzTPIu36TIVs 1F+Q== X-Forwarded-Encrypted: i=1; AJvYcCV5pioczXXM8ITXoArBZ6UosrzHRHcQlef45kjxYphasL2JLYuxw+pj0EXsNrivaY7n4Mwi3lWxq0zMIMk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+EAkgvfpnmUa9NU8rWCM0XC5YU8jWd18I44tV3aVEQtckgX7B tb8SwJEL2cpJnYgb4gUQv7yiWlIHJe1ltFVUi6YBiW069U/a2b/NOKgB X-Gm-Gg: ATEYQzyOD5WbjGMRQbMVWI0D8CdPZ3LD21cxvbpbPrjWsflDvjEQRe9Z49tgxgxx8UZ Uf4dA5kzNksQFG8MU1k9m1VocetP4srd8nDaDbGJ5Vt3xwfbpgGkzuFvLt/HrlRqKNbGc59CFAK +aBirWDzvPwOxaLLgyaH21dJrwBUhSsFF3vuZ9zGjGZmHkx3KOZYUEDS3cuVdqoHm6+NWX8xNRe ycW5v4l0cEUsVCXEKN9QNm+D9opZ3Wf3FJ9yH4MCzBtmWiBvo7+NiXdnD0NghDlBoaw7EB7a6xH rtv1/bDughL++VvYs1iWJHcXIHbfTnnTG6fFlfrZYbNwysl9vWo9Z47LbfEi4pylz8tmf1Id8xI U8+jADDq9xeOhs0zWxPvboCzCw93uPiQJnJnbNRSH+aq94fDPx6H008YdyoAsQAJ3Yrq8hOnL6k l5ftJsBfQli+Jj8gzeh38R/I/QiRciElmzvjAjiTltTw== X-Received: by 2002:a05:6000:2dc3:b0:439:8d96:55d1 with SMTP id ffacd0b85a97d-4399dde5f73mr5406205f8f.8.1772201007451; Fri, 27 Feb 2026 06:03:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03: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 v4 8/9] irqchip/renesas-rzg2l: Add shared interrupt support Date: Fri, 27 Feb 2026 14:03:08 +0000 Message-ID: <20260227140316.308106-9-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 total number of external interrupts in RZ/G2L and RZ/G3L SoC are different. The RZ/G3L has 16 external interrupts out of which it shares 8 interrupts with TINT, whereas RZ/G2L has only 8 external interrupts. Add shared_irq variable in struct rzg2l_hw_info to handle these differences by adding the callback irq_{request,release}_resources(). Signed-off-by: Biju Das --- v3->v4: * Updated commit header irq->interrupt. * Updated commit description IRQs->interrupts. * Updated shared_irq_cnt variable type from u8->unsigned int. v2->v3: * No change v1->v2: * No change --- drivers/irqchip/irq-renesas-rzg2l.c | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 3010247fe3ef..491421cd9681 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -29,6 +29,8 @@ #define TITSR(n) (0x24 + (n) * 4) #define TITSR0_MAX_INT 16 #define TITSEL_WIDTH 0x2 +#define INTTSEL 0x2c +#define TINTSEL(n) BIT(n) #define TSSR(n) (0x30 + ((n) * 4)) #define TIEN BIT(7) #define TSSEL_SHIFT(n) (8 * (n)) @@ -58,10 +60,12 @@ /** * struct rzg2l_irqc_reg_cache - registers cache (necessary for suspend/re= sume) * @iitsr: IITSR register + * @inttsel: INTTSEL register * @titsr: TITSR registers */ struct rzg2l_irqc_reg_cache { u32 iitsr; + u32 inttsel; u32 titsr[2]; }; =20 @@ -71,12 +75,14 @@ struct rzg2l_irqc_reg_cache { * @irq_count: Number of IRQC interrupts * @tint_start: Start of TINT interrupts * @num_irq: Total Number of interrupts + * @shared_irq_cnt: Number of shared interrupts */ struct rzg2l_hw_info { const u8 *tssel_lut; unsigned int irq_count; unsigned int tint_start; unsigned int num_irq; + unsigned int shared_irq_cnt; }; =20 /** @@ -295,6 +301,83 @@ static void rzg2l_irqc_irq_enable(struct irq_data *d) irq_chip_enable_parent(d); } =20 +static bool rzg2l_irqc_is_shared_irqc(const struct rzg2l_hw_info info, uns= igned int hw_irq) +{ + return ((hw_irq >=3D (info.tint_start - info.shared_irq_cnt)) && hw_irq <= info.tint_start); +} + +static bool rzg2l_irqc_is_shared_tint(const struct rzg2l_hw_info info, uns= igned int hw_irq) +{ + return ((hw_irq >=3D (info.num_irq - info.shared_irq_cnt)) && hw_irq < in= fo.num_irq); +} + +static int rzg2l_irqc_irq_request_resources(struct irq_data *d) +{ + unsigned int hw_irq =3D irqd_to_hwirq(d); + struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); + u32 offset, tssr_offset; + u8 tssr_index, tssel_shift; + u32 reg, inttsel_reg; + u8 value; + + if (!priv->info.shared_irq_cnt) + return 0; + + if (rzg2l_irqc_is_shared_irqc(priv->info, hw_irq)) { + offset =3D hw_irq + IRQC_TINT_COUNT - priv->info.tint_start; + tssr_offset =3D TSSR_OFFSET(offset); + tssr_index =3D TSSR_INDEX(offset); + tssel_shift =3D TSSEL_SHIFT(tssr_offset); + + reg =3D readl_relaxed(priv->base + TSSR(tssr_index)); + value =3D (reg & (TIEN << tssel_shift)) >> tssel_shift; + if (value) + goto err_conflict; + + raw_spin_lock(&priv->lock); + inttsel_reg =3D readl_relaxed(priv->base + INTTSEL); + inttsel_reg |=3D TINTSEL(offset); + writel_relaxed(inttsel_reg, priv->base + INTTSEL); + raw_spin_unlock(&priv->lock); + } else if (rzg2l_irqc_is_shared_tint(priv->info, hw_irq)) { + offset =3D hw_irq - priv->info.tint_start; + tssr_offset =3D TSSR_OFFSET(offset); + tssr_index =3D TSSR_INDEX(offset); + + inttsel_reg =3D readl_relaxed(priv->base + INTTSEL); + value =3D (inttsel_reg & TINTSEL(offset)) >> offset; + if (value) + goto err_conflict; + } + + return 0; + +err_conflict: + pr_err("%s: Shared SPI conflict!\n", __func__); + return -EBUSY; +} + +static void rzg2l_irqc_irq_release_resources(struct irq_data *d) +{ + unsigned int hw_irq =3D irqd_to_hwirq(d); + struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); + u32 offset; + u8 inttsel_reg; + + if (!priv->info.shared_irq_cnt) + return; + + if (rzg2l_irqc_is_shared_irqc(priv->info, hw_irq)) { + offset =3D hw_irq + IRQC_TINT_COUNT - priv->info.tint_start; + + raw_spin_lock(&priv->lock); + inttsel_reg =3D readl_relaxed(priv->base + INTTSEL); + inttsel_reg &=3D ~TINTSEL(offset); + writel_relaxed(inttsel_reg, priv->base + INTTSEL); + raw_spin_unlock(&priv->lock); + } +} + static int rzg2l_irq_set_type(struct irq_data *d, unsigned int type) { struct rzg2l_irqc_priv *priv =3D irq_data_to_priv(d); @@ -424,6 +507,8 @@ static int rzg2l_irqc_irq_suspend(void *data) void __iomem *base =3D rzg2l_irqc_data->base; =20 cache->iitsr =3D readl_relaxed(base + IITSR); + if (rzg2l_irqc_data->info.shared_irq_cnt) + cache->inttsel =3D readl_relaxed(base + INTTSEL); for (u8 i =3D 0; i < 2; i++) cache->titsr[i] =3D readl_relaxed(base + TITSR(i)); =20 @@ -442,6 +527,8 @@ static void rzg2l_irqc_irq_resume(void *data) */ for (u8 i =3D 0; i < 2; i++) writel_relaxed(cache->titsr[i], base + TITSR(i)); + if (rzg2l_irqc_data->info.shared_irq_cnt) + writel_relaxed(cache->inttsel, base + INTTSEL); writel_relaxed(cache->iitsr, base + IITSR); } =20 @@ -461,6 +548,8 @@ static const struct irq_chip rzg2l_irqc_chip =3D { .irq_unmask =3D irq_chip_unmask_parent, .irq_disable =3D rzg2l_irqc_irq_disable, .irq_enable =3D rzg2l_irqc_irq_enable, + .irq_request_resources =3D rzg2l_irqc_irq_request_resources, + .irq_release_resources =3D rzg2l_irqc_irq_release_resources, .irq_get_irqchip_state =3D irq_chip_get_parent_state, .irq_set_irqchip_state =3D irq_chip_set_parent_state, .irq_retrigger =3D irq_chip_retrigger_hierarchy, @@ -642,6 +731,7 @@ static const struct rzg2l_hw_info rzg3l_hw_params =3D { .irq_count =3D 16, .tint_start =3D IRQC_IRQ_START + 16, .num_irq =3D IRQC_IRQ_START + 16 + IRQC_TINT_COUNT, + .shared_irq_cnt =3D 8, }; =20 static const struct rzg2l_hw_info rzg2l_hw_params =3D { --=20 2.43.0 From nobody Tue Apr 7 18:48:22 2026 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 81CC743C068 for ; Fri, 27 Feb 2026 14:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201012; cv=none; b=DwXtsPLlc6g6gF+a36yFoVz64cHBeFfigcGBykgAIQ3HE2Xr+pDRJJVM1KYmd2TcXC+YR1+rn/ulYQld1OEpVPnlIpZ5Zl49R2uLSilpsgbef8h6WfCqdCq+6m67H4JY31t7bt677K+KNZAGwaHpkQ3BVI4jCHjOK2E/FJaDUyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201012; c=relaxed/simple; bh=v8NuAqPHuQhxiIPA6oSZRKTTw8K3lCcS4wYxX82x2YI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ATfjOp7+hpmc0DdvKyvd0R9VSlPrxgV/G0qNeJRcjRb0eIqV1gKzDGQSbLR4abitUJfk6kc8JjmJ0rg9zYjuhKWIG+bDgUNDWAVGXzQIbFWY5OgOm+3TreWhlhMG2aHw4IaC45bRzyyn3w+yqy9eTvkkme1hJnqLjeyk+o6kxn8= 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=PlHldy7g; arc=none smtp.client-ip=209.85.221.54 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="PlHldy7g" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-436356740e6so2185917f8f.2 for ; Fri, 27 Feb 2026 06:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772201009; x=1772805809; 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=tbhORpx+Sybx+mRQWlVCWvB5Y61i5coqsSmdGVq+Myg=; b=PlHldy7gWyJLVqRNlVnTcWnKZT2CbIifYUctIE33qHvnWTn0YvMBzxNqEzbWEfhb46 MggEecUg6IzY8fhtagQ409+Vb4GMa0cihJvqmeKyIatOucGFFIEDsX/uNEbQl7H7Qxge IN5Zxq8I2/5h5WXf6rC6L1MOrpgGQ6tWEVJ7RBf4HkEuht8dwp8dPzaalO+2A1tksOkt a4pWdLjXQXKKEQCA8ntEqZtxX7Q8vX03Hjr8lvXbIr4ttu+BWP4f1g9QNhr/wD6qfo+H WC6QkmtnnD4t3RiS3XPjLxOz3rhmwLiXBU19S5/2xbZu80RCyqdCnH6SN33eUM7p4cm2 d/eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772201009; x=1772805809; 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=tbhORpx+Sybx+mRQWlVCWvB5Y61i5coqsSmdGVq+Myg=; b=WyIeyu9J/R4NV/pjWl3UhsDUneeK6YxJYro4cx0d4Oe7FL8kbNhZ4F9dER/14zi/9O OPWo++j1yBTB964pvLlYBW7QRVigU7MJ10VytI8Gqt+sCdXIBKGLGu89/lQ0YX3pqUpO LfsjWG0H3DoIhq8wrEi1r+v9fMbefRz4xKfsTNQO5zDPzmRkkoY1fZEJm3YtzPosvEve 8Nl5TNYjDxDoaFj95te4R5CwwacfsTEOFjcSsySfXbP9CfWn1UmrDkSNszxeV2vwTCi6 UI0pl69yJOne0mluDDFr8jzEGPRO9MhyJR3BvEpu50VMC4fytpQh4Lx0t7UZgjTFrP+1 1PWg== X-Forwarded-Encrypted: i=1; AJvYcCUgN7ivkkaVo6j07/YTBWQmQlk8nBjqt+jBIhAlUn3aqB4Na16Jle0DjSpPelBr0/B9K8hT72KAHZVIsIQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwXui55iNUHjAaQ8gr0ypn1bY0F3oKH6x6sD35u5MRTecDP2iU+ BbsYnvFmEgaOmOwXApY05Trp+bJIAZ+j1nh6CYlHcpg+P/srMdQDGVV8 X-Gm-Gg: ATEYQzwrMDVYE3RFi+Ly50W5XM0FCwduGENiO36thpLs6xG9JC+uznw4vibAdkAkkuy PmXFwdIm78T7usjXIeRdug+0sFc8v/g6TfxXQjXWEFyGrvQ6Q7AG9gfHiNtRf42gTa/dMQiWlml vlPaFY0s0O1/CVwNdLTrb5f87PtNABJhvaXbWCetascvFkXJgnUIuJbT5LWKXrA4RZe6G14DDhG QNS7ahjt743zmZXRndxK476cYFV+ffEvNz2lnlMsuN6h4KKTPNc36Q3qXgh0jP3rzy0SX1LNdsu E1gjplCNzON9V9AsXirCISK3QMdi1sCO4tLkKcHwq7bt7QMGd4CVJgruwV3qKMevmauonpm8Liw gFPOcaLNY0wVshH/TZLfHEsiTb7KBheL2RgXn6sOhdFEkdLN5GRQec/orA8cKGwW1o1RPqLx7HI Vvs+WvXnM6eohpoocXz8AdV+f1+GiJs08e/hh5Mnz+TA== X-Received: by 2002:a5d:5c89:0:b0:436:d824:621b with SMTP id ffacd0b85a97d-4399de1c64amr4917597f8f.32.1772201008670; Fri, 27 Feb 2026 06:03:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:03:27 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v4 9/9] arm64: dts: renesas: r9a08g046: Add ICU node Date: Fri, 27 Feb 2026 14:03:09 +0000 Message-ID: <20260227140316.308106-10-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 Add interrupt control node to RZ/G3L ("R9A08G046") SoC DTSI and add icu as interrupt-parent of pincontrol. Signed-off-by: Biju Das --- This patch depend upon [1] [1] https://lore.kernel.org/linux-renesas-soc/20260203131048.421708-9-biju.= das.jz@bp.renesas.com/T/#u v3->v4: * No change v2->v3: * No change v1->v2: * No change --- arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g046.dtsi index 973370cbdb83..d701b6a2375e 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi @@ -188,6 +188,7 @@ pinctrl: pinctrl@11030000 { gpio-ranges =3D <&pinctrl 0 0 232>; interrupt-controller; #interrupt-cells =3D <2>; + interrupt-parent =3D <&icu>; clocks =3D <&cpg CPG_MOD R9A08G046_GPIO_HCLK>; power-domains =3D <&cpg>; resets =3D <&cpg R9A08G046_GPIO_RSTN>, @@ -197,6 +198,96 @@ pinctrl: pinctrl@11030000 { renesas,clonech =3D <&sysc 0xe2c>; }; =20 + icu: interrupt-controller@11050000 { + compatible =3D "renesas,r9a08g046-irqc"; + #interrupt-cells =3D <2>; + #address-cells =3D <0>; + interrupt-controller; + reg =3D <0 0x11050000 0 0x10000>; + interrupts =3D , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-names =3D "nmi", + "irq0", "irq1", "irq2", "irq3", + "irq4", "irq5", "irq6", "irq7", + "irq8", "irq9", "irq10", "irq11", + "irq12", "irq13", "irq14", "irq15", + "tint0", "tint1", "tint2", "tint3", + "tint4", "tint5", "tint6", "tint7", + "tint8", "tint9", "tint10", "tint11", + "tint12", "tint13", "tint14", "tint15", + "tint16", "tint17", "tint18", "tint19", + "tint20", "tint21", "tint22", "tint23", + "tint24", "tint25", "tint26", "tint27", + "tint28", "tint29", "tint30", "tint31", + "bus-err", "ec7tie1-0", "ec7tie2-0", "ec7tiovf-0", + "ovfunf0", "ovfunf1", "ovfunf2", "ovfunf3", + "ovfunf4", "ovfunf5", "ovfunf6", "ovfunf7"; + clocks =3D <&cpg CPG_MOD R9A08G046_IA55_CLK>, + <&cpg CPG_MOD R9A08G046_IA55_PCLK>; + clock-names =3D "clk", "pclk"; + power-domains =3D <&cpg>; + resets =3D <&cpg R9A08G046_IA55_RESETN>; + }; + dmac: dma-controller@11820000 { compatible =3D "renesas,r9a08g046-dmac", "renesas,rz-dmac"; reg =3D <0 0x11820000 0 0x10000>, --=20 2.43.0