Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5161665rdb; Wed, 13 Dec 2023 00:02:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTCCCSR3tcOEeRbJUMMq0vrVDI69c/g/U2zAdADRQA5brh3Fd5f86Cv5FMw0AE8Ese6R6N X-Received: by 2002:a17:90b:100d:b0:28a:e1f2:2459 with SMTP id gm13-20020a17090b100d00b0028ae1f22459mr897026pjb.36.1702454575214; Wed, 13 Dec 2023 00:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702454575; cv=none; d=google.com; s=arc-20160816; b=CU41jypQuoNi4jr/NxdSqkbUAVEkYeimpQzMv5kXT10/56A2v8E68tPfHRrd0DETKc 6OF7iyI34GbkbTP5KU83/aLEo4yE6510YC94riRYQp+bwbCsnGIrvecdpSEQjPjgpYPu GYf9kLFFCITg8TVgKCqjWCupQ6MmSDIEtbzLAszbDFn0hJMftkabEaV0SWG17KhnmAKv /CwUufYVogOkkRL8JcP7v7OL3dXplftRg2dKZDu87S0v0g7AowznoLbkHDz0/QBZFeM9 43N41XTHRkFAO0BTATcy8f/lQ3z7zMFDlz9fhD2qNUm5D5lLZVMWmmAtENfCRv90Wnkx 1U/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MBKsgsuYGX4k9jFCM4rlwljZIghlRoJN70MfqBeb5vE=; fh=8zTfjgTag9Xv32xZq9k5V8cSuvbvzlDqi8km3U7s+R0=; b=pm7r6LLHYYPlnyTc4a2nA7Q39+olEyGBVFGFbveb70SnuiLPdoaEVfWOxjg41fe1ID iffkxT3RZQwci1R69XL0td5rT/+Pzus0EOpjwdqRzMWY6a1iosPaapYM63JIT/5RQugc XJQiB2IIE5mxB584dtjZj840BPUSEPtfB6wcgNeYDIprG1LS3tj+BWhrTlv7Qv4GOvAY cueWdD4nK6t5fhg73LgC5gRfbum/+Zbw6PUIBQmqYjOvxprdoddJsJYhMMsCzOZYL2RS yJcghZEuC0ahA/KmnasoGCmCx2PBRawmmjEhlqrPqstn/FvR8GavZ0DyZ/MlSzx3ZX/2 oyDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YUK5ZNUq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y2-20020a17090a86c200b0028675cb4aeasi10373523pjv.47.2023.12.13.00.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 00:02:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YUK5ZNUq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 30B6380874C3; Wed, 13 Dec 2023 00:02:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378715AbjLMIC3 (ORCPT + 99 others); Wed, 13 Dec 2023 03:02:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232673AbjLMIC3 (ORCPT ); Wed, 13 Dec 2023 03:02:29 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DA2CD0; Wed, 13 Dec 2023 00:02:35 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3BD82M9m002149; Wed, 13 Dec 2023 02:02:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1702454542; bh=MBKsgsuYGX4k9jFCM4rlwljZIghlRoJN70MfqBeb5vE=; h=From:To:CC:Subject:Date; b=YUK5ZNUqD6b2dti6512xGmw2HQ7IJkClY5Wpyzd6r6lQOaooZYgLPkoh7wEfrHFca 50RiyyjvAfQWnpbBrpF0leDLnRLpPfzfym7a/Y1Auhyf8Q7ZltCNNFpVjI1oUilbnO Ob7bVL6A1/dulOtTp/8ms1hHKnAKelGWWiB4G90A= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3BD82MmU126291 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Dec 2023 02:02:22 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 13 Dec 2023 02:02:21 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 13 Dec 2023 02:02:21 -0600 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3BD82HU8024879; Wed, 13 Dec 2023 02:02:18 -0600 From: Siddharth Vadapalli To: , , , , , CC: , , , , , , Subject: [PATCH v2] arm64: dts: ti: k3-am654-icssg2: Enable PHY interrupts for ICSSG2 Date: Wed, 13 Dec 2023 13:32:16 +0530 Message-ID: <20231213080216.1710730-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Dec 2023 00:02:52 -0800 (PST) Enable interrupt mode of operation of the DP83867 Ethernet PHY which is used by ICSSG2. The DP83867 PHY driver already supports interrupt handling for interrupts generated by the PHY. Thus, add the necessary device-tree support to enable it. Since the GPIO1_87 line is muxed with EXT_REFCLK1 and SYNC1_OUT, update the pinmux to select GPIO1_87 for routing the interrupt. As the same interrupt line and therefore the same pinmux configuration is applicable to both Ethernet PHYs used by ICSSG2, allocate the pinmux resource to the first Ethernet PHY alone. Signed-off-by: Siddharth Vadapalli Reviewed-by: MD Danish Anwar --- Hello, This patch is based on linux-next tagged next-20231213. v1: https://lore.kernel.org/r/20231120063159.539306-1-s-vadapalli@ti.com/ Changes since v1: - Rebased patch on next-20231213. - Collected Reviewed-by tag from MD Danish Anwar - Moved pinctrl from MDIO node to Ethernet PHY node based on feedback from Nishanth Menon - Replaced the hard-coded value 0x2 with IRQ_TYPE_EDGE_FALLING for setting the interrupt trigger type and level flag based on feedback from Nishanth Menon - Included dt-bindings/interrupt-controller/irq.h in the overlay. - Updated commit message with details of the pinmux resource allocation. Regards, Siddharth. arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso index ec8cf20ca3ac..6eabdfa0d602 100644 --- a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso +++ b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso @@ -8,6 +8,7 @@ /dts-v1/; /plugin/; +#include #include #include "k3-pinctrl.h" @@ -124,6 +125,15 @@ AM65X_IOPAD(0x0088, PIN_INPUT, 2) /* (AG17) PRG2_PRU0_GPO4.PRG2_RGMII1_RX_CTL */ }; }; +&main_pmx1 { + /* Select GPIO1_87 for ICSSG2 PHY interrupt */ + icssg2_phy_irq_pins_default: icssg2-phy-irq-default-pins { + pinctrl-single,pins = < + AM65X_IOPAD(0x0014, PIN_INPUT, 7) /* (A22) EXT_REFCLK1.GPIO1_87 */ + >; + }; +}; + &icssg2_mdio { status = "okay"; pinctrl-names = "default"; @@ -132,13 +142,20 @@ &icssg2_mdio { #size-cells = <0>; icssg2_phy0: ethernet-phy@0 { + pinctrl-names = "default"; + pinctrl-0 = <&icssg2_phy_irq_pins_default>; + reg = <0>; + interrupt-parent = <&main_gpio1>; + interrupts = <87 IRQ_TYPE_EDGE_FALLING>; ti,rx-internal-delay = ; ti,fifo-depth = ; }; icssg2_phy1: ethernet-phy@3 { reg = <3>; + interrupt-parent = <&main_gpio1>; + interrupts = <87 IRQ_TYPE_EDGE_FALLING>; ti,rx-internal-delay = ; ti,fifo-depth = ; }; -- 2.34.1