From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754510AbdCMTYu (ORCPT ); Mon, 13 Mar 2017 15:24:50 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:24583 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbdCMTY2 (ORCPT ); Mon, 13 Mar 2017 15:24:28 -0400 Subject: Re: [PATCH 2/2] ARM: dts: am335x-icev2: Add CPSW ethernet0 and ethernet1 To: Roger Quadros , , References: <1489412554-2054-1-git-send-email-rogerq@ti.com> <1489412554-2054-3-git-send-email-rogerq@ti.com> CC: , , , , From: Grygorii Strashko Message-ID: <51a2471f-dace-6d8b-b198-9bd5efe41387@ti.com> Date: Mon, 13 Mar 2017 14:24:21 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1489412554-2054-3-git-send-email-rogerq@ti.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.83.96] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13/2017 08:42 AM, Roger Quadros wrote: > Enable the 2 ethernet ports as CPSW ports in dual-mac mode > > Signed-off-by: Roger Quadros > [nsekhar@ti.com: use AM33XX_IOPAD()] > Signed-off-by: Sekhar Nori > --- > arch/arm/boot/dts/am335x-icev2.dts | 113 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 113 insertions(+) > > diff --git a/arch/arm/boot/dts/am335x-icev2.dts b/arch/arm/boot/dts/am335x-icev2.dts > index a2ad076..cc343b0 100644 > --- a/arch/arm/boot/dts/am335x-icev2.dts > +++ b/arch/arm/boot/dts/am335x-icev2.dts > @@ -201,6 +201,69 @@ > AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLUP | MUX_MODE1) /* (L16) gmii1_rxd2.uart3_txd */ > >; > }; > + > > &i2c0 { > @@ -350,3 +413,53 @@ > pinctrl-0 = <&uart3_pins_default>; > status = "okay"; > }; > + > +&gpio3 { > + p4 { > + gpio-hog; > + gpios = <4 GPIO_ACTIVE_HIGH>; > + output-high; > + line-name = "PR1_MII_CTRL"; > + }; > + > + p10 { > + gpio-hog; > + gpios = <10 GPIO_ACTIVE_HIGH>; > + /* ETH1 mux: Low for MII-PRU, high for RMII-CPSW */ > + output-high; > + line-name = "MUX_MII_CTL1"; > + }; > +}; > + > +&cpsw_emac0 { > + phy_id = <&davinci_mdio>, <1>; this is deprecated definition. pls, use phy-handle. > + phy-mode = "rmii"; > + dual_emac_res_vlan = <1>; > +}; > + > +&cpsw_emac1 { > + phy_id = <&davinci_mdio>, <3>; same > + phy-mode = "rmii"; > + dual_emac_res_vlan = <2>; > +}; > + > +&mac { > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&cpsw_default>; > + pinctrl-1 = <&cpsw_sleep>; > + status = "okay"; > + dual_emac; > +}; > + > +&phy_sel { > + rmii-clock-ext; > +}; > + > +&davinci_mdio { > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&davinci_mdio_default>; > + pinctrl-1 = <&davinci_mdio_sleep>; > + status = "okay"; > + reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; > + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ > +}; > -- regards, -grygorii