Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1217719pxb; Fri, 1 Apr 2022 07:39:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkZsYa3FgnLQnbm2DoHANRtaKELi8KbXJL2gnMtYxho1nJKjU1qRZvc6xNjkqbs2px0fG6 X-Received: by 2002:a05:6402:4254:b0:419:245b:8051 with SMTP id g20-20020a056402425400b00419245b8051mr21486715edb.295.1648823978500; Fri, 01 Apr 2022 07:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648823978; cv=none; d=google.com; s=arc-20160816; b=AVsLJ3rqw/FUlBemLErnJO+uE90nbNpkeac345DyATre1yWdhuU3fZVISWrgxnOMIR CgnIH38o5S00UFUCLn9E9yMf2V68TX1GVtnGjOrgcQ4WPmHHjxw+U+dKtY3c9MP+Y3MS B6VL1GaBZ2dKiDtGLMfTmh4n0CBSCGdv4j7BduudAdQYDjVS/xqOI2ba4IUXNmB+PK7+ bVogdJ+ysenE8oY12vfcGZdmNi7c0vDJMzEdBi7+yRRMf01E6QxVfflOIk4O3ygIltDq HnFFwcBZtTx6BGcQpcqgdVzvDqdp98Fd0ofi3k4Iy/ilJHOFN0ZSviFzZI2Gjy2NYM0H b5Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+kraZp/jdtMCz68q8csAdvc9YGn7/uI9fFuf0zEctLY=; b=cn+eYi80H1CqZY8+feUNzoqpxDpEiPqYq/mXV4JdZK6m+FAxYH6KSJlaNMx3BZO7G1 ui9tEO+duZiP1CPIkRfuuS8VvlOkWdj7pGqYRjQio2hGyP+LGSUIzKVbv9NOPHIlw45K 7N0xkTtXGYr9u4tl+wKJlBlyBnTFXlvAFAiwPgc8jGHtIlfp8Beo3lrw8ltVqsrgsIJv z2N+wAehWbWXdqSQBwPTZmGiC2108f8dgsGpnt6WuLywvK4gdSfRm+UF6jR3RjNMzb6H rafFg9TWO9KDPFQnvcoXBRMs48Ix0MhpANEgPA2wj5qrBJn46T00UBTvR7ifFRJM84NB kA/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dxgpvbBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056402438100b00418c2b5be23si1765587edc.261.2022.04.01.07.39.12; Fri, 01 Apr 2022 07:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dxgpvbBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346048AbiDAM7n (ORCPT + 99 others); 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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