public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Pavel Machek <pavel@ucw•cz>
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
Subject: Re: [PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver
Date: Fri, 15 Dec 2017 09:54:38 +0100	[thread overview]
Message-ID: <20171215085438.GB929@lunn.ch> (raw)
In-Reply-To: <20171214211220.GB31098@amd>

> > 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

      reply	other threads:[~2017-12-15  8:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17  2:43 [PATCH net-next 0/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver Tristram.Ha
2017-11-17  2:43 ` [PATCH net-next 1/1] " Tristram.Ha
2017-11-20 10:56   ` Pavel Machek
2017-12-05 22:16     ` Tristram.Ha
2017-12-05 22:23       ` Pavel Machek
2017-12-05 23:29         ` Tristram.Ha
2017-12-07 21:04       ` Pavel Machek
2017-12-09  3:55         ` Tristram.Ha
2017-12-14 21:12           ` Pavel Machek
2017-12-15  8:54             ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171215085438.GB929@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=Tristram.Ha@microchip$(echo .)com \
    --cc=UNGLinuxDriver@microchip$(echo .)com \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=muvarov@gmail$(echo .)com \
    --cc=nathan.leigh.conrad@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pavel@ucw$(echo .)cz \
    --cc=vivien.didelot@savoirfairelinux$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox