From patchwork Fri Jun 21 18:13:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 167412 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1064489ilk; Fri, 21 Jun 2019 11:14:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrKUxGBt+sGtESeyZTNEIFsdlDv84YS0VfCwNnlGOiTMbULcrgpwzmSJ6g8f9T6TP5AGEw X-Received: by 2002:a17:90a:20a2:: with SMTP id f31mr8270189pjg.90.1561140881249; Fri, 21 Jun 2019 11:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561140881; cv=none; d=google.com; s=arc-20160816; b=o6G/U4EEViRYbubBItq5uL8rQTfXPMyyUjNpkBwtG5SaziO9Qc/ztylJS3OZkEdBc8 lmHDHFCJaIxfytQrWVgK/J1J58LD6SoMPpi4Pw93FVzeJFJ4DpPKWep8iS8hs+mBycyz rxMMaDv4Rfw2Qgd3ju32VKw4RtXFqFWsW9yleTE0ye1VYBmc7ZgBpTrKJspHFzvPKwm4 hi+ISMJzCqz+/tKCPdyFCQgACdNGMIXF9JXF/+0F7L8mFjgXdpQoM0E9brQjLwIVMlpd bPjW5vk+Q+zqUzvK1DMusvX6HUqlFUjwhuH7fWSRveihnrNa5VpL6kdF6xbgQX7cUXap IepQ== 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=c567k59bl9GhUXD6MZLrFuS7siN1KwQDSBU2GK/glqk=; b=f2K3yTNpcrFPl3x8YQxsc18Lb9tCcS7SQFqsWyTL41yX0T361DDZAIrIlI38s9hf9S 4W+HVHPHeaD7CNw3O/o3I49zfp7w8HhL0IROda4SA203UZDfJbKKx1tH7aq57Dau/x+z qLgkdJuzLkI2RXd0o0OVvkRCNIbCPQkUzGmE7lWGegeDSCE7JGxLv9UB+uN1Bg7tXFKz ib9X+c/vbEg1sQSHPkQEuC2+KmuVHtskjWVahTKY+bcFg531j5Tnggxv+HAWoLY7OQnm lido/r4n/h7HUTvVMX6hyyQzUDWYOznej9zdtKNLfhmt3zIq3MOh8AFQpA+0YxLThL57 YtCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=De1k8mvx; 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 8si3520025pfv.149.2019.06.21.11.14.40; Fri, 21 Jun 2019 11:14:41 -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=De1k8mvx; 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 S1726752AbfFUSOj (ORCPT + 30 others); Fri, 21 Jun 2019 14:14:39 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45840 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbfFUSOh (ORCPT ); Fri, 21 Jun 2019 14:14:37 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x5LIEKUe064094; Fri, 21 Jun 2019 13:14:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1561140861; bh=c567k59bl9GhUXD6MZLrFuS7siN1KwQDSBU2GK/glqk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=De1k8mvxYmhXLaUHCvxvXNCQHoWcAiRLGtowdkWPtsRTGuMOnxKVCIXg7J4f5KkeZ i3lYTBiN/kVeZH8b7dfeVHU5yUHlT7q6gFVzH5sJBB6jmBGolBdp1EhcZCLRITRWU1 Gl8Nyrz6fRbaAe2sgd1r0klsJYAmR1+teAITBsqg= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x5LIEK80003544 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 21 Jun 2019 13:14:20 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 21 Jun 2019 13:14:20 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE115.ent.ti.com (157.170.170.26) 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; Fri, 21 Jun 2019 13:14:20 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x5LIEJd2114017; Fri, 21 Jun 2019 13:14:20 -0500 From: Grygorii Strashko To: , Ilias Apalodimas , Andrew Lunn , "David S . Miller" , Ivan Khoronzhuk , Jiri Pirko CC: Florian Fainelli , Sekhar Nori , , , Murali Karicheri , Ivan Vecera , Rob Herring , , Grygorii Strashko Subject: [RFC PATCH v4 net-next 10/11] ARM: dts: am57xx-idk: add dt nodes for new cpsw switch dev driver Date: Fri, 21 Jun 2019 21:13:13 +0300 Message-ID: <20190621181314.20778-11-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190621181314.20778-1-grygorii.strashko@ti.com> References: <20190621181314.20778-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 DT nodes for new cpsw switch dev driver. Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/am571x-idk.dts | 28 +++++++++++++ arch/arm/boot/dts/am572x-idk.dts | 5 +++ arch/arm/boot/dts/am574x-idk.dts | 5 +++ arch/arm/boot/dts/am57xx-idk-common.dtsi | 2 +- arch/arm/boot/dts/dra7-l4.dtsi | 53 ++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm/boot/dts/am571x-idk.dts b/arch/arm/boot/dts/am571x-idk.dts index 66116ad3f9f4..9262e008c968 100644 --- a/arch/arm/boot/dts/am571x-idk.dts +++ b/arch/arm/boot/dts/am571x-idk.dts @@ -194,3 +194,31 @@ pinctrl-1 = <&mmc2_pins_hs>; pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>; }; + +&mac_sw { + pinctrl-names = "default", "sleep"; + status = "okay"; +}; + +&cpsw_port1 { + phy-handle = <ðphy0_sw>; + phy-mode = "rgmii"; + ti,dual_emac_pvid = <1>; +}; + +&cpsw_port2 { + phy-handle = <ðphy1_sw>; + phy-mode = "rgmii"; + ti,dual_emac_pvid = <2>; +}; + +&davinci_mdio_sw { + ethphy0_sw: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1_sw: ethernet-phy@1 { + reg = <1>; + }; +}; + diff --git a/arch/arm/boot/dts/am572x-idk.dts b/arch/arm/boot/dts/am572x-idk.dts index 4f835222c266..1664866c46d5 100644 --- a/arch/arm/boot/dts/am572x-idk.dts +++ b/arch/arm/boot/dts/am572x-idk.dts @@ -35,3 +35,8 @@ pinctrl-1 = <&mmc2_pins_hs>; pinctrl-2 = <&mmc2_pins_ddr_rev20>; }; + +&mac { + status = "okay"; + dual_emac; +}; \ No newline at end of file diff --git a/arch/arm/boot/dts/am574x-idk.dts b/arch/arm/boot/dts/am574x-idk.dts index dc5141c35610..f4834296bd54 100644 --- a/arch/arm/boot/dts/am574x-idk.dts +++ b/arch/arm/boot/dts/am574x-idk.dts @@ -40,3 +40,8 @@ pinctrl-1 = <&mmc2_pins_default>; pinctrl-2 = <&mmc2_pins_default>; }; + +&mac { + status = "okay"; + dual_emac; +}; \ No newline at end of file diff --git a/arch/arm/boot/dts/am57xx-idk-common.dtsi b/arch/arm/boot/dts/am57xx-idk-common.dtsi index f7bd26458915..5c7663699efa 100644 --- a/arch/arm/boot/dts/am57xx-idk-common.dtsi +++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi @@ -367,7 +367,7 @@ }; &mac { - status = "okay"; +// status = "okay"; dual_emac; }; diff --git a/arch/arm/boot/dts/dra7-l4.dtsi b/arch/arm/boot/dts/dra7-l4.dtsi index fe9f0bc29fec..2bd750c95328 100644 --- a/arch/arm/boot/dts/dra7-l4.dtsi +++ b/arch/arm/boot/dts/dra7-l4.dtsi @@ -3122,6 +3122,59 @@ phys = <&phy_gmii_sel 2>; }; }; + + mac_sw: ethernet_switch@0 { + compatible = "ti,dra7-cpsw-switch","ti,cpsw-switch"; + reg = <0x0 0x4000>; + ranges = <0 0 0x4000>; + clocks = <&gmac_main_clk>; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <1>; + syscon = <&scm_conf>; + status = "disabled"; + + interrupts = , + , + , + ; + interrupt-names = "rx_thresh", "rx", "tx", "misc"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + cpsw_port1: port@1 { + reg = <1>; + ti,label = "port1"; + /* Filled in by U-Boot */ + mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1>; + }; + + cpsw_port2: port@2 { + reg = <2>; + ti,label = "port2"; + /* Filled in by U-Boot */ + mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2>; + }; + }; + + davinci_mdio_sw: mdio@1000 { + compatible = "ti,cpsw-mdio","ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "davinci_mdio"; + bus_freq = <1000000>; + reg = <0x1000 0x100>; + }; + + cpts { + clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 25>; + clock-names = "cpts"; + }; + }; }; }; };