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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 526F0C4332F for ; Fri, 1 Apr 2022 12:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346059AbiDAM7n (ORCPT ); Fri, 1 Apr 2022 08:59:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346042AbiDAM7k (ORCPT ); Fri, 1 Apr 2022 08:59:40 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6E4E276817; Fri, 1 Apr 2022 05:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=+kraZp/jdtMCz68q8csAdvc9YGn7/uI9fFuf0zEctLY=; b=dxgpvbBCfZOlIuW3Y5vBbijXBl O9HYqFB96RYjitg3FIi22exIzJki93Wkwww+c3BgzMomCEckxpqrbfP0upLCoH+KLaHBIqBHpVtwK H/wPGapH9u6ggoFeGiYkdGzD85vwJ4oipc4ehwA7YxxhURbbUd8MTES2FPy71jrx0ztc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1naGqY-00Dfl8-JT; Fri, 01 Apr 2022 14:57:46 +0200 Date: Fri, 1 Apr 2022 14:57:46 +0200 From: Andrew Lunn To: Horatiu Vultur Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, Divya.Koppera@microchip.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net v2 0/3] net: phy: micrel: Remove latencies support lan8814 Message-ID: References: <20220401110522.3418258-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220401110522.3418258-1-horatiu.vultur@microchip.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 01, 2022 at 01:05:19PM +0200, Horatiu Vultur wrote: > Remove the latencies support both from the PHY driver and from the DT. > The IP already has some default latencies values which can be used to get > decent results. It has the following values(defined in ns): > rx-1000mbit: 429 > tx-1000mbit: 201 > rx-100mbit: 2346 > tx-100mbit: 705 So one alternative option here is that ptp4l looks at /sys/class/net//phydev/phy_id to identify the PHY, listens to netlink messages to determine the link speed and then applies the correction itself in user space. That gives you a pretty generic solution, works for any existing PHY and pretty much any existing kernel version. And if you want board specific values you can override them in the ptp4l configuration file. Andrew