From: Roger Quadros <rogerq@kernel.org>
To: Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
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
Subject: Re: [PATCH] arm: dts: ti: beagleplay: Fix Ethernet PHY RESET GPIOs
Date: Tue, 5 Mar 2024 10:43:07 +0200 [thread overview]
Message-ID: <a4188e72-533c-4e1e-9733-e0e8afc03526@kernel.org> (raw)
In-Reply-To: <392def9d-5e02-4ca6-8838-c4252ccd4c54@ti.com>
On 04/03/2024 06:24, Vignesh Raghavendra wrote:
> Hi Roger,
>
> On 02/03/24 02:59, Roger Quadros wrote:
>>
>>
>> On 01/03/2024 22:58, Roger Quadros wrote:
>>>
>>>
>>> On 29/02/2024 18:25, 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.
>>>>
>>>> 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.
>>>>
>>>> Signed-off-by: Roger Quadros <rogerq@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..77240cf3ae4d 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 */
>>>
>>> This should be PIN_OUTPUT.
>>> Will fix in next spin.
>>
>> Actually PIN_INPUT is correct else we won't be able to read the correct GPIO pin status
>> on gpio read.
>> I observe this issue on u-boot at least.
>>
>>>
>>>> + AM62X_IOPAD(0x018c, PIN_OUTPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */
>>
>> This one needs to be fixed to PIN_INPUT.
>
> While at it, please fix the $subject prefix:
>
> arm64: dts: ti: beagleplay: ...
Right.
>
> Do we need a Fixes: Tag too?
Sure, I'll add.
>
>>
>>>> >;
>>>> };
>>>>
>>>> @@ -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
prev parent reply other threads:[~2024-03-05 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 16:25 Roger Quadros
2024-03-01 20:58 ` Roger Quadros
2024-03-01 21:29 ` Roger Quadros
2024-03-04 4:24 ` Vignesh Raghavendra
2024-03-05 8:43 ` Roger Quadros [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4188e72-533c-4e1e-9733-e0e8afc03526@kernel.org \
--to=rogerq@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kristo@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=r-gunasekaran@ti.com \
--cc=robh+dt@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®