From: Andrew Lunn Subject: Re: [PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver Date: Fri, 15 Dec 2017 09:54:38 +0100 Message-ID: <20171215085438.GB929@lunn.ch> References: <1510886597-5666-1-git-send-email-Tristram.Ha@microchip.com> <1510886597-5666-2-git-send-email-Tristram.Ha@microchip.com> <20171120105609.GA4460@amd> <93AF473E2DA327428DE3D46B72B1E9FD4113DCE0@CHN-SV-EXMX02.mchp-main.com> <20171207210448.GA16614@amd> <93AF473E2DA327428DE3D46B72B1E9FD4113EACE@CHN-SV-EXMX02.mchp-main.com> <20171214211220.GB31098@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tristram.Ha@microchip.com, f.fainelli@gmail.com, muvarov@gmail.com, nathan.leigh.conrad@gmail.com, vivien.didelot@savoirfairelinux.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org To: Pavel Machek Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:33688 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754674AbdLOIyp (ORCPT ); Fri, 15 Dec 2017 03:54:45 -0500 Content-Disposition: inline In-Reply-To: <20171214211220.GB31098@amd> Sender: netdev-owner@vger.kernel.org List-ID: > > I also have a simple utility to communicate with that registers file to read/write > > register individually. Is there a standard Linux utility for that > > function? > > I don't think standard utility exists. Binary file which can be > written by userspace shoudl be enough. mii-tool will allow you to read PHY registers. The kernel API it uses allows you to read any register on the MDIO bus. > spi@0 { > compatible = "microchip,ksz8895"; > ... > ports { > port@4 { > reg = <4>; > label = "cpu"; > ethernet = <&mac0>; > fixed-link { > speed = <100>; > full-duplex; > }; > }; > }; > }; > > On one side, and > > mac0: ethernet@800f0000 { > phy-mode = "rmii"; > status = "okay"; > fixed-link { > speed = <100>; > full-duplex; > }; > }; Are the MAC connected back-to-back, or do you have PHYs in the middle? mac0 you have phy-mode = "rmii";. You can put the same in the port@4, but i don't know if the driver looks for it, and configures the MAC as needed. Andrew