Message ID | 20231120063159.539306-1-s-vadapalli@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2011766vqn; Sun, 19 Nov 2023 22:32:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmqdTuMfofT4LTrhsDf3W1FaVFe977YvgIzRcFQ4qprN0RLMYlvHUkQLakfqmIpJVWeB0R X-Received: by 2002:a05:6870:9607:b0:1f5:cfeb:8ad2 with SMTP id d7-20020a056870960700b001f5cfeb8ad2mr5209349oaq.50.1700461947087; Sun, 19 Nov 2023 22:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700461947; cv=none; d=google.com; s=arc-20160816; b=mMNhztQr++z5XhiFayFrllqOZCjHvOAjYTySB/PF9h0rSTu127FwJVlTLrVaEKDEwB cFBn5NJHmKBxRl+OFyK29HCrqKNexndQIwSFVEfU2odlrWoL4sQ+LXHq1v2gXay0Yauq nzJ6QtAYlFrfHdgKL1rnMR0wQFFT8DhK/YSNqA7lrjJnaDo9IWiw1DEEadOX3lDqq0lB D5AapTrxvsFWF2gZ34yavofM/v+uZFeXOCMdDxp1TG9spf4laKn7mKSpeSyGU8Px8X2f hTX54RsbKF6nDqagwlE3nYRIJTn2554Y44IBoomWAh9zSAX3BVOnJ+Gb0ZCAxvEKc6gY 9ZnQ== 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=yQ3hU54tqGWh+bOEfiNvlZ+MBk2NolkvtMHhi6QCw2g=; fh=8zTfjgTag9Xv32xZq9k5V8cSuvbvzlDqi8km3U7s+R0=; b=HPsozELvCNdGo4wqfdLD3+nJ07tF5NzA6TZCjanTK7Z9jBfTyWDW/j7K6H1e0ZHsp0 tymJEILlXz1oQX/X8VFAiUmVsheF4YpOnLrKJ1IOW3hvo/3Doh1n48i/20byGnkv7wkp 3bnESZLwic06SNVBjOhrv8+1ZVF3J+8wGQbxATMBkhgLgVbn8oOejuMI1fhrnUBuS8Dy H5MK0Ps8E/dqZHwQc7fWo5UBx+799rFrDyV408LOwQ/2JBVNxFbIv193iyNYxuiQNAIm Ujk0WouQfN4W+w3fzBKY0ubwib10HcE/m6+DRdynYFyPl9csv/tdjMFroFuPLyvOugNn Qfjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=QghNXANb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e12-20020a65678c000000b00563d9ff5157si7420200pgr.547.2023.11.19.22.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 22:32:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=QghNXANb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 6569C806CC07; Sun, 19 Nov 2023 22:32:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231961AbjKTGc1 (ORCPT <rfc822;heyuhang3455@gmail.com> + 27 others); Mon, 20 Nov 2023 01:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjKTGc0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Nov 2023 01:32:26 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B630D7; Sun, 19 Nov 2023 22:32:22 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AK6W4Qj073731; Mon, 20 Nov 2023 00:32:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700461924; bh=yQ3hU54tqGWh+bOEfiNvlZ+MBk2NolkvtMHhi6QCw2g=; h=From:To:CC:Subject:Date; b=QghNXANbExbi2s6AZ73aUMIOX6rle8qDutPvS8YIhESHuvpmxirQvDzQGTcDEb9sz QVxFQ0gD5rmQ3Pc2yXgl+MUNtvYw92gIzQBKU9GKY7NUw9gqi69BS04meMxKwhwHYh xdIekGJZ6gkpBpur+eF/tb1nIDeUcYFBgaBtnCVE= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AK6W3m2080586 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 20 Nov 2023 00:32:04 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 20 Nov 2023 00:32:03 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE104.ent.ti.com (157.170.170.34) 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; Mon, 20 Nov 2023 00:32:03 -0600 Received: from uda0492258.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AK6VxGU074809; Mon, 20 Nov 2023 00:32:00 -0600 From: Siddharth Vadapalli <s-vadapalli@ti.com> To: <nm@ti.com>, <vigneshr@ti.com>, <kristo@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org> CC: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <danishanwar@ti.com>, <r-gunasekaran@ti.com>, <srk@ti.com>, <s-vadapalli@ti.com> Subject: [PATCH] arm64: dts: ti: k3-am654-icssg2: Enable PHY interrupts for ICSSG2 Date: Mon, 20 Nov 2023 12:01:59 +0530 Message-ID: <20231120063159.539306-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=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 19 Nov 2023 22:32:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783063586588246776 X-GMAIL-MSGID: 1783063586588246776 |
Series |
arm64: dts: ti: k3-am654-icssg2: Enable PHY interrupts for ICSSG2
|
|
Commit Message
Siddharth Vadapalli
Nov. 20, 2023, 6:31 a.m. UTC
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.
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
This patch is based on linux-next tagged next-20231120.
Regards,
Siddharth.
arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
Comments
On 20/11/23 12:01 pm, Siddharth Vadapalli wrote: > 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. > > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: MD Danish Anwar <danishanwar@ti.com> > --- > > This patch is based on linux-next tagged next-20231120. > > Regards, > Siddharth. > > arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > index ec8cf20ca3ac..9f723592d0f4 100644 > --- a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > +++ b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > @@ -124,21 +124,34 @@ 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"; > - pinctrl-0 = <&icssg2_mdio_pins_default>; > + pinctrl-names = "default", "icssg2-phy-irq"; > + pinctrl-0 = <&icssg2_mdio_pins_default>, <&icssg2_phy_irq_pins_default>; > #address-cells = <1>; > #size-cells = <0>; > > icssg2_phy0: ethernet-phy@0 { > reg = <0>; > + interrupt-parent = <&main_gpio1>; > + interrupts = <87 0x2>; > ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; > ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; > }; > > icssg2_phy1: ethernet-phy@3 { > reg = <3>; > + interrupt-parent = <&main_gpio1>; > + interrupts = <87 0x2>; > ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; > ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; > };
On 12:01-20231120, Siddharth Vadapalli wrote: > 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. > > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > --- > > This patch is based on linux-next tagged next-20231120. > > Regards, > Siddharth. > > arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > index ec8cf20ca3ac..9f723592d0f4 100644 > --- a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > +++ b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso > @@ -124,21 +124,34 @@ 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"; > - pinctrl-0 = <&icssg2_mdio_pins_default>; > + pinctrl-names = "default", "icssg2-phy-irq"; > + pinctrl-0 = <&icssg2_mdio_pins_default>, <&icssg2_phy_irq_pins_default>; why should the pins be part of mdio pinctrl instead of phy? > #address-cells = <1>; > #size-cells = <0>; > > icssg2_phy0: ethernet-phy@0 { > reg = <0>; > + interrupt-parent = <&main_gpio1>; > + interrupts = <87 0x2>; > ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; > ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; > }; > > icssg2_phy1: ethernet-phy@3 { > reg = <3>; > + interrupt-parent = <&main_gpio1>; > + interrupts = <87 0x2>; Shouldn't you be using macros for interrupt level like IRQ_TYPE_EDGE_FALLING? > ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; > ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; > }; > -- > 2.34.1 >
Hello Nishanth, Thank you for reviewing the patch. I have addressed your feedback in the v2 patch at: https://lore.kernel.org/r/20231213080216.1710730-1-s-vadapalli@ti.com/ On 04/12/23 18:51, Nishanth Menon wrote: > On 12:01-20231120, Siddharth Vadapalli wrote: >> 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. >> >> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> >> --- >> >> This patch is based on linux-next tagged next-20231120. >> >> Regards, >> Siddharth. >> >> arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso | 17 +++++++++++++++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso >> index ec8cf20ca3ac..9f723592d0f4 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso >> +++ b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso >> @@ -124,21 +124,34 @@ 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"; >> - pinctrl-0 = <&icssg2_mdio_pins_default>; >> + pinctrl-names = "default", "icssg2-phy-irq"; >> + pinctrl-0 = <&icssg2_mdio_pins_default>, <&icssg2_phy_irq_pins_default>; > > why should the pins be part of mdio pinctrl instead of phy? > >> #address-cells = <1>; >> #size-cells = <0>; >> >> icssg2_phy0: ethernet-phy@0 { >> reg = <0>; >> + interrupt-parent = <&main_gpio1>; >> + interrupts = <87 0x2>; >> ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; >> ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; >> }; >> >> icssg2_phy1: ethernet-phy@3 { >> reg = <3>; >> + interrupt-parent = <&main_gpio1>; >> + interrupts = <87 0x2>; > > Shouldn't you be using macros for interrupt level like IRQ_TYPE_EDGE_FALLING? > >> ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; >> ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; >> }; >> -- >> 2.34.1 >> >
diff --git a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso index ec8cf20ca3ac..9f723592d0f4 100644 --- a/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso +++ b/arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso @@ -124,21 +124,34 @@ 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"; - pinctrl-0 = <&icssg2_mdio_pins_default>; + pinctrl-names = "default", "icssg2-phy-irq"; + pinctrl-0 = <&icssg2_mdio_pins_default>, <&icssg2_phy_irq_pins_default>; #address-cells = <1>; #size-cells = <0>; icssg2_phy0: ethernet-phy@0 { reg = <0>; + interrupt-parent = <&main_gpio1>; + interrupts = <87 0x2>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; }; icssg2_phy1: ethernet-phy@3 { reg = <3>; + interrupt-parent = <&main_gpio1>; + interrupts = <87 0x2>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; };