From patchwork Thu Jun 6 16:30:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 165993 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9012164ili; Thu, 6 Jun 2019 09:31:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2Y7ZV1vPmXEjdQ+TX4968bbe2Ews16tAmnL8RP70Cq+ZDyY+SV+PScv2n9Jl1rvxaBuuz X-Received: by 2002:a17:90a:1b4c:: with SMTP id q70mr682837pjq.69.1559838674065; Thu, 06 Jun 2019 09:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559838674; cv=none; d=google.com; s=arc-20160816; b=FBimTN/sf8CvxhRY+L/67IGNktkPh0HjXeUfWltub3zpBwcuSI2LwhgSoHJf9sg3TK 0frw2/+/6OiXDnatYx5M1G7K8FICyCF+bO614H3SxIqmCubCg+9fQaGZ2w5x/miR1kV0 2N1kWDjMjl7GYfZEjkFkdghFJKAJj6IOL5hZmBGGuh3QM+5nTpq2kGun1Ybh8ZPUtvBm +AD4j1EuiGo5tuvfCKr0R18I27hn54ej58M/6eoOXUQGh5Sma2Qz99ecLBXiVU27S0NT xVbxcptAjLgdVwMznA0raWAHmY01/7NB6nBDCmEoWxyLI5mPYcJjkLK+AcNgb6lCEz8p mnIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DlaHGuBwA9qxrYjkx0p7cfUajFkarVJmB4WO+zGG17g=; b=TCbAj7QvtRSfK+yC3eAQbFd/zfFPsZIDYdovgvy2KbUkU8E4KBQOEbW2XFakRNMSjf QhuBCAPcvNemuRe0MCSohxR8MLIRPEqdROX03ywXmwCR4a0RNKF06N5F8jYCt1cVR4nD b7a7cdiK33AmCPDcgjxDHmu+R8IGnjJhNU3U3HpBYM/pLyE/skbIv5INSXLSslNYKN9o ATSEDacvhfM2i+6j4k7uaHZaHcCEG8AHLKa7aHh8IrIgEeyUsrc7iPCS4wJFkKeFp0Dw sdLrKaFHfHFU0CpJ/bx9ptmkRvWZaW8dY8/60Ndw8whPXOGwnZrc1Ayra8ir+Ah2z64x Lpvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dXnCDunR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si2356250pgq.170.2019.06.06.09.31.13; Thu, 06 Jun 2019 09:31:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dXnCDunR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729718AbfFFQbM (ORCPT + 30 others); Thu, 6 Jun 2019 12:31:12 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:50118 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbfFFQbL (ORCPT ); Thu, 6 Jun 2019 12:31:11 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x56GV6JV108047; Thu, 6 Jun 2019 11:31:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559838666; bh=DlaHGuBwA9qxrYjkx0p7cfUajFkarVJmB4WO+zGG17g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dXnCDunR5KQ175AyxGWOZl1uOf1a4h2Q517O/ipisK8ES5vxxm45eM8EpiIU1R935 uIs7UOiUNZwCDTvODnzR2tjXXRM8gpID32AbRTp37blx/B28wlXl5HAiClQiKEWqTd 1KiaN7UrhwaN+lXSiVWRfmov8wkZnf/WY4setmoQ= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x56GV5J3082453 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2019 11:31:05 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 6 Jun 2019 11:31:05 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 6 Jun 2019 11:31:05 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x56GV4Ef052215; Thu, 6 Jun 2019 11:31:05 -0500 From: Grygorii Strashko To: "David S. Miller" , Santosh Shilimkar , Richard Cochran , Rob Herring CC: Sekhar Nori , Murali Karicheri , Wingman Kwok , , , , , Grygorii Strashko Subject: [PATCH net-next v2 01/10] dt-bindings: doc: net: keystone-netcp: document cpts Date: Thu, 6 Jun 2019 19:30:38 +0300 Message-ID: <20190606163047.31199-2-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190606163047.31199-1-grygorii.strashko@ti.com> References: <20190606163047.31199-1-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Keystone 2 66AK2HK/E/L 1G Ethernet Switch Subsystems contains The Common Platform Time Sync (CPTS) module which is in general compatible with CPTS module found on "legacy" TI AM3/4/5 SoCs. So, the basic support for Keystone 2 CPTS is available by default, but not documented. The Keystone 2 CPTS module supports also some additional features like time sync reference (RFTCLK) clock selection through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module, which is modelled as multiplexer clock. This patch adds missed binding documentation for Keystone 2 66AK2HK/E/L CPTS module. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran --- .../bindings/net/keystone-netcp.txt | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt index 6262c2f293b0..24f11e042f8d 100644 --- a/Documentation/devicetree/bindings/net/keystone-netcp.txt +++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt @@ -104,6 +104,23 @@ Required properties: - 10Gb mac<->mac forced mode : 11 ----phy-handle: phandle to PHY device +- cpts: sub-node time synchronization (CPTS) submodule configuration +-- clocks: CPTS reference clock. Should point on cpts-refclk-mux clock. +-- clock-names: should be "cpts" +-- cpts-refclk-mux: multiplexer clock definition sub-node for CPTS reference (RFTCLK) clock +--- #clock-cells: should be 0 +--- clocks: list of CPTS reference (RFTCLK) clock's parents as defined in Data manual +--- ti,mux-tbl: array of multiplexer indexes as defined in Data manual +--- assigned-clocks: should point on cpts-refclk-mux clock +--- assigned-clock-parents: should point on required RFTCLK clock parent to be selected +-- cpts_clock_mult: (optional) Numerator to convert input clock ticks + into nanoseconds +-- cpts_clock_shift: (optional) Denominator to convert input clock ticks into + nanoseconds. + Mult and shift will be calculated basing on CPTS + rftclk frequency if both cpts_clock_shift and + cpts_clock_mult properties are not provided. + Optional properties: - enable-ale: NetCP driver keeps the address learning feature in the ethernet switch module disabled. This attribute is to enable the address @@ -168,6 +185,23 @@ netcp: netcp@2000000 { tx-queue = <648>; tx-channel = <8>; + cpts { + clocks = <&cpts_refclk_mux>; + clock-names = "cpts"; + + cpts_refclk_mux: cpts-refclk-mux { + #clock-cells = <0>; + clocks = <&chipclk12>, <&chipclk13>, + <&timi0>, <&timi1>, + <&tsipclka>, <&tsrefclk>, + <&tsipclkb>; + ti,mux-tbl = <0x0>, <0x1>, <0x2>, + <0x3>, <0x4>, <0x8>, <0xC>; + assigned-clocks = <&cpts_refclk_mux>; + assigned-clock-parents = <&chipclk12>; + }; + }; + interfaces { gbe0: interface-0 { slave-port = <0>; @@ -219,3 +253,13 @@ netcp: netcp@2000000 { }; }; }; + +CPTS board configuration - select external CPTS RFTCLK: + +&tsrefclk{ + clock-frequency = <500000000>; +}; + +&cpts_refclk_mux { + assigned-clock-parents = <&tsrefclk>; +};