From patchwork Thu Nov 12 15:35:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 11900499 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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 5E80BC56201 for ; Thu, 12 Nov 2020 15:37:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 104C42224D for ; Thu, 12 Nov 2020 15:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728674AbgKLPhK (ORCPT ); Thu, 12 Nov 2020 10:37:10 -0500 Received: from mailout08.rmx.de ([94.199.90.85]:38525 "EHLO mailout08.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbgKLPhJ (ORCPT ); Thu, 12 Nov 2020 10:37:09 -0500 Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout08.rmx.de (Postfix) with ESMTPS id 4CX5Lp1ZwpzMs7Q; Thu, 12 Nov 2020 16:37:06 +0100 (CET) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin01.retarus.com (Postfix) with ESMTPS id 4CX5LY3q46z2xKF; Thu, 12 Nov 2020 16:36:53 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.59) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 12 Nov 2020 16:35:51 +0100 From: Christian Eggers To: Vladimir Oltean , Jakub Kicinski , Andrew Lunn , Richard Cochran , "Rob Herring" CC: Vivien Didelot , "David S . Miller" , Kurt Kanzenbach , George McCollister , Marek Vasut , Helmut Grohne , Paul Barker , Codrin Ciubotariu , Tristram Ha , Woojung Huh , Microchip Linux Driver Support , Christian Eggers , , , Subject: [PATCH net-next v2 00/11] net: dsa: microchip: PTP support for KSZ956x Date: Thu, 12 Nov 2020 16:35:26 +0100 Message-ID: <20201112153537.22383-1-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [192.168.54.59] X-RMX-ID: 20201112-163653-4CX5LY3q46z2xKF-0@kdin01 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org There is only little documentation for PTP available on the data sheet [1] (more or less only the register reference). Questions to the Microchip support were seldom answered comprehensively or in reasonable time. So this is more or less the result of reverse engineering. [1] http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ9563R-Data-Sheet-DS00002419D.pdf Changes from RFC --> v2 ------------------------ I think that all open questions regarding the RFC version could be solved. dts: referenced to dsa.yaml dts: changed node name to "switch" in example dts: changed "ports" subnode to "ethernet-ports" ksz_common: support "ethernet-ports" subnode tag_ksz: fix usage of correction field (32 bit ns + 16 bit sub-ns) tag_ksz: use cached PTP header from device's .port_txtstamp function tag_ksz: refactored ksz9477_tstamp_to_clock() tag_ksz: pdelay_req: only subtract 2 bit seconds from the correction field tag_ksz: pdelay_resp: don't move (negative) correction to the egress tail tag ptp_classify: add ptp_onestep_p2p_move_t2_to_correction helper ksz9477_ptp: removed E2E support (as suggested by Vladimir) ksz9477_ptp: removed master/slave sysfs attributes (nacked by Richard) ksz9477_ptp: refactored ksz9477_ptp_port_txtstamp ksz9477_ptp: removed "pulse" attribute kconfig: depend on PTP_1588_CLOCK (instead of "imply")