From patchwork Wed Dec 13 08:02:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13490513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98C46C4332F for ; Wed, 13 Dec 2023 08:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=r+C8Nzz3f9wfQSAihHsXMXkzB/JZCHQ23ulLah+XKHo=; b=u4NUZbrjdsFZ5J QuAghbDlWCZo0QxKSAveIa+8ORONAaYiyLnv610cAyKS9d2mDe3jsVUQuesvR2sKc5HamTNuxrNbd EWBF64u2UsYA6PmNvb5OFmjUzplqQY8ePOoWYa6dKHQaBNyGQ0WwQRs/EAGhdoEPHdNstjfCW4WLl XcoqUZACulIaCji+iMQNDiDPHf89togfudr4CqOMFJnW3RzbvtPbzNgPFLgJpUgFhVyzEtZtUQfTu maPd9LSHXkDaNlxo6roPa4RQtmYFBiJv3I+x0DOTlObppFUQTnrYLZPwwHMa+UoNIMCZg4SV6hoID tHiX4NWc8dRM0tNzIiSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDKCS-00DyQ3-1h; Wed, 13 Dec 2023 08:02:36 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDKCO-00DyPe-1i for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 08:02:34 +0000 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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_000232_759300_4D7E10A0 X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 = ; };