From patchwork Thu Jun 6 16:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 165994 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9012367ili; Thu, 6 Jun 2019 09:31:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwN9gxQ6kBrZfNnXj5/hjmTkaFMji+43xrq49HNxIKMPhukm8UbchnhV06izimt3pdXsrai X-Received: by 2002:a17:902:2a28:: with SMTP id i37mr49920037plb.52.1559838683118; Thu, 06 Jun 2019 09:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559838683; cv=none; d=google.com; s=arc-20160816; b=yf8hmt7BxYR2LbCjs9ODy90+LWOwGcl+XbSIHRtLYZC0J9BSFhEUxf3yAvMOcXzBIM GgZse0Qf+Uu+WBhzJjzEvKiOqCZbau8tY7qV5S7ZJZwB2Lc/0/YJJvKHj9JBvle90926 LUKrgqRgsHFQwd3B4rgVtHGLAedECTFQ5LOK/rs9GzFAq1OC24ueHfNfMJgQm3eQM8aA nVdKxTlVE4dTvOo1zHjy+2bNvw4BGe+qHvPfrAjIcWNk8f7jFei5LgX/fAZ+mlJvZOuh rCRptIAZ74DdyGKvpWCKSpthHO3+JLHcv4I02npIqrZ+EZQy97ayIuohgfdyI0LES9F2 EaIw== 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=PTDnNRZC/L29QrENOY3N0wHK7ufCtG4xEHtYz7D28GU=; b=ORPxa5ZgWUrsQJKi0M6+CrTBsV0wa54g0NMETiFDDpkD8q1ZqZe6v9iIoAfI0XugC8 IsjeASuTHfjfPgH+1Ix2++rZMgOUG/kKbDL8AN1fSNEV6uOTRvBrd53raz0EEOtOZsOh a0eIobOfk7B71GxVMIenDPduD5NJhbwYjcfkp5jqTAiLlP1XS24TeGujEv1rV6VkJLmG GRDesD6fAOMAJsM57VZ7uiIxyOVuN8AdnOCoQF3WC0urlN+OJTgJyoc3zrBcaQvr5GRj mIskpBEB2A5Btnazv2GFqom+j4o0QX6JNBwuZCHEqvlhx9nF9aSBp5nlAdeDu+2U5IGy XVxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dy3uhPNu; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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.22; Thu, 06 Jun 2019 09:31:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=dy3uhPNu; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1729720AbfFFQbW (ORCPT + 8 others); Thu, 6 Jun 2019 12:31:22 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:50170 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbfFFQbW (ORCPT ); Thu, 6 Jun 2019 12:31:22 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x56GVCGC108085; Thu, 6 Jun 2019 11:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559838672; bh=PTDnNRZC/L29QrENOY3N0wHK7ufCtG4xEHtYz7D28GU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dy3uhPNutNtocFNc+XovZubyTFV0Oe0+Gxcej6/pkXaRGa10nJDGjqoVCX8+YQHKW 5g1qVB3HV7YmiGYrzbg9/z2rLUi+IGAItNNzGDb+dZI8TGC8LqbEDYXRe/LpMGPP6+ hV6MFjdIQT8Y/yFwVJAuwuLvGRpqbNxPw/8BSPlM= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x56GVCFW006661 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2019 11:31:12 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE112.ent.ti.com (10.64.6.33) 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:12 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) 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:12 -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 x56GVB1g052560; Thu, 6 Jun 2019 11:31:12 -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 02/10] net: ethernet: ti: cpts: use devm_get_clk_from_child Date: Thu, 6 Jun 2019 19:30:39 +0300 Message-ID: <20190606163047.31199-3-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Use devm_get_clk_from_child() instead of devm_clk_get() and this way allow to group CPTS DT properties in sub-node for better code readability and maintenance. Roll-back to devm_clk_get() if devm_get_clk_from_child() fails for backward compatibility. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran --- drivers/net/ethernet/ti/cpts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index e257018ada71..0e79f9743c19 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -572,9 +572,14 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs, if (ret) return ERR_PTR(ret); - cpts->refclk = devm_clk_get(dev, "cpts"); + cpts->refclk = devm_get_clk_from_child(dev, node, "cpts"); + if (IS_ERR(cpts->refclk)) + /* try get clk from dev node for compatibility */ + cpts->refclk = devm_clk_get(dev, "cpts"); + if (IS_ERR(cpts->refclk)) { - dev_err(dev, "Failed to get cpts refclk\n"); + dev_err(dev, "Failed to get cpts refclk %ld\n", + PTR_ERR(cpts->refclk)); return ERR_CAST(cpts->refclk); } From patchwork Thu Jun 6 16:30:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 165997 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9012922ili; Thu, 6 Jun 2019 09:31:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL0/YOUUrsDjINE7oyF6jRErQ6FUj6obT4qsx4irt47fRUiiWSfgJfmCSdxHGMqgqI1nA3 X-Received: by 2002:a62:5e06:: with SMTP id s6mr55459236pfb.193.1559838710071; Thu, 06 Jun 2019 09:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559838710; cv=none; d=google.com; s=arc-20160816; b=cAca8r/9OyACJipD2ET6eAPYPNPnxlinu/vYjnB8ewP9+FGToeklS0snRVWs8k3KZ0 boqPDYrMdYbtvneAFLnjm4rfnW0rIqvR4wybw2NnvQhTCA1PU35vY+xq05b/+gTxBkZG EIxaDdpTJVNpuYNEXhfVFmDLZhvu1NCIPJZxzL5Nqe5mlX6QXcJj2nlRYjme/27/7ogs XeXFBdvyEYs92Xuf7ee2oAGUhZmz9s26xcc3wHferxYTlO0c2QLe8xlGKEkTzdjQocyo isSPzF4XokZs1E2LcfUuE01SGkXudm4edVLVg0kvKNOjrhIsLqZf4S6X/3EGr7JYpyeS J26A== 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=RXWt2LbpLPn0rXtjpPJnTNrrxvuLwZ56OSKRoHCUfOs=; b=a2nbq1if5uv/BQ8Mq/+pgTRBx63grrYbmhadBOVksx5Wjufqg0ca4muIGnIOGX2Yra 1f9h6mce2t/zlOmGMcfeu1PSsqvni2GCKRyGLnveAY1gWoX3MVeJiLSSiFLYWlnTdr3A aMB7oL9GZbmpj3CCAhPe10zVRjhKA1G10nTu4FgjyH4EsgVpV2TMz5qwJvrn9c2fJxyb qihGhc0PUFkWwRrfCBWu0h6cQvSWBetRYLVQFu1SFviPXE/uMXXJVP+HY1AU/sFgAKFa qTt3KflcrocOKuMrkoG6oG4xu0Y6QoFTrp+my4TMB2fhADwC5bWdFDUPeEvbzETHOA9k O9Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Y1T25S2A; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 r185si2336198pgr.10.2019.06.06.09.31.49; Thu, 06 Jun 2019 09:31:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=Y1T25S2A; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1729745AbfFFQbt (ORCPT + 8 others); Thu, 6 Jun 2019 12:31:49 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:50282 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727085AbfFFQbt (ORCPT ); Thu, 6 Jun 2019 12:31:49 -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 x56GVTcM108178; Thu, 6 Jun 2019 11:31:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559838689; bh=RXWt2LbpLPn0rXtjpPJnTNrrxvuLwZ56OSKRoHCUfOs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Y1T25S2AnR2A5R/2Wwtj1COOnzWoOe62AHBTrJnvTlTVQo9acpstmljZdPNJI+9I0 2O9PJ6irVjO5Y+8332kE/hKnAW8CCGVB1VPhulyYrNVQT6tN4Mfhvc+OdpcDC8LSCT 0e9v7SjaoFXSigQcsFbYToM5C6anMNTd0VdOzXyo= 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 x56GVTlX083105 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2019 11:31:29 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) 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:28 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE114.ent.ti.com (157.170.170.25) 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:28 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x56GVRZv045222; Thu, 6 Jun 2019 11:31:28 -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 05/10] ARM: dts: keystone-clocks: add input fixed clocks Date: Thu, 6 Jun 2019 19:30:42 +0300 Message-ID: <20190606163047.31199-6-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add set of fixed, external input clocks definitions for TIMI0, TIMI1, TSREFCLK clocks. Such clocks can be used as reference clocks for some HW modules (as cpts, for example) by configuring corresponding clock muxes. For these clocks real frequencies have to be defined in board files. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran --- arch/arm/boot/dts/keystone-clocks.dtsi | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/keystone-clocks.dtsi b/arch/arm/boot/dts/keystone-clocks.dtsi index 457515b0736a..0397c3423d2d 100644 --- a/arch/arm/boot/dts/keystone-clocks.dtsi +++ b/arch/arm/boot/dts/keystone-clocks.dtsi @@ -408,4 +408,31 @@ clocks { reg-names = "control", "domain"; domain-id = <0>; }; + + /* + * Below are set of fixed, input clocks definitions, + * for which real frequencies have to be defined in board files. + * Those clocks can be used as reference clocks for some HW modules + * (as cpts, for example) by configuring corresponding clock muxes. + */ + timi0: timi0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "timi0"; + }; + + timi1: timi1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "timi1"; + }; + + tsrefclk: tsrefclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "tsrefclk"; + }; }; From patchwork Thu Jun 6 16:30:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 165998 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9013207ili; Thu, 6 Jun 2019 09:32:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeuVHNsNI6yBYeMKE9dk6vAuTA3/ErcAKzmXwEA4xQBPiOsVrgs8FgolxZd3Eq8YobrhHk X-Received: by 2002:a63:dc15:: with SMTP id s21mr4202168pgg.215.1559838721714; Thu, 06 Jun 2019 09:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559838721; cv=none; d=google.com; s=arc-20160816; b=0FoYl7Tu6Q3yPFgwd8X8hkJ4M1vQAY3WhfGuo0BhOoHpptrsOqUI6Ia4rF613VYkzK 7SfZv3XgFQUguc8d1Kmkao/DaHmJGW5CEPLEEcaNLVuIzbh59jgkjr+5CTG+zeDOXTlJ OOVqgN8lH72MsUyLlcxk45q5D4I9N7Q7OawIcIcHN3KJ+vLh4pkRJBF7N3gqC+sXK7u+ mUJE1Je0cPMFHKJOGDRTHFDzxSt2sdoWV+Z0vrEbMUvkrQ0nrdbB+A7fPyM4N/exaTRJ npYLafDg/pQzr5a5yk7wlp3nDtoOkAl4jSQZV4TR/GkKl0Ok9m/RCCPL7RwTLNALxaIF zgUQ== 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=1zFy936XzUIi67D9OgTkgxcx0/Qz9tb8yXJIunLl9x0=; b=fWokTP+hTBVYt4KGZ0awKBxU1K9S8fKXAZVXGmHbeYO1CS3z+CIU6GAYb3MF4wY0it FxkJklbbKu0UN55v1YqFlQfpw2PFAi06puDdvwqW5A0V9NGyYZVENzt0sJJJxGxYBgIt PM1zJOAzYD/cXlKtXJ0gP15dgBAikzRg/QJiyGnS/Us/D6FS3+C1yDDqiVO8sEZoWRTE w5Nn1+VBBTkfpbFpZSg/6v94fKEjA6kNm27m6+zmHtjmzMqfctV7gjgjg9XDs81JCtdS tlXSbiul2CwI9RNFqhaogLXrQivnf/1bAV9XiJj6cbt98zKonqByeNfRa+8Jh4Qu+che aw4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Ej9cG/WX"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 b61si2289475pjc.46.2019.06.06.09.32.01; Thu, 06 Jun 2019 09:32:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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="Ej9cG/WX"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727085AbfFFQcB (ORCPT + 8 others); Thu, 6 Jun 2019 12:32:01 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:50302 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbfFFQcB (ORCPT ); Thu, 6 Jun 2019 12:32:01 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x56GVaBg108201; Thu, 6 Jun 2019 11:31:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559838696; bh=1zFy936XzUIi67D9OgTkgxcx0/Qz9tb8yXJIunLl9x0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ej9cG/WX5ItexR3oQP0B5Vz41cwtbSNYH3njqC8SQbQcr+av6ELvWnVx8LdPbUN/6 ogtzE7Yn1Oyn9aprAkwfatjvEQyu1TBJ4YRUukglQNDhKHn2mQcZ2ZVfsBUDBYWPYN 8Oxvg/IR4BKpxlB9+cAIuXpdB8Az9D+P/hplv6Pk= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x56GVZ9R007098 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2019 11:31:35 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE112.ent.ti.com (10.64.6.33) 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:35 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) 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:35 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x56GVYQd045341; Thu, 6 Jun 2019 11:31:35 -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 06/10] ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b Date: Thu, 6 Jun 2019 19:30:43 +0300 Message-ID: <20190606163047.31199-7-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add set of fixed, external input clocks definitions for TSIPCLKA, TSIPCLKB clocks. Such clocks can be used as reference clocks for some HW modules (as cpts, for example) by configuring corresponding clock muxes. For these clocks real frequencies have to be defined in board files. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran --- arch/arm/boot/dts/keystone-k2e-clocks.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/keystone-k2e-clocks.dtsi b/arch/arm/boot/dts/keystone-k2e-clocks.dtsi index f7592155a740..cf30e007fea3 100644 --- a/arch/arm/boot/dts/keystone-k2e-clocks.dtsi +++ b/arch/arm/boot/dts/keystone-k2e-clocks.dtsi @@ -71,4 +71,24 @@ clocks { reg-names = "control", "domain"; domain-id = <29>; }; + + /* + * Below are set of fixed, input clocks definitions, + * for which real frequencies have to be defined in board files. + * Those clocks can be used as reference clocks for some HW modules + * (as cpts, for example) by configuring corresponding clock muxes. + */ + tsipclka: tsipclka { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "tsipclka"; + }; + + tsipclkb: tsipclkb { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "tsipclkb"; + }; }; From patchwork Thu Jun 6 16:30:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 166001 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9013689ili; Thu, 6 Jun 2019 09:32:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFAvGkt1dExb4fhPWv6+4jPHRw7TcJGvkX5qHnKtEqfprm+UrPFq9RqBHdJv9BamU1S2nB X-Received: by 2002:a62:e801:: with SMTP id c1mr30489007pfi.41.1559838745457; Thu, 06 Jun 2019 09:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559838745; cv=none; d=google.com; s=arc-20160816; b=bPtkgUxSQHnmuPKMixrbhI71IR6gp9MmTc3btsqak1viqyml+RryBr+4fP28nBGPrn FP6CCmseg02I5mhks7hevZCfr+MsD7wlBo0qT7/mt3Pp+0bsJoFKhq6ALCrcJe/I7TQd LFdgdM4m0MVGOqi9IGwkolOccI4CbNDsl1+70nqvW38AybeXbZLv3MtgZT9K8dig0IDF urNV86oYrXMTlw1OllzUGYVlAivY5U7y4q55cFqxoZYK44zzq5EPdo56AICjOrx87ynd HS+hm1dyboF0UnwbHGH9V6qCxrm2gRq0foizDt6lplupzk2bik4smwBsMB/RUv2veWY5 XPYw== 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=Gn3xURY5BUjSFAZbun55pawK7z21WoM+9EkdnLdvZP8=; b=fh9461ob9KPlNccv9cg1jtAs/+lb0oh/IxUm9c7789fGZaUKy+Sp7JjJETRgnNk78/ 2yph1sAoW5C8FJQ9Vm2UuMNtmLpuUdEiKHmI4OITomWDnr/4kzVhOqqa5Qn1HEL+QLbI 7+nyYtTuoqAvaR5ybXOp8cthK/TSWGBm9qi2CdqgBL4OGOrGBpEZv49+uRGgnXCNGDOI gUfHU7iKbnwgMRdHK/bWRnGJmKlGdhqL7CUhRdj1IuZmbhUsW3bSCIdaxtIV5S62Er+f oARqKDqi+HNBfJET0r3NV/Lp8pDEoETe/4XKQwUk5hKpLqzIH5FuxzgYIuB76lOQhJK/ po/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P0bh6d3F; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 b95si2169277plb.401.2019.06.06.09.32.25; Thu, 06 Jun 2019 09:32:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=P0bh6d3F; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1726699AbfFFQcY (ORCPT + 8 others); Thu, 6 Jun 2019 12:32:24 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:44658 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbfFFQcY (ORCPT ); Thu, 6 Jun 2019 12:32:24 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x56GVukW107450; Thu, 6 Jun 2019 11:31:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559838716; bh=Gn3xURY5BUjSFAZbun55pawK7z21WoM+9EkdnLdvZP8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P0bh6d3FQmFodZ/M0Qo1sTaVz/ljEHHwoy9MnMvmxsRTvXEnv/wf/uVVYT8R5Z62K AifLfhxDYHbqMxY8Fz83DIG7GLN6A/3utbT4uLnIbQzl3ErYOlfH/CnbbFpegJT4FP DYICnb/ZuFIzNdKBvizhHSshNmFmPQJUnjYtIg6o= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x56GVuaf042571 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2019 11:31:56 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE111.ent.ti.com (157.170.170.22) 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:56 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE105.ent.ti.com (157.170.170.35) 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:56 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x56GVtVY045642; Thu, 6 Jun 2019 11:31:56 -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 09/10] ARM: dts: k2l-netcp: add cpts refclk_mux node Date: Thu, 6 Jun 2019 19:30:46 +0300 Message-ID: <20190606163047.31199-10-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org KeyStone 66AK2L 1G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks for time sync reference (RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module and modelled as multiplexer clock. Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2, SYSCLK3, TIMI0, TIMI1, TSREFCLK clocks as CPTS reference clock [1] and group all CPTS properties under "cpts" subnode. [1] http://www.ti.com/lit/gpn/66ak2l06 Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran --- arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm/boot/dts/keystone-k2l-netcp.dtsi b/arch/arm/boot/dts/keystone-k2l-netcp.dtsi index a2e47bad3307..c1f982604145 100644 --- a/arch/arm/boot/dts/keystone-k2l-netcp.dtsi +++ b/arch/arm/boot/dts/keystone-k2l-netcp.dtsi @@ -134,8 +134,8 @@ netcp: netcp@26000000 { /* NetCP address range */ ranges = <0 0x26000000 0x1000000>; - clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>; - clock-names = "pa_clk", "ethss_clk", "cpts"; + clocks = <&clkpa>, <&clkcpgmac>; + clock-names = "pa_clk", "ethss_clk"; dma-coherent; ti,navigator-dmas = <&dma_gbe 0>, @@ -155,6 +155,22 @@ netcp: netcp@26000000 { tx-queue = <896>; tx-channel = "nettx"; + cpts { + clocks = <&cpts_refclk_mux>; + clock-names = "cpts"; + + cpts_refclk_mux: cpts-refclk-mux { + #clock-cells = <0>; + clocks = <&chipclk12>, <&chipclk13>, + <&timi0>, <&timi1>, + <&tsrefclk>; + ti,mux-tbl = <0x0>, <0x1>, <0x2>, + <0x3>, <0x8>; + assigned-clocks = <&cpts_refclk_mux>; + assigned-clock-parents = <&chipclk12>; + }; + }; + interfaces { gbe0: interface-0 { slave-port = <0>;