From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932442AbcIMTKZ (ORCPT ); Tue, 13 Sep 2016 15:10:25 -0400 Received: from nbd.name ([46.4.11.11]:42625 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755214AbcIMTKY (ORCPT ); Tue, 13 Sep 2016 15:10:24 -0400 Subject: Re: [PATCH 3/3] net-next: dsa: add new driver for qca8xxx family To: Andrew Lunn , Vivien Didelot References: <1473669337-21221-1-git-send-email-john@phrozen.org> <1473669337-21221-4-git-send-email-john@phrozen.org> <20160913012304.GC3585@lunn.ch> <5c028659-db7e-9a98-7ec1-1e2d19d135f9@phrozen.org> <20160913131408.GE15332@lunn.ch> <87twdjafmr.fsf@ketchup.mtl.sfl> <20160913190708.GA26181@lunn.ch> Cc: "David S. Miller" , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, qsdk-review@qca.qualcomm.com From: John Crispin Message-ID: Date: Tue, 13 Sep 2016 21:10:19 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160913190708.GA26181@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/09/2016 21:07, Andrew Lunn wrote: >> Since the former alternative is prefered, we may want to remove the >> latter soon from DSA. If this phy_port_map is needed for that case, it'd >> be preferable not to add it. > > O.K, so maybe we should solve it the device tree way: > > > &mdio0 { > phy_port1: phy@0 { > reg = <0>; > }; > > phy_port2: phy@1 { > reg = <1>; > }; > > phy_port3: phy@2 { > reg = <2>; > }; > > phy_port4: phy@3 { > reg = <3>; > }; > > phy_port5: phy@4 { > reg = <4>; > }; > > switch@0 { > compatible = "qca,qca8337"; > > #address-cells = <1>; > #size-cells = <0>; > reg = <30>; > > ports { > port@11 { > reg = <11>; > label = "cpu"; > ethernet = <&gmac1>; > phy-mode = "rgmii"; > }; > > port@1 { > reg = <1>; > label = "lan1"; > phy-handle = <&phy_port1>; > }; > > port@2 { > reg = <2>; > label = "lan2"; > phy-handle = <&phy_port2>; > }; > > port@3 { > reg = <3>; > label = "lan3"; > phy-handle = <&phy_port3>; > }; > > port@4 { > reg = <4>; > label = "lan4"; > phy-handle = <&phy_port4>; > }; > }; > }; > }; > > and remove the phy_read() and phy_write() functions. > > > Andrew > Hi Andrew ok, will give it a spin in the morning and add a note to the binding doc explaining this. thanks for taking the time ! John