lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160621061603.GV9677@pengutronix.de>
Date:	Tue, 21 Jun 2016 08:16:03 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Andrew Lunn <andrew@...n.ch>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	netdev@...r.kernel.org, f.fainelli@...il.com, johan@...nel.org,
	bth@...strup.dk
Subject: Re: Micrel Phy KSZ8031 clock select setting in dts

On Mon, Jun 20, 2016 at 07:14:06PM +0200, Oliver Graute wrote:
> On 20/06/16, Andrew Lunn wrote:
> > > &fec1 {
> > > 	pinctrl-names = "default";
> > > 	pinctrl-0 = <&pinctrl_enet1>;
> > > 	phy-mode = "rmii";
> > > 	micrel,rmii-reference-clock-select-25-mhz;
> > > 	clocks,rmii-ref;
> > 
> > You are adding phy properties, not MAC properties. Please put them in
> > the phy node.
> 
> yes, you are right. I fixed this and added the clock like sascha and
> sergei proposed. (thx to you all)
> 
> my dts node now looks like this:
> 
> &fec1 {
> 	pinctrl-names = "default";
> 	pinctrl-0 = <&pinctrl_enet1>;
> 	phy-mode = "rmii";
> 	status = "okay";
> 
> 	mdio {
> 		#address-cells = <1>;
> 		#size-cells = <0>;
> 
> 		ethphy0: ethernet-phy@0 {
> 			compatible = "micrel,ksz8031";
> 			micrel,rmii-reference-clock-select-25-mhz;
> 			clocks = <&mdc>;
> 			clock-names = "rmii-ref";
> 			phy-handle = <&ethphy0>;
> 			reg = <0>;
> 		};
> 
> 	};
> 
> 	mdc: rmii-ref {
> 		#clock-cells = <0>;
> 		compatible ="fixed-clock";
> 		clock-frequency = <50000000>;
> 	};
> };

To make that clear: Which phy do you have: KSZ8031RNL or KSZ8031RNLI?
The former has 25MHz default input clock whereas the latter has 50MHz
default input clock.

I assume you have the KSZ8031RNL and use it with 50MHz (so the non
default case), hence you have to set the KSZPHY_RMII_REF_CLK_SEL bit.
The "micrel,rmii-reference-clock-select-25-mhz" means "Setting the bit
selects 25MHz" which is not the case here, so you have to remove the
property.
Could it be that your initial setting just did not work because of other
mistakes, like no correct clock?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ