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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 47AC7C2D0D2 for ; Sat, 21 Dec 2019 19:36:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 122D9206B7 for ; Sat, 21 Dec 2019 19:36:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qUYmbyc3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbfLUTgz (ORCPT ); Sat, 21 Dec 2019 14:36:55 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41980 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbfLUTgz (ORCPT ); Sat, 21 Dec 2019 14:36:55 -0500 Received: by mail-pl1-f196.google.com with SMTP id bd4so5534227plb.8; Sat, 21 Dec 2019 11:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JibM5raV/YAFw3oVHiGpDr4SxeM+CWDiIkx7ilTDLCM=; b=qUYmbyc3wvwfq+WzSe3ojeTh/xFwS9sMJR1HuJUGsyFayEqX++0GtMR4IPcXr+SB2n nSbggx41PNZsLAb+ynt8Sw5qW76hNbWvwxf0S/2XzdBHNnX9O5tJXYUXGryfMGLQJ2ft l4Jjb2iweErtMWtxTxRh4TYZmOljYgDqmYKCj5eznNxItIylq3EIREMQL0Rabuq0kWA6 uQYZ+E7vxM3nGoN1KfCpZ8t+N7KB8R7QFBbudlEXFYmaEt7fRO8tzoe8v/I9/bSGBtnG TVifjLFIOYPUYBV3+BcZaNlyjz0nwL5OwbxC1Ngc/Txzbq6MsclHLicVKT0v1dEAp75Z cvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JibM5raV/YAFw3oVHiGpDr4SxeM+CWDiIkx7ilTDLCM=; b=m+tKtlReroUlrJ6a83gACnR8HpgPasNDAKgBenqxGq1Wk9bCnwwS9Hb1Op1wqLhLxO 7krkK4Q7MmOlYCoN6s4EhnEb0J1wBOJBpbDGKjrPBX2sbKV70iW5hVGuBrEw/CCY2ETf naOuXMUm++rD/zittMGynlDrEP957QeX0s+nreQzazDOKPahm/wR+ASW9h5QlvHtjgNC tnvmzW3OUDpaGmwYEAmooqTy7RdTRvIM9hr0sDxMOqZhbTpuy0hgnNpfgVqsjDL72zaE MUyZuZYToJQYOq5jETgDJO3XpcfosRgWNuhfZrbjLusIa7lT6aWcaiGSu3bUFhB3JGCM TmqQ== X-Gm-Message-State: APjAAAVHO+9ER/wejYqfu0bZw+mhjC0NmF1aIFq7u9DHr85vgVVC1Bjo Pdk47oW0QUSPcHubPnA1R2MZ3ms/ X-Google-Smtp-Source: APXvYqwx9DHa3YrBPG+gsYZ0uBqquM2cZEnFt1FYahORWDXVNEdnWL3YaGV5c4c0YgnksuDonjjpOw== X-Received: by 2002:a17:90a:e291:: with SMTP id d17mr25019384pjz.116.1576957014100; Sat, 21 Dec 2019 11:36:54 -0800 (PST) Received: from localhost.localdomain (c-73-241-114-122.hsd1.ca.comcast.net. [73.241.114.122]) by smtp.gmail.com with ESMTPSA id y197sm18512603pfc.79.2019.12.21.11.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2019 11:36:53 -0800 (PST) From: Richard Cochran To: netdev@vger.kernel.org Cc: David Miller , devicetree@vger.kernel.org, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Jacob Keller , Jakub Kicinski , Mark Rutland , Miroslav Lichvar , Murali Karicheri , Rob Herring , Willem de Bruijn , Wingman Kwok Subject: [PATCH V8 net-next 09/12] dt-bindings: ptp: Introduce MII time stamping devices. Date: Sat, 21 Dec 2019 11:36:35 -0800 Message-Id: <40fce97d7717ce74bedf64a79f4b96ee07003de0.1576956342.git.richardcochran@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch add a new binding that allows non-PHY MII time stamping devices to find their buses. The new documentation covers both the generic binding and one upcoming user. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn --- .../devicetree/bindings/ptp/ptp-ines.txt | 35 ++++++++++++++++ .../devicetree/bindings/ptp/timestamper.txt | 42 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/ptp/ptp-ines.txt create mode 100644 Documentation/devicetree/bindings/ptp/timestamper.txt diff --git a/Documentation/devicetree/bindings/ptp/ptp-ines.txt b/Documentation/devicetree/bindings/ptp/ptp-ines.txt new file mode 100644 index 000000000000..4c242bd1ce9c --- /dev/null +++ b/Documentation/devicetree/bindings/ptp/ptp-ines.txt @@ -0,0 +1,35 @@ +ZHAW InES PTP time stamping IP core + +The IP core needs two different kinds of nodes. The control node +lives somewhere in the memory map and specifies the address of the +control registers. There can be up to three port handles placed as +attributes of PHY nodes. These associate a particular MII bus with a +port index within the IP core. + +Required properties of the control node: + +- compatible: "ines,ptp-ctrl" +- reg: physical address and size of the register bank + +Required format of the port handle within the PHY node: + +- timestamper: provides control node reference and + the port channel within the IP core + +Example: + + tstamper: timestamper@60000000 { + compatible = "ines,ptp-ctrl"; + reg = <0x60000000 0x80>; + }; + + ethernet@80000000 { + ... + mdio { + ... + ethernet-phy@3 { + ... + timestamper = <&tstamper 0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/ptp/timestamper.txt b/Documentation/devicetree/bindings/ptp/timestamper.txt new file mode 100644 index 000000000000..fc550ce4d4ea --- /dev/null +++ b/Documentation/devicetree/bindings/ptp/timestamper.txt @@ -0,0 +1,42 @@ +Time stamps from MII bus snooping devices + +This binding supports non-PHY devices that snoop the MII bus and +provide time stamps. In contrast to PHY time stamping drivers (which +can simply attach their interface directly to the PHY instance), stand +alone MII time stamping drivers use this binding to specify the +connection between the snooping device and a given network interface. + +Non-PHY MII time stamping drivers typically talk to the control +interface over another bus like I2C, SPI, UART, or via a memory mapped +peripheral. This controller device is associated with one or more +time stamping channels, each of which snoops on a MII bus. + +The "timestamper" property lives in a phy node and links a time +stamping channel from the controller device to that phy's MII bus. + +Example: + + tstamper: timestamper@10000000 { + compatible = "ines,ptp-ctrl"; + reg = <0x10000000 0x80>; + }; + + ethernet@20000000 { + mdio { + ethernet-phy@1 { + timestamper = <&tstamper 0>; + }; + }; + }; + + ethernet@30000000 { + mdio { + ethernet-phy@2 { + timestamper = <&tstamper 1>; + }; + }; + }; + +In this example, time stamps from the MII bus attached to phy@1 will +appear on time stamp channel 0 (zero), and those from phy@2 appear on +channel 1. -- 2.20.1