Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3593445rwb; Mon, 16 Jan 2023 10:01:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8YNw1e6aGimkOcEEH3OyrULzM9Sv9GQQizOuSQr5g0Bo2ZwGhosCN1TMO3z03CKcPj/OX X-Received: by 2002:a17:907:a485:b0:86f:b541:cd02 with SMTP id vp5-20020a170907a48500b0086fb541cd02mr6623795ejc.28.1673892096600; Mon, 16 Jan 2023 10:01:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673892096; cv=none; d=google.com; s=arc-20160816; b=0qQmusU1lqlaFPkqKUX2NMpxT3/xNPpyyxCsOkUHemSMCY2kGn/0YYuZ/g+7FfcjPO fZuSg7dORYbW73DptQxn81uv84PmLj0DZd17pFAKlmBQCknMWSgRaHrn73N/UtAk4lA5 J6OalBjB6vlPbLm0wh9qR0tx0H2RwO7H+7AFul/bweqxnHYir6anqjCAxsiKTpBbTIjt KqDfJxZei+2qBRIriH74vz8OjaZj2OHMSLtRQezRpEPJwzP1cJ3syIw+vwgxbYIrqGjC 5XbUgtvU4Zz7punNiT7sxorOZI4gk0aZCjM8kdj/2Z7JvBZ3lLNU8EVtdw1+ZwAAeUtp fPtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/yDZo+9SO1D0yHHflAvmpgJZYxoJmpTMma2nvZQZnwc=; b=hPpq8H6sVGHfS2nQC1RKjtb6U5gQ7V/1XBQyWHEI1fhWDes+zIh3vPbo3A5Dd5aeoc wPM/IKoz9oAdYeiwcdHVRP4bFVi6PpKTEaCqcoPf7OaLIAy1XpCkCpvWI9UeER9FDVcj RX6yiWq954Jdj3wsm3DRPxLza2f5eZEbwv9LMI0vmUTMyUPpJGonWaFeOWib4mNT0bPc JFIt9XYg5Ui268N58wsi5xXPROTI8o/U10UMSuQa7k9lSuZd4hB2J5bv40xd4j4xuv7p SyRFRyj7w3xGGSPJnLxVVzdU2FUB7OBAgaY6P9obGi25LL85Hls7NmWjHPIlLK327Vw/ YbNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WYtPeXlF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu9-20020a170907a08900b007c07dfbed4asi9608781ejc.905.2023.01.16.10.01.24; Mon, 16 Jan 2023 10:01:36 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=WYtPeXlF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232978AbjAPQSJ (ORCPT + 50 others); Mon, 16 Jan 2023 11:18:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232776AbjAPQRY (ORCPT ); Mon, 16 Jan 2023 11:17:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 839C92F780; Mon, 16 Jan 2023 08:09:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 221A661049; Mon, 16 Jan 2023 16:09:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 422D5C433EF; Mon, 16 Jan 2023 16:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673885394; bh=dH7lITLlk10HZ7ydsnC9KY3bJd+hlALCCaDraiWcJ+E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WYtPeXlFvfFX00XNhpkT336OailQFQ4zPyAqQh0aH6nh6VaTSTNwr6uWxAdPeMnma M7l6+84LfpcvLWp6IsDtiLtaOM9UtOeGKvT+GbxAQ47D2zXBHkZz86o05hmt5mmmN0 E9JbmJuVSIegCdrgFgcirw42pxnhNmjmZ+53Nnsue5dTp9F+z7gFBI/nrBEp7AQhgO U5cA4HMVUOk8mNE6xqO1ZD06Q8q7rOHBUNTeiW2+3fQozfKrFiKoiuayUwBfum9GtD HbAhw/Dql8GZMWYZXKxkh8EltkW0bjuBL1aclwIMIribmrZG64fRzQElYJJ5sAK9ZX zuLGloNKRg8/Q== Message-ID: <987fc487-539a-6159-ffbc-9fe1c87a06b9@kernel.org> Date: Mon, 16 Jan 2023 18:09:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH net-next v2 3/3] net: ethernet: ti: am65-cpts: adjust pps following ptp changes Content-Language: en-US To: Siddharth Vadapalli , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski@linaro.org, krzysztof.kozlowski+dt@linaro.org, vigneshr@ti.com, nsekhar@ti.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srk@ti.com References: <20230116085534.440820-1-s-vadapalli@ti.com> <20230116085534.440820-4-s-vadapalli@ti.com> From: Roger Quadros In-Reply-To: <20230116085534.440820-4-s-vadapalli@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 16/01/2023 10:55, Siddharth Vadapalli wrote: > From: Grygorii Strashko > > When CPTS clock is sync/adjusted by running linuxptp (ptp4l) it will cause > PPS jitter as Genf running PPS is not adjusted. > > The same PPM adjustment has to be applied to GenF as to PHC clock to > correct PPS length and keep them in sync. > > Testing: > Master: > ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp.cfg & > testptp -d /dev/ptp1 -P 1 > ppstest /dev/pps0 > > Slave: > linuxptp/ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp1.cfg -s & > > testptp -d /dev/ptp1 -P 1 > ppstest /dev/pps0 > > Master log: > source 0 - assert 620.000000689, sequence: 530 > source 0 - assert 621.000000689, sequence: 531 > source 0 - assert 622.000000689, sequence: 532 > source 0 - assert 623.000000689, sequence: 533 > source 0 - assert 624.000000689, sequence: 534 > source 0 - assert 625.000000689, sequence: 535 > source 0 - assert 626.000000689, sequence: 536 > source 0 - assert 627.000000689, sequence: 537 > source 0 - assert 628.000000689, sequence: 538 > source 0 - assert 629.000000689, sequence: 539 > source 0 - assert 630.000000689, sequence: 540 > source 0 - assert 631.000000689, sequence: 541 > source 0 - assert 632.000000689, sequence: 542 > source 0 - assert 633.000000689, sequence: 543 > source 0 - assert 634.000000689, sequence: 544 > source 0 - assert 635.000000689, sequence: 545 > > Slave log: > source 0 - assert 620.000000706, sequence: 252 > source 0 - assert 621.000000709, sequence: 253 > source 0 - assert 622.000000707, sequence: 254 > source 0 - assert 623.000000707, sequence: 255 > source 0 - assert 624.000000706, sequence: 256 > source 0 - assert 625.000000705, sequence: 257 > source 0 - assert 626.000000709, sequence: 258 > source 0 - assert 627.000000709, sequence: 259 > source 0 - assert 628.000000707, sequence: 260 > source 0 - assert 629.000000706, sequence: 261 > source 0 - assert 630.000000710, sequence: 262 > source 0 - assert 631.000000708, sequence: 263 > source 0 - assert 632.000000705, sequence: 264 > source 0 - assert 633.000000710, sequence: 265 > source 0 - assert 634.000000708, sequence: 266 > source 0 - assert 635.000000707, sequence: 267 > > Signed-off-by: Grygorii Strashko > Signed-off-by: Siddharth Vadapalli > --- > drivers/net/ethernet/ti/am65-cpts.c | 59 ++++++++++++++++++++++++----- > 1 file changed, 49 insertions(+), 10 deletions(-) Reviewed-by: Roger Quadros