From nobody Sun Feb 8 23:13:23 2026 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazon11013066.outbound.protection.outlook.com [40.93.201.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63D79326958; Fri, 23 Jan 2026 06:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.201.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769151375; cv=fail; b=d/RgYGfD4SfZVi86PgoIhZiP88BxODoXl2viu1A8/9uEa9lH2gCr0WH/IfKUg0W+oV/wmfHhD6NZ519uwT6BEMNJLN09Tteey/e/5s31wV++S7s6pMgnoOfUY0xUMJ0tSBaStok4PpqIxEDIFkptLQjmvmqXczAZrc38FwcinEY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769151375; c=relaxed/simple; bh=KP7C19ag6Ub/OJkWXY/xmv8YuFQUwhDEWU/1EMDJo/U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=X5ioTYU5nECCQ13TQj0pmLzhgpjlxm8CaL1McNdwTHCBovd5aiO12GTGjnuMLErMtwYHmXOAIuLqaqwiwQgy+7pxnX8VmE8rTSFzi2i5uGzbpxCOV3bZ6Lfmg9DDFVTbN2IPfftokUfcEBgRRVLhJWPYBA2OJ35OmBv9ONOLDMk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=SqD3lLrZ; arc=fail smtp.client-ip=40.93.201.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="SqD3lLrZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MOMPUZnuA76+rSVsXgFHOc87vPSw6Rq5o8hDnvFkOfPNGObLidfL7RnXdsxyj/mW1UEhSHu37s2XpGlLaB4UzM13ocJP4AwHSIqXE3gSuT5IHg5LBpTwGrQG7LEetJh7xfmcvp5Dls1BXv/1VE/bz0+DFRtK6l3DZlSVTD49MKLuXwEt+jHkWEKyQ3d+UTuNizyWke8NjZIJW64S/qfq4TqjeWV4Se7BhrK2CGp0ryP+9W22OPG6ai4S1L9CyNmmQaGVuzgFdp2y7t0rEN1B92auNmozD+x+SXUyXq3hzH6oOmaXzi/uLL6CcXDJvvZeHZxx5sZ7dq4Xh9+i/bQl3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AQucx2QPeEKrNFBkwln1D4hjWlQIfePZNved7T1ZqgQ=; b=QsUFkwzLTMlKRz6WbvQj3u12+BosNPODCk+hfYio1iC6JWprr+LxDUoM973yh7lSp4w9413PCY+JTQ+2s5ShWKTk7uZckr3/HCIokJtV6yR1V6BRAd/keyaGgcwISmPUUyPCHzj4iz5wJMcxOy+d5gCslugZZE3JjitmZms5pc/eJFInkLE6xq3mtK2On8/kMTv1Dk7DkYCnQooJEes8XDQsAi5B64OQ8WVk6RSaTZi/B5/8wutX0ltcchZOpbdP7xgL0zGt7wBdsUX8EobN8uiBJVEyUWsAKg3VIlp5AYKRxeYFQm+HoRvQAT7KAlLVyMMGNYVAx2sPbdXm4l8zIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AQucx2QPeEKrNFBkwln1D4hjWlQIfePZNved7T1ZqgQ=; b=SqD3lLrZdpTXJ/jOoLlKDs/D1dr7qoKkWRjndOTPtfxFXCR+dfNCuQlSiwI5r6tRJeq3pbZmQLUWMqYIrCOwhl8UnCI+RXoNeXzlgD3YUlxNAzSKyu3IC2niAoGUgjTPU9usGAIxrrUtASMdZph6OBG1l/Xseov8LBQSk8o8h+A= Received: from SJ0PR03CA0257.namprd03.prod.outlook.com (2603:10b6:a03:3a0::22) by MN0PR10MB6008.namprd10.prod.outlook.com (2603:10b6:208:3c8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9542.11; Fri, 23 Jan 2026 06:56:10 +0000 Received: from SJ1PEPF000026C4.namprd04.prod.outlook.com (2603:10b6:a03:3a0:cafe::c3) by SJ0PR03CA0257.outlook.office365.com (2603:10b6:a03:3a0::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9542.11 via Frontend Transport; Fri, 23 Jan 2026 06:55:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by SJ1PEPF000026C4.mail.protection.outlook.com (10.167.244.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.3 via Frontend Transport; Fri, 23 Jan 2026 06:56:09 +0000 Received: from DLEE200.ent.ti.com (157.170.170.75) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 23 Jan 2026 00:56:08 -0600 Received: from DLEE208.ent.ti.com (157.170.170.97) by DLEE200.ent.ti.com (157.170.170.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 23 Jan 2026 00:56:08 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE208.ent.ti.com (157.170.170.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Fri, 23 Jan 2026 00:56:08 -0600 Received: from psdkl-workstation0.dhcp.ti.com (psdkl-workstation0.dhcp.ti.com [172.24.234.127]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 60N6u01S1765468; Fri, 23 Jan 2026 00:56:04 -0600 From: Aniket Limaye Date: Fri, 23 Jan 2026 12:25:45 +0530 Subject: [PATCH v4 1/2] dt-bindings: interrupt-controller: ti,sci-intr: Per-line interrupt-types Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260123-ul-driver-i2c-j722s-v4-1-b08625c487d5@ti.com> References: <20260123-ul-driver-i2c-j722s-v4-0-b08625c487d5@ti.com> In-Reply-To: <20260123-ul-driver-i2c-j722s-v4-0-b08625c487d5@ti.com> To: Vignesh Raghavendra , , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , Aniket Limaye X-Mailer: b4 0.14.3 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C4:EE_|MN0PR10MB6008:EE_ X-MS-Office365-Filtering-Correlation-Id: beb4d8e9-c521-4b55-325d-08de5a4c7d5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Tk9Kcm1qSTJWVkNhMW5uOVM1YlBVMGdSN3grMElkN05wOThVc25Gc2tPVjJx?= =?utf-8?B?d3dYUFhTZXQ3Z25CeFlPYllyTG04QTliMXJFUlJKMHo3WGlhY3BiZ1dZZ0NR?= =?utf-8?B?akI4cm1TbllKKyt5alJEUXVxcy9aWFMvZS9TU0hVa2swZjRQTy9UTWNpRFVW?= =?utf-8?B?aHd4cHc5Y1BEekI5Z2FYZWt1M0FSRDFaMGRNNkY0cG5GVnpHNmd0MjhYcWhE?= =?utf-8?B?cTI0YUJPN2tvWTZXUVc3ekxFd0VkaVdwUytzbHAwK3EyTXdrYmhHbHpSNEQw?= =?utf-8?B?Vld3ZXJpOUduMWdCK1FMTElFV2hHLzN0WTZmdStLNGYycXVoQm5aZSszSGJY?= =?utf-8?B?dHN2cTh5aFQ2MmZ0WEROVFRJeVRYSThnMGE0b0RNUmZkMi9RVS9YQUN4L3Bk?= =?utf-8?B?cEMwWkY3aVlOUnV5YTd0bld0ZjdHRmhzOXFGSU1udUZTN2k4dnJFOHRXTmR5?= =?utf-8?B?ZTRBUFJSQVZORG0wbG9wYmRmaWN0eEg3bDF0QWNzdUVjeHlJN05wUGNxSXlZ?= =?utf-8?B?N2FUVjczbEtNZTB1L0Y4by9ycWpiMmI2a2RxTmt4QWg3eTFuMGc3a2x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SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2026 06:56:09.9044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: beb4d8e9-c521-4b55-325d-08de5a4c7d5b X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000026C4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR10MB6008 Update the bindings to allow setting per-line interrupt-types. Some Interrupt Router instances can only work with a specific trigger type (edge or level), while others act as simple passthroughs that preserve the source interrupt type unchanged. Make "ti,intr-trigger-type" property optional, with its absence indicating that the router acts as a passthrough. When absent, "#interrupt-cells" must be 2 to allow each interrupt source to specify its trigger type per-line. Signed-off-by: Aniket Limaye Reviewed-by: Rob Herring (Arm) --- Changes in v4: - Don't repeat property descriptions at multiple places - Use generic name for DT example node and remove the label - Collected R-b - Link to v3: https://lore.kernel.org/r/20260122-ul-driver-i2c-j722s-v3-1-4= ec3478f3866@ti.com Changes in v3: - Avoid new redundant value IRQ_TYPE_DEFAULT for "ti,intr-trigger-type" when "#interrupt-cells"=3D=3D2. Instead, make this property optional and check for its absence to use the per-line interrupt-type setting. - Link to v2: https://lore.kernel.org/r/20260120-ul-driver-i2c-j722s-v2-1-832097c6b64f@ti= .com Changes in v2: - Reword Commit msg to better describe the patch - Link to v1: https://lore.kernel.org/r/20260116-ul-driver-i2c-j722s-v1-1-c28e8ba38a9e@ti= .com --- .../bindings/interrupt-controller/ti,sci-intr.yaml | 38 ++++++++++++++++++= +--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/ti,sci-= intr.yaml b/Documentation/devicetree/bindings/interrupt-controller/ti,sci-i= ntr.yaml index c99cc7323c71..de45f0c4b1d1 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.ya= ml +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.ya= ml @@ -15,8 +15,7 @@ allOf: description: | The Interrupt Router (INTR) module provides a mechanism to mux M interrupt inputs to N interrupt outputs, where all M inputs are selectab= le - to be driven per N output. An Interrupt Router can either handle edge - triggered or level triggered interrupts and that is fixed in hardware. + to be driven per N output. =20 Interrupt Router +----------------------+ @@ -64,9 +63,14 @@ properties: interrupt-controller: true =20 '#interrupt-cells': - const: 1 + enum: [1, 2] description: | - The 1st cell should contain interrupt router input hw number. + Number of cells in interrupt specifier. Depends on ti,intr-trigger-t= ype: + - If ti,intr-trigger-type is present: must be 1 + The 1st cell should contain interrupt router input hw number. + - If ti,intr-trigger-type is absent: must be 2 + The 1st cell should contain interrupt router input hw number. + The 2nd cell should contain interrupt trigger type (preserved by r= outer). =20 ti,interrupt-ranges: $ref: /schemas/types.yaml#/definitions/uint32-matrix @@ -82,9 +86,22 @@ properties: - description: | "limit" specifies the limit for translation =20 +if: + required: + - ti,intr-trigger-type +then: + properties: + '#interrupt-cells': + const: 1 + description: Interrupt ID only. Interrupt type is specified globally +else: + properties: + '#interrupt-cells': + const: 2 + description: Interrupt ID and corresponding interrupt type + required: - compatible - - ti,intr-trigger-type - interrupt-controller - '#interrupt-cells' - ti,sci @@ -105,3 +122,14 @@ examples: ti,sci-dev-id =3D <131>; ti,interrupt-ranges =3D <0 360 32>; }; + + - | + interrupt-controller { + compatible =3D "ti,sci-intr"; + interrupt-controller; + interrupt-parent =3D <&gic500>; + #interrupt-cells =3D <2>; + ti,sci =3D <&dmsc>; + ti,sci-dev-id =3D <131>; + ti,interrupt-ranges =3D <0 360 32>; + }; --=20 2.52.0 From nobody Sun Feb 8 23:13:23 2026 Received: from SN4PR0501CU005.outbound.protection.outlook.com (mail-southcentralusazon11011008.outbound.protection.outlook.com [40.93.194.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4456D333729; Fri, 23 Jan 2026 06:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.194.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769151393; cv=fail; b=t0/3DZvTChoSX+/zyvy3pmhJaXcyh9Gm95FSvptL1N1/EJgxYOrQj+pYYSyYeTAtdVkVltrX7YK9/Gjdf58wwJ/3AS0YDYd0WkHrPbtcw5BTt6bBVqehqgE6oLyJv1rJG4EHD4RCVsR9g+6b9sobIQwnljIIk35Wzsdimtpfyok= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769151393; c=relaxed/simple; bh=geoModA8WrR+gZD8T4GkzGa89s2zlEevJFB4EBsEjtY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=jm/dtYAWDYEMIny7ecP6mi5bE0fTYf6F+13H55HGnb1h9414ZhK2UBisbefC6qd6C095Zacj1K+pxoqnO0xHNiYbAqGXI/YYt/4koC1cZkdFv8v0WlCtmS3MXuBvhED8dblV8tePA47fmsKEauTbLe+mUEhQsmo3CNg69JDUsos= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=mNRlLfiI; arc=fail smtp.client-ip=40.93.194.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="mNRlLfiI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rdj6kBQzWD7AxJw28TiMmTJbXyWkrdmJd8fWTW5xBlAMhMvLwRLtu2SROkTAPLgvNxc0X+vuAYn2Z9uSClkEQvMQHj51r9XL+gfiZ73atGQN6ZfQ04SPnCXa+D9VOG+Y3Sp11W8U9C0nEvXaR+Wf2BJ/9baypgDEsv3WJA0GjxgMYWb6dJk/f1TKP2h948MW43rhipd8g2bBTV57/ILbq0eBkXZucZXqADYcrs2tdcZuA3UqQevTrBi8S9kSynaAUxUpwCbglWYTIChfUPkUwnUQiAqBll9jOgF7lJjAvdX+15BVFVJqxcXWaasb7YVn/E1D9UJSifh273NzpzOwAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5yBuxPGDCpEphM/KZt/cMvZHfJnkc1tQPoLWsiBEtpw=; b=EuCc0iPk3lx+PKRbRetCaRNg+OQVA6QqKX5zyPy3Yu82qaLu/4FT6uts5W/sKhzTR8b3fUwBXPM71I9eAA01T8Cokg5z2tc4RAPak0XZWSRYw9BwtsOrYRPPE0ksRwYMI7q2fLiozOY9h+YY0oM6yK4Tng4hD8+HKYa6B05PQYpDGIoqo6ghaadJYFfjP2DVsTZNmgIa4wO0xno7vzO+rzMSPcYgFcEOCIAvMy8uXnQ4QX9aVDp8WLdrcJgMFPHtcytarjE/YX74zsrQm84hijjuDNu+vO7MKGwNOtEwvYx9/J6CBj+sghnXHeEJwh2jAw7P7hsvPI2O9Zw/BrbJXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5yBuxPGDCpEphM/KZt/cMvZHfJnkc1tQPoLWsiBEtpw=; b=mNRlLfiI4QhG+lk8eKvO8RzQ8J6aT+e306SKNmTq63u8TjAyG1STfSKcvv/+Kh+LpSGnuyjt4YMNkX88Ir5Bryv++J2rGLgyr7IjDXdNaqj1+gR/D/ILSQCQUJoS0aI/FtL41LoI/jdfl5m1FtqmX0qj0xc33uEBDl2Ez4xZpfk= Received: from PH8PR02CA0025.namprd02.prod.outlook.com (2603:10b6:510:2da::15) by LV3PR10MB8132.namprd10.prod.outlook.com (2603:10b6:408:291::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9542.12; Fri, 23 Jan 2026 06:56:30 +0000 Received: from SJ1PEPF000023D7.namprd21.prod.outlook.com (2603:10b6:510:2da:cafe::bd) by PH8PR02CA0025.outlook.office365.com (2603:10b6:510:2da::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9542.11 via Frontend Transport; Fri, 23 Jan 2026 06:56:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by SJ1PEPF000023D7.mail.protection.outlook.com (10.167.244.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.0 via Frontend Transport; Fri, 23 Jan 2026 06:56:28 +0000 Received: from DFLE211.ent.ti.com (10.64.6.69) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 23 Jan 2026 00:56:12 -0600 Received: from DFLE203.ent.ti.com (10.64.6.61) by DFLE211.ent.ti.com (10.64.6.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 23 Jan 2026 00:56:12 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE203.ent.ti.com (10.64.6.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Fri, 23 Jan 2026 00:56:12 -0600 Received: from psdkl-workstation0.dhcp.ti.com (psdkl-workstation0.dhcp.ti.com [172.24.234.127]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 60N6u01T1765468; Fri, 23 Jan 2026 00:56:08 -0600 From: Aniket Limaye Date: Fri, 23 Jan 2026 12:25:46 +0530 Subject: [PATCH v4 2/2] irqchip/ti-sci-intr: Allow parsing interrupt-types per-line Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260123-ul-driver-i2c-j722s-v4-2-b08625c487d5@ti.com> References: <20260123-ul-driver-i2c-j722s-v4-0-b08625c487d5@ti.com> In-Reply-To: <20260123-ul-driver-i2c-j722s-v4-0-b08625c487d5@ti.com> To: Vignesh Raghavendra , , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , Aniket Limaye X-Mailer: b4 0.14.3 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000023D7:EE_|LV3PR10MB8132:EE_ X-MS-Office365-Filtering-Correlation-Id: acb3a228-2978-4e67-bdcd-08de5a4c88ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZmdVQ3ZCLzJ6L01TcU9EZVpHdjhhZG10dnc2QnZRZ0xIRkFBc1ltNE5TMy9o?= =?utf-8?B?OU42bnZGd2VNUzBrTXFvZCtPUWZsb3RrY0VYS3JkbHBnY1B3VFFkcm90R1RT?= =?utf-8?B?cWtFWmNLN1pNQzF2R2UzdDV0RXhaQTRiU1JnYzFEa1JJVFVRSUxHeFEwcURv?= =?utf-8?B?dkRyNzZuUzQ0OTZTSXpQSzQ3TnVTbi8rbksvSC9UNkFWZm5pMHlTbTQyeFQ1?= =?utf-8?B?Q0QrNUpndEs4ZVQ1eTJ1czNXZVA4RVBXRHpKLzJpSUNDS3hmWk1raGtVbXlG?= =?utf-8?B?VWRCcmtuM2FtOTBwNFA2ZThVaVppSXg0THUxOHFRR2RsWGlhVWNNNTVmclZ3?= =?utf-8?B?eGRpbTlxM1BFMFVBTU1qVGExcm8wSDc4OTl0TmxWWG5JNDFSWUZlZlNaVzNK?= =?utf-8?B?T0dXYUNJNExScmIxaUtWN2VoakVOYXZpUXgydXNtdUVINi9ES2RBTGNISmNC?= =?utf-8?B?NUtjRjc2dVdLbFEyVm80SEtsS3dFYUlpMXA0YjdtRERhQ2l4RjFnYkFaUWdH?= =?utf-8?B?UXo4ai9ucUw4ME5GR0FOWnJkR1o0UFFSSHNxTjYwSkJtSGZJNnZOcX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(13230040)(82310400026)(1800799024)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2026 06:56:28.8916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acb3a228-2978-4e67-bdcd-08de5a4c88ad X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000023D7.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB8132 Some INTR router instances act as simple passthroughs that preserve the source interrupt type unchanged at the output line, rather than converting all interrupts to a fixed type. When interrupt sources are not homogeneous with respect to trigger type, the driver needs to read each source's interrupt type from DT and pass it unchanged to its interrupt parent. Add support to check for absence of "ti,intr-trigger-type" to indicate passthrough mode. When this property is absent, parse interrupt type per-line from the DT fwspec provided by the interrupt source. Else, use the global setting for all interrupt lines. Signed-off-by: Aniket Limaye --- Changes in v3: - Avoid new redundant value IRQ_TYPE_DEFAULT for "ti,intr-trigger-type" when "#interrupt-cells"=3D=3D2. Instead, make this property optional and check for its absence to use the per-line interrupt-type setting. - Link to v2: https://lore.kernel.org/r/20260120-ul-driver-i2c-j722s-v2-2-832097c6b64f@ti= .com Changes in v2: - Use correct Patch Subject prefix - Reword Commit msg to better describe the patch - Fix function argument alignment as per coding style - Fix variable declaration ordering as per coding style - Link to v1: https://lore.kernel.org/r/20260116-ul-driver-i2c-j722s-v1-2-c28e8ba38a9e@ti= .com --- drivers/irqchip/irq-ti-sci-intr.c | 49 ++++++++++++++++++++++++++++-------= ---- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci= -intr.c index 354613e74ad0..0c6065e66e6a 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -61,11 +61,22 @@ static int ti_sci_intr_irq_domain_translate(struct irq_= domain *domain, { struct ti_sci_intr_irq_domain *intr =3D domain->host_data; =20 - if (fwspec->param_count !=3D 1) - return -EINVAL; =20 - *hwirq =3D fwspec->param[0]; - *type =3D intr->type; + if (intr->type) { + /* Global interrupt-type */ + if (fwspec->param_count !=3D 1) + return -EINVAL; + + *hwirq =3D fwspec->param[0]; + *type =3D intr->type; + } else { + /* Per-Line interrupt-type */ + if (fwspec->param_count !=3D 2) + return -EINVAL; + + *hwirq =3D fwspec->param[0]; + *type =3D fwspec->param[1]; + } =20 return 0; } @@ -128,11 +139,12 @@ static void ti_sci_intr_irq_domain_free(struct irq_do= main *domain, * @domain: Pointer to the interrupt router IRQ domain * @virq: Corresponding Linux virtual IRQ number * @hwirq: Corresponding hwirq for the IRQ within this IRQ domain + * @hwirq_type: Corresponding hwirq trigger type for the IRQ within this I= RQ domain * * Returns intr output irq if all went well else appropriate error pointer. */ static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain, - unsigned int virq, u32 hwirq) + unsigned int virq, u32 hwirq, u32 hwirq_type) { struct ti_sci_intr_irq_domain *intr =3D domain->host_data; struct device_node *parent_node; @@ -156,11 +168,23 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_do= main *domain, fwspec.param_count =3D 3; fwspec.param[0] =3D 0; /* SPI */ fwspec.param[1] =3D p_hwirq - 32; /* SPI offset */ - fwspec.param[2] =3D intr->type; + fwspec.param[2] =3D hwirq_type; } else { /* Parent is Interrupt Router */ - fwspec.param_count =3D 1; - fwspec.param[0] =3D p_hwirq; + u32 parent_trigger_type; + + if (!of_property_read_u32(parent_node, + "ti,intr-trigger-type", + &parent_trigger_type)) { + /* Parent has global trigger type */ + fwspec.param_count =3D 1; + fwspec.param[0] =3D p_hwirq; + } else { + /* Parent supports per-line trigger types */ + fwspec.param_count =3D 2; + fwspec.param[0] =3D p_hwirq; + fwspec.param[1] =3D hwirq_type; + } } =20 err =3D irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec); @@ -196,15 +220,15 @@ static int ti_sci_intr_irq_domain_alloc(struct irq_do= main *domain, void *data) { struct irq_fwspec *fwspec =3D data; + unsigned int hwirq_type; unsigned long hwirq; - unsigned int flags; int err, out_irq; =20 - err =3D ti_sci_intr_irq_domain_translate(domain, fwspec, &hwirq, &flags); + err =3D ti_sci_intr_irq_domain_translate(domain, fwspec, &hwirq, &hwirq_t= ype); if (err) return err; =20 - out_irq =3D ti_sci_intr_alloc_parent_irq(domain, virq, hwirq); + out_irq =3D ti_sci_intr_alloc_parent_irq(domain, virq, hwirq, hwirq_type); if (out_irq < 0) return out_irq; =20 @@ -250,8 +274,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform= _device *pdev) ret =3D of_property_read_u32(dev_of_node(dev), "ti,intr-trigger-type", &intr->type); if (ret) { - dev_err(dev, "missing ti,intr-trigger-type property\n"); - return -EINVAL; + intr->type =3D IRQ_TYPE_NONE; } =20 intr->sci =3D devm_ti_sci_get_by_phandle(dev, "ti,sci"); --=20 2.52.0