From patchwork Thu Mar 12 12:53:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madalin Bucur \(OSS\)" X-Patchwork-Id: 243593 List-Id: U-Boot discussion From: madalin.bucur at oss.nxp.com (Madalin Bucur) Date: Thu, 12 Mar 2020 14:53:46 +0200 Subject: [PATCH 3/3] armv8/ls1046ardb: RGMII ports require internal delay In-Reply-To: <1584017626-8547-1-git-send-email-madalin.bucur@oss.nxp.com> References: <1584017626-8547-1-git-send-email-madalin.bucur@oss.nxp.com> Message-ID: <1584017626-8547-4-git-send-email-madalin.bucur@oss.nxp.com> The correct setting for the RGMII ports on LS1046ARDB is to enable delay on both Rx and Tx so the interface mode used must be PHY_INTERFACE_MODE_RGMII_ID. There is a pull-up that turns on Rx internal delay by default and the u-boot does not override that (yet) so in u-boot the interface is functional. In Linux the PHY driver is clearing the Rx delay for the "rgmii-txid" mode and the reception does not work. Changing the RGMII mode to internal delay here ensures that device tree fix-ups for the PHY connection type turn on both Tx and Rx internal delay in Linux. Fixes: cc1aa218f510 ("armv8/ls1046a: RGMII PHY requires internal delay on Tx") Signed-off-by: Madalin Bucur --- drivers/net/fm/ls1046.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/fm/ls1046.c b/drivers/net/fm/ls1046.c index 3617ad9..49b540b 100644 --- a/drivers/net/fm/ls1046.c +++ b/drivers/net/fm/ls1046.c @@ -71,12 +71,12 @@ phy_interface_t fman_port_enet_if(enum fm_port port) if (port == FM1_DTSEC3) if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC1) == FSL_CHASSIS2_RCWSR13_EC1_DTSEC3_RGMII) - return PHY_INTERFACE_MODE_RGMII_TXID; + return PHY_INTERFACE_MODE_RGMII_ID; if (port == FM1_DTSEC4) if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC2) == FSL_CHASSIS2_RCWSR13_EC2_DTSEC4_RGMII) - return PHY_INTERFACE_MODE_RGMII_TXID; + return PHY_INTERFACE_MODE_RGMII_ID; /* handle SGMII, only MAC 2/5/6/9/10 available */ switch (port) {