From mboxrd@z Thu Jan 1 00:00:00 1970 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 9D826C4345F for ; Fri, 12 Apr 2024 11:26:42 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aRgvsgIBGAoQ5OgcgMko/Ebc69z5r088t3JNYZgrAaQ=; b=Ptj2cd5Iz4dzYB u3jKrNwhdncGOmdrrkbyqJYbtSw08LY6g2ibz+BALUaNooR/Oy2HSKmAjJFTG2QeyFIedJQvLN6Fv IzLZQH9XaE1fB4IAK8mo49E6Jh9XLPQGPmzu025nrSqwOE4S0Y28rvTNSyrH31nG9wvNG6EDW3bSu tECZxfXO8nDs12cgesbiy9EPvGmbROu7NYoltn56MHRwMdAi7FIjuec1ABm4K3wYRcULv+ByuOKA5 pB4DB8AoL9IbdX+DX+O9uyUMwx4CoI2FVDd+B9DbTRmPy0pSk9HucsvDDSQFQnqsVUnJToCphAq89 DZtj23wUBEf/lte49ypQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvF39-0000000GuGY-06aV; Fri, 12 Apr 2024 11:26:31 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvF35-0000000GuFL-3IzG for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 11:26:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 03874CE38AF; Fri, 12 Apr 2024 11:26:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62DE1C2BD11; Fri, 12 Apr 2024 11:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712921185; bh=cf+9acvqV2baUaHRsKZuq4lKdIkB1KKqIBIIHYYkN4s=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CasIk1oU0cpM9fe3xe6ZxDA+6otQcfrT/tj8gnC+V/aq9vwdm46GuOEGkF1YEhvsJ IP4Z12ukzQGc9NZVIVBj9J65hUpCAdfRl+E9OBRrhxxYhTtKUK13DXHET2IVWstp0C iDgyRgfvGL6nXylvANyfaHBf9wm0Z4OUpw+wjTM6oaYYFteTS61WtFlMjrjteDmtWI 33On5pqpw/5Sus0C35haU3MJ+jw6YBNB9JyMvi6hIYRofRQ6eV/fHzmzbngWsOCdsH GVEPa/eqc+y+JrBCzVKn5fnWPfXdaDi6oMRmbqQPCbVqzXQKHEOaQvdwW++0nx4GSx eVniaswAbICHg== Message-ID: Date: Fri, 12 Apr 2024 14:26:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] arm64: dts: ti: beagleplay: Fix Ethernet PHY RESET GPIOs To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: srk@ti.com, s-vadapalli@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240305-b4-for-v6-9-am65-beagleplay-ethernet-reset-v2-1-2bf463a7bf13@kernel.org> Content-Language: en-US From: Roger Quadros In-Reply-To: <20240305-b4-for-v6-9-am65-beagleplay-ethernet-reset-v2-1-2bf463a7bf13@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_042628_281889_ECD996A9 X-CRM114-Status: GOOD ( 19.33 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Vignesh & Nishanth, On 05/03/2024 15:15, Roger Quadros wrote: > The RESET GPIO pinmux should be part of MDIO bus node > so that they can be in the right state before the PHY > can be probed via MDIO bus scan. > > The GPIO pin should be setup with PIN_INPUT so that > input circuitry is enabled in case software wants to > check pin status. Without this, incorrect status is shown > in /sys/kernel/debug/gpio. > > Add GPIO reset for the Gigabit Ethernet PHY. As per > RTL8211F datasheet, reset assert width is 10ms and > PHY registers can be access accessed after 50ms of > reset deassert. > > Fixes: f5a731f0787f ("arm64: dts: ti: Add k3-am625-beagleplay") > Signed-off-by: Roger Quadros Could you please pick this for -next. It should apply cleanly. Thanks! > --- > Changes in v2: > - Fix Subject to "arm64" > - Enable PIN_INPUT for SPE_RESET to fix GPIO status. > - Add Fixes tag. > - Link to v1: https://lore.kernel.org/r/20240229-b4-for-v6-9-am65-beagleplay-ethernet-reset-v1-1-b3e4b33378bd@kernel.org > --- > arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > index a34e0df2ab86..8ab838f1697c 100644 > --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > @@ -292,6 +292,8 @@ mdio0_pins_default: mdio0-default-pins { > pinctrl-single,pins = < > AM62X_IOPAD(0x0160, PIN_OUTPUT, 0) /* (AD24) MDIO0_MDC */ > AM62X_IOPAD(0x015c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ > + AM62X_IOPAD(0x003c, PIN_INPUT, 7) /* (M25) GPMC0_AD0.GPIO0_15 */ > + AM62X_IOPAD(0x018c, PIN_INPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */ > >; > }; > > @@ -383,7 +385,6 @@ AM62X_IOPAD(0x017c, PIN_INPUT, 1) /* (AD22) RGMII2_RX_CTL.RMII2_RX_ER */ > AM62X_IOPAD(0x016c, PIN_INPUT, 1) /* (Y18) RGMII2_TD0.RMII2_TXD0 */ > AM62X_IOPAD(0x0170, PIN_INPUT, 1) /* (AA18) RGMII2_TD1.RMII2_TXD1 */ > AM62X_IOPAD(0x0164, PIN_INPUT, 1) /* (AA19) RGMII2_TX_CTL.RMII2_TX_EN */ > - AM62X_IOPAD(0x018c, PIN_OUTPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */ > AM62X_IOPAD(0x0190, PIN_INPUT, 7) /* (AE22) RGMII2_RD3.GPIO1_6 */ > AM62X_IOPAD(0x01f0, PIN_OUTPUT, 5) /* (A18) EXT_REFCLK1.CLKOUT0 */ > >; > @@ -597,6 +598,9 @@ &cpsw3g_mdio { > > cpsw3g_phy0: ethernet-phy@0 { > reg = <0>; > + reset-gpios = <&main_gpio0 15 GPIO_ACTIVE_LOW>; > + reset-assert-us = <10000>; > + reset-deassert-us = <50000>; > }; > > cpsw3g_phy1: ethernet-phy@1 { > @@ -615,7 +619,7 @@ &main_gpio0 { > "USR0", "USR1", "USR2", "USR3", "", "", "USR4", /* 3-9 */ > "EEPROM_WP", /* 10 */ > "CSI2_CAMERA_GPIO1", "CSI2_CAMERA_GPIO2", /* 11-12 */ > - "CC1352P7_BOOT", "CC1352P7_RSTN", "", "", "", /* 13-17 */ > + "CC1352P7_BOOT", "CC1352P7_RSTN", "GBE_RSTN", "", "", /* 13-17 */ > "USR_BUTTON", "", "", "", "", "", "", "", "", /* 18-26 */ > "", "", "", "", "", "", "", "", "", "HDMI_INT", /* 27-36 */ > "", "VDD_WLAN_EN", "", "", "WL_IRQ", "GBE_INTN",/* 37-42 */ > > --- > base-commit: bbef42084cc170cbfc035bf784f2ff055c939d7e > change-id: 20240229-b4-for-v6-9-am65-beagleplay-ethernet-reset-098f274fbf15 > > Best regards, -- cheers, -roger _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 916FA5478B; Fri, 12 Apr 2024 11:26:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712921185; cv=none; b=GQ4VuOUhzf1vqRtj6VRJ58u9IrO/jnwWGQCBM12CYnhNuJOicEB75NMq0GGckSmEYVO1UXn8C35MckeSs19Cx4MBXs83mTIkRA1bBL/lYKV8eEKNBWAZGxYMzKR+JbXfielq3qJFVPqYHleNSHEb1/sf1Z/ZEFG8Fi7Iruj8XEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712921185; c=relaxed/simple; bh=cf+9acvqV2baUaHRsKZuq4lKdIkB1KKqIBIIHYYkN4s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MyBzDvgdrvqGDYGFJkSMqIIvshFVPVZnrS2gMKPwiJSOtq/978udCF3vQ/QbthDyi1WqXOcU6g3V6TXU6wCi05hTy/D+oFRAMdeeAITC3BiGglgBkPoynMyeS9wLcbt85rzbHzOWHZQUlQb8wRJHrRz0xVIReLpkDRFVoyZnO3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CasIk1oU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CasIk1oU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62DE1C2BD11; Fri, 12 Apr 2024 11:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712921185; bh=cf+9acvqV2baUaHRsKZuq4lKdIkB1KKqIBIIHYYkN4s=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CasIk1oU0cpM9fe3xe6ZxDA+6otQcfrT/tj8gnC+V/aq9vwdm46GuOEGkF1YEhvsJ IP4Z12ukzQGc9NZVIVBj9J65hUpCAdfRl+E9OBRrhxxYhTtKUK13DXHET2IVWstp0C iDgyRgfvGL6nXylvANyfaHBf9wm0Z4OUpw+wjTM6oaYYFteTS61WtFlMjrjteDmtWI 33On5pqpw/5Sus0C35haU3MJ+jw6YBNB9JyMvi6hIYRofRQ6eV/fHzmzbngWsOCdsH GVEPa/eqc+y+JrBCzVKn5fnWPfXdaDi6oMRmbqQPCbVqzXQKHEOaQvdwW++0nx4GSx eVniaswAbICHg== Message-ID: Date: Fri, 12 Apr 2024 14:26:19 +0300 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] arm64: dts: ti: beagleplay: Fix Ethernet PHY RESET GPIOs To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: srk@ti.com, s-vadapalli@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240305-b4-for-v6-9-am65-beagleplay-ethernet-reset-v2-1-2bf463a7bf13@kernel.org> Content-Language: en-US From: Roger Quadros In-Reply-To: <20240305-b4-for-v6-9-am65-beagleplay-ethernet-reset-v2-1-2bf463a7bf13@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Vignesh & Nishanth, On 05/03/2024 15:15, Roger Quadros wrote: > The RESET GPIO pinmux should be part of MDIO bus node > so that they can be in the right state before the PHY > can be probed via MDIO bus scan. > > The GPIO pin should be setup with PIN_INPUT so that > input circuitry is enabled in case software wants to > check pin status. Without this, incorrect status is shown > in /sys/kernel/debug/gpio. > > Add GPIO reset for the Gigabit Ethernet PHY. As per > RTL8211F datasheet, reset assert width is 10ms and > PHY registers can be access accessed after 50ms of > reset deassert. > > Fixes: f5a731f0787f ("arm64: dts: ti: Add k3-am625-beagleplay") > Signed-off-by: Roger Quadros Could you please pick this for -next. It should apply cleanly. Thanks! > --- > Changes in v2: > - Fix Subject to "arm64" > - Enable PIN_INPUT for SPE_RESET to fix GPIO status. > - Add Fixes tag. > - Link to v1: https://lore.kernel.org/r/20240229-b4-for-v6-9-am65-beagleplay-ethernet-reset-v1-1-b3e4b33378bd@kernel.org > --- > arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > index a34e0df2ab86..8ab838f1697c 100644 > --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts > @@ -292,6 +292,8 @@ mdio0_pins_default: mdio0-default-pins { > pinctrl-single,pins = < > AM62X_IOPAD(0x0160, PIN_OUTPUT, 0) /* (AD24) MDIO0_MDC */ > AM62X_IOPAD(0x015c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ > + AM62X_IOPAD(0x003c, PIN_INPUT, 7) /* (M25) GPMC0_AD0.GPIO0_15 */ > + AM62X_IOPAD(0x018c, PIN_INPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */ > >; > }; > > @@ -383,7 +385,6 @@ AM62X_IOPAD(0x017c, PIN_INPUT, 1) /* (AD22) RGMII2_RX_CTL.RMII2_RX_ER */ > AM62X_IOPAD(0x016c, PIN_INPUT, 1) /* (Y18) RGMII2_TD0.RMII2_TXD0 */ > AM62X_IOPAD(0x0170, PIN_INPUT, 1) /* (AA18) RGMII2_TD1.RMII2_TXD1 */ > AM62X_IOPAD(0x0164, PIN_INPUT, 1) /* (AA19) RGMII2_TX_CTL.RMII2_TX_EN */ > - AM62X_IOPAD(0x018c, PIN_OUTPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */ > AM62X_IOPAD(0x0190, PIN_INPUT, 7) /* (AE22) RGMII2_RD3.GPIO1_6 */ > AM62X_IOPAD(0x01f0, PIN_OUTPUT, 5) /* (A18) EXT_REFCLK1.CLKOUT0 */ > >; > @@ -597,6 +598,9 @@ &cpsw3g_mdio { > > cpsw3g_phy0: ethernet-phy@0 { > reg = <0>; > + reset-gpios = <&main_gpio0 15 GPIO_ACTIVE_LOW>; > + reset-assert-us = <10000>; > + reset-deassert-us = <50000>; > }; > > cpsw3g_phy1: ethernet-phy@1 { > @@ -615,7 +619,7 @@ &main_gpio0 { > "USR0", "USR1", "USR2", "USR3", "", "", "USR4", /* 3-9 */ > "EEPROM_WP", /* 10 */ > "CSI2_CAMERA_GPIO1", "CSI2_CAMERA_GPIO2", /* 11-12 */ > - "CC1352P7_BOOT", "CC1352P7_RSTN", "", "", "", /* 13-17 */ > + "CC1352P7_BOOT", "CC1352P7_RSTN", "GBE_RSTN", "", "", /* 13-17 */ > "USR_BUTTON", "", "", "", "", "", "", "", "", /* 18-26 */ > "", "", "", "", "", "", "", "", "", "HDMI_INT", /* 27-36 */ > "", "VDD_WLAN_EN", "", "", "WL_IRQ", "GBE_INTN",/* 37-42 */ > > --- > base-commit: bbef42084cc170cbfc035bf784f2ff055c939d7e > change-id: 20240229-b4-for-v6-9-am65-beagleplay-ethernet-reset-098f274fbf15 > > Best regards, -- cheers, -roger