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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDFA5C43381 for ; Thu, 14 Feb 2019 10:49:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5BF721920 for ; Thu, 14 Feb 2019 10:49:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="aZB62a9A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395344AbfBNKtX (ORCPT ); Thu, 14 Feb 2019 05:49:23 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48286 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391837AbfBNKtX (ORCPT ); Thu, 14 Feb 2019 05:49:23 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x1EAnFIi130058; Thu, 14 Feb 2019 04:49:15 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1550141355; bh=gzrwp0CaU1c+JctpWa7GzAvBHF1Yj9mrW7e7ZjaUnp8=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=aZB62a9AYmP/a8IdXdH8tABKXzCBhlZJtJMklP61OuV8TxHIgIw2TApAkj/Nk5j17 fCDMKyF2p0jGp7zrHV5uQS4AmxPSvuFye9+wj3RA32I7f4OJgykCKAK3ea+Ks/z2aK mK3xJsBgn3yxFpNSURBx/EORRUNRemOwBIkln+d0= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x1EAnFrR104172 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Feb 2019 04:49:15 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 14 Feb 2019 04:49:13 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Thu, 14 Feb 2019 04:49:13 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x1EAnAOU005890; Thu, 14 Feb 2019 04:49:11 -0600 Subject: Re: [PATCH] net: phy: at803x: disable delay only for RGMII mode To: Niklas Cassel , Marc Gonzalez CC: Andrew Lunn , Florian Fainelli , Vinod Koul , David S Miller , , Bjorn Andersson , , "Nori, Sekhar" References: <20190212141922.12849-1-vkoul@kernel.org> <20190213131206.GA460@centauri.lan> <20190213132900.GA24589@lunn.ch> <1ab5edac-a36c-9dc5-52e5-dbd3b70e7728@free.fr> <20190213174034.GA6954@centauri.lan> From: Peter Ujfalusi Message-ID: <3356ff05-8d08-591e-03bf-9d846f79097b@ti.com> Date: Thu, 14 Feb 2019 12:49:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190213174034.GA6954@centauri.lan> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Niklas, On 13/02/2019 19.40, Niklas Cassel wrote: > On Wed, Feb 13, 2019 at 02:40:18PM +0100, Marc Gonzalez wrote: >> On 13/02/2019 14:29, Andrew Lunn wrote: >> >>>> So we have these modes: >>>> >>>> PHY_INTERFACE_MODE_RGMII: TX and RX delays disabled >>>> PHY_INTERFACE_MODE_RGMII_ID: TX and RX delays enabled >>>> PHY_INTERFACE_MODE_RGMII_RXID: RX delay enabled, TX delay disabled >>>> PHY_INTERFACE_MODE_RGMII_TXID: TX delay enabled, RX delay disabled >>>> >>>> What I don't like with this patch, is that if we specify phy-mode >>>> PHY_INTERFACE_MODE_RGMII_TXID, this patch will enable TX delay, >>>> but RX delay will not be explicitly set. >>> >>> That is not the behaviour we want. It is best to assume the device is >>> in a random state, and correctly enable/disable all delays as >>> requested. Only leave the hardware alone if PHY_INTERFACE_MODE_NA is >>> used. >> >> That's what my patch did: >> https://www.spinics.net/lists/netdev/msg445053.html >> >> But see Florian's remarks: >> https://www.spinics.net/lists/netdev/msg445133.html > > Hello Marc, > > I saw that comment from Florian. However that was way back in 2017. > Maybe the phy-modes were not as well defined back then? > > Andrew recently suggested to fix the driver so that it conforms with the > phy-modes, and fix any SoC that specified an incorrect phy-mode in DT > and thus relied upon the broken behavior of the PHY driver: > https://www.spinics.net/lists/netdev/msg445133.html > > > So, I've rebased your old patch, see attachment. > I suggest that Peter test it on am335x-evm. with the patch + s/rgmii-txid/rgmii-id in the am335x-evmsk.dts ethernet is working. I don't have am335x-evm to test, but it has the same PHY as evmsk. > am335x-evm appears to rely on the current broken behavior of the PHY > driver, so we will probably need to fix the am335x-evm according to this: > https://www.spinics.net/lists/netdev/msg445117.html > and merge that as well. > > > Andrew, Florian, do you both agree? > > > Kind regards, > Niklas > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki