Subject: Re: Micrel KSZ8031 - phy link missing

From: Angelo Dureghello <[email-masked]>
Date: Fri, 10 Oct 2014 12:54:02 +0200

Dear Thomsen,

thanks for the prompt help,
well i am setting up that clock pin in my board.c, as

#define DA850_EVM_PHY_ID        "davinci_mdio-0:00"
#define DA850_MII_MDIO_CLKEN_PIN    GPIO_TO_PIN(2, 6)

  ret = davinci_cfg_reg(DA850_GPIO2_6);
     if (ret)
         pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);

     ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
     if (ret) {
         pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN);
         return ret;
     }

     /* Enable/Disable MII MDIO clock */
     gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);

Probably it's me that i am doing something illegal, i explain:

I am moving from a 3.5.1 to a 3.17 kernel, but have a special board.c 
startup file i cannot convert into DT easily.
So i am booting using old way (board.c).
Now, new kernels have "pinctrl" that probably jump over my gpio setting 
later in the boot, is it possible ?

Thanks
Angelo

On 10/10/2014 12:31, Bruno Thomsen wrote:
> Hey
>
>> i still have the issue after patching kernel 3.17.
>> ...
>> I am using RMII in my custom board, don't know if it makes any difference.
> What RMII clock source do you use? MAC, PHY or external?
>
> If your MAC output the RMII clock you need to enable MICREL_PHY_50MHZ_CLK flag in phydev->dev_flags.
>
>
> Venlig hilsen / Best regards
>
> Kamstrup A/S <http://www.kamstrup.dk>
> Bruno Thomsen
> Development engineer
> Technology
>
> Kamstrup A/S
> Industrivej 28
> DK-8660 Skanderborg
> Tel:	 +45 89 93 10 00	
> Fax:	 +45 89 93 10 01	
> Dir:	 +45 89 93 13 94	
> E-mail:	 [email-masked]	
> Web:	 www.kamstrup.dk