From patchwork Mon Oct 8 23:49:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 148474 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4243906lji; Mon, 8 Oct 2018 16:51:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV61KDhbvJLZ1KO5sihLp80GBtf93IoD6aNMvUGU3c67TJyk8P2qivEUytbaav6BvIt7LUCjs X-Received: by 2002:a63:6445:: with SMTP id y66-v6mr23710713pgb.443.1539042680864; Mon, 08 Oct 2018 16:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539042680; cv=none; d=google.com; s=arc-20160816; b=z04TvYn/wmV/CwZ9mNJ9o+790OhM0Kf3T2iUdcnn9d2pCpF3ylR5HkOIxpdEvi+XtO I289ZkL6kC9jdVJayNEj9Nff9hVSXyRsvq3W5jbxu/8LxHicTLZxaorbqZSfwdoCryZy ip1HtEmen9YHtQ7kXuvodJJuv9HnspX+H8AKE5bpB4agKYBBm5O91NEXEzvEDp7X1Wg1 WsLYTyChQgbZ10lJzN8dbwMx0wE+F6+lFzIGcwBWe3mMjJYFjhqZpcUgHNW7tWfnYR29 b76goAg8XxL6M2E9aeUHU83egaDr6Mknq+i2lB3av6KfMR0di5Jm2l96q3LthGI5lSz9 NPTQ== 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=3uC4YX3i2GahEKMhydzhXXxO77zZOflGn5HPNJiU2+k=; b=cFaRinXy2ZQXAkheXHrC2ej32K5salamDP2Buyz07W4Ri9lPqp5qjPqS+miPIbz0fn 9d40HsZyuK8p0XpHHKRrV3clTPzS/y4WHC92+x0HYBJy2gb+m2FZpNklSZGNuSfHtyD7 8oI+MP7GkTug9gSoXmuk+ciUHp94bY+//NeuNRtDvLtJYqti2+SoDrOXYGagjFuaaICK cr/ZZaKOWJpw1EEA3esw/1PgFhmiPT8icqWXvHm4paQvythgXoUhCIDU1Qg7EQt0HrEf uCvvm/CRJ3MvMDNAI8MS2UQ812qLtHzvv8RaMiGluSBPG1Wx6MYk8cGPAVHDLXa4sROh 8c4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ThZ9KEoW; 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 a10-v6si18315389pgk.365.2018.10.08.16.51.20; Mon, 08 Oct 2018 16:51:20 -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=ThZ9KEoW; 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 S1726697AbeJIHEH (ORCPT + 32 others); Tue, 9 Oct 2018 03:04:07 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42952 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbeJIHEG (ORCPT ); Tue, 9 Oct 2018 03:04:06 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id w98Nnqvo126361; Mon, 8 Oct 2018 18:49:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539042592; bh=3uC4YX3i2GahEKMhydzhXXxO77zZOflGn5HPNJiU2+k=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ThZ9KEoWRoHFh1u+FOaUoxtuPmwMM90arV6T1MoPQ/ALIZQHtp5TpxXQ0J9wlsUoh xw3NoQNsh3+VBoN1ViU2aFWH3W24FXU5CHHjVvzPCykMsTNNpi9k2/n0MBOD91ZT2N PtUD7z0eeMvyv64wyqAJn1ONyQN2BuEneLqi7uls= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w98NnqXu023944; Mon, 8 Oct 2018 18:49:52 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 8 Oct 2018 18:49:52 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 8 Oct 2018 18:49:51 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w98Nnp7m023110; Mon, 8 Oct 2018 18:49:51 -0500 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id w98Nnpx25216; Mon, 8 Oct 2018 18:49:51 -0500 (CDT) From: Grygorii Strashko To: "David S. Miller" , , Tony Lindgren , Rob Herring , Kishon Vijay Abraham I CC: Sekhar Nori , , , , Grygorii Strashko Subject: [RFC PATCH 02/11] dt-bindings: phy: add cpsw port interface mode selection phy bindings Date: Mon, 8 Oct 2018 18:49:40 -0500 Message-ID: <20181008234949.15416-3-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.5 In-Reply-To: <20181008234949.15416-1-grygorii.strashko@ti.com> References: <20181008234949.15416-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 Add CPSW Port's Interface Mode Selection PHY (phy-gmii-sel) DT Bindings Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- .../devicetree/bindings/phy/ti-phy-gmii-sel.txt | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt -- 2.10.5 diff --git a/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt b/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt new file mode 100644 index 0000000..fd81421 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt @@ -0,0 +1,68 @@ +CPSW Port's Interface Mode Selection PHY Tree Bindings +----------------------------------------------- + +TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports +two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. +The interface mode is selected by configuring the MII mode selection register(s) +(GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and +bit fields placement in SCM are different between SoCs while fields meaning +is the same. + +--------------+ + +-------------------------------+ |SCM | + | CPSW | | +---------+ | + | +--------------------------------+gmii_sel | | + | | | | +---------+ | + | +----v---+ +--------+ | +--------------+ + | |Port 1..<--+-->GMII/MII<-------> + | | | | | | | + | +--------+ | +--------+ | + | | | + | | +--------+ | + | | | RMII <-------> + | +--> | | + | | +--------+ | + | | | + | | +--------+ | + | | | RGMII <-------> + | +--> | | + | +--------+ | + +-------------------------------+ + +CPSW Port's Interface Mode Selection PHY describes MII interface mode between +CPSW Port and Ethernet PHY which depends on Eth PHY and board configuration. + +CPSW Port's Interface Mode Selection PHY device should defined as child device +of SCM node (scm_conf) and can be attached to each CPSW port node using standard +PHY bindings (See phy/phy-bindings.txt). + +Required properties: +- compatible : Should be "ti,am3352-phy-gmii-sel" for am335x platform + "ti,dra7xx-phy-gmii-sel" for dra7xx/am57xx platform + "ti,am43xx-phy-gmii-sel" for am43xx platform + "ti,dm814-phy-gmii-sel" for dm814x platform +- #phy-cells : must be 2. + cell 1 - CPSW port number (starting from 1) + cell 2 - RMII refclk mode +- syscon-scm : phandle on SCM node (mfd/syscon.txt) + +Examples: + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,am3352-phy-gmii-sel"; + syscon-scm = <&scm_conf>; + #phy-cells = <2>; + }; + + mac: ethernet@4a100000 { + compatible = "ti,am335x-cpsw","ti,cpsw"; + ... + + cpsw_emac0: slave@4a100200 { + ... + phys = <&phy_gmii_sel 1 1>; + }; + + cpsw_emac1: slave@4a100300 { + ... + phys = <&phy_gmii_sel 2 1>; + }; + };