public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 0/9] separate miiphy from ethernet
Date: Wed, 23 Jan 2013 15:35:22 -0700	[thread overview]
Message-ID: <510065AA.9070609@boundarydevices.com> (raw)
In-Reply-To: <50FFA3EE.4040707@denx.de>

On 1/23/2013 1:48 AM, Stefano Babic wrote:
> On 23/01/2013 00:48, Troy Kisky wrote:
>> On 11/10/2012 12:28 AM, Stefano Babic wrote:
>>> I have also a general question : it seems to me that the interface for
>>> PHY is set always to RMII - what about boards using MII ?
>>>
>>> Best regards,
>>> Stefano Babic
>>>
This was the patch I was thinking of....


On 4/19/2012 1:55 AM, Timo Ketola wrote:
> Gasket needs a different configuration for 10BaseT than for higher
> speeds.
>
> Signed-off-by: Timo Ketola<timo@exertus.fi>
> ---
>
> Changes in v4:
> - Rewrapped commit message
>
> Changes in v2:
> - Dropped patches 2 and 3 so this one changed from 5 to 3
> - Rebased to u-boot-imx next
> - Removed the remove of 'miiphy_duplex' call
> - Changed 'speed == _100BASET' to 'speed != _10BASET' to not to break
>      _1000BASET
> - Changed configuration option to put gasket into RMII mode from
>      !CONFIG_MII to CONFIG_RMII. I'm not too sure how this should be
>      done though. !CONFIG_MII is normally used for this but its original
>      purpose was to enable MII *management* interface, I think...
>
>   drivers/net/fec_mxc.c |   43 
> ++++++++++++++++++++++++-------------------
>   1 files changed, 24 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 824a199..48a69d4 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -440,6 +440,22 @@ static int fec_open(struct eth_device *edev)
>        */
>       writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_ETHER_EN,
>           &fec->eth->ecntrl);
> +#ifdef CONFIG_PHYLIB
> +    if (!fec->phydev)
> +        fec_eth_phy_config(edev);
> +    if (fec->phydev) {
> +        /* Start up the PHY */
> +        phy_startup(fec->phydev);
> +        speed = fec->phydev->speed;
> +    } else {
> +        speed = _100BASET;
> +    }
> +#else
> +    miiphy_wait_aneg(edev);
> +    speed = miiphy_speed(edev->name, fec->phy_id);
> +    miiphy_duplex(edev->name, fec->phy_id);
> +#endif
> +
>   #if defined(CONFIG_MX25) || defined(CONFIG_MX53)
>       udelay(100);
>       /*
> @@ -453,9 +469,14 @@ static int fec_open(struct eth_device *edev)
>       while (readw(&fec->eth->miigsk_enr)& MIIGSK_ENR_READY)
>           udelay(2);
>
> -#if !defined(CONFIG_MII)
> -    /* configure gasket for RMII, 50 MHz, no loopback, and no echo */
> - writew(MIIGSK_CFGR_IF_MODE_RMII,&fec->eth->miigsk_cfgr);
> +#if defined(CONFIG_RMII)
> +    if (speed != _10BASET)
> +        /* configure gasket for RMII, 50MHz, no loopback, and no echo */
> + writew(MIIGSK_CFGR_IF_MODE_RMII,&fec->eth->miigsk_cfgr);
> +    else
> +        /* configure gasket for RMII, 5MHz, no loopback, and no echo */
> +        writew(MIIGSK_CFGR_IF_MODE_RMII | MIIGSK_CFGR_FRCONT,
> +                &fec->eth->miigsk_cfgr);
>   #else
>       /* configure gasket for MII, no loopback, and no echo */
> writew(MIIGSK_CFGR_IF_MODE_MII,&fec->eth->miigsk_cfgr);
> @@ -474,22 +495,6 @@ static int fec_open(struct eth_device *edev)
>       }
>   #endif
>

Can you fix 10BASET for non-reduced pin count boards as well?

Thanks
Troy

  parent reply	other threads:[~2013-01-23 22:35 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 22:48 [U-Boot] [PATCH V1 1/3] phy: add phy_connect_by_mask Troy Kisky
2012-08-20 22:48 ` [U-Boot] [PATCH V1 2/3] fec_mxc: use phy_connect_by_mask Troy Kisky
2012-08-20 22:48 ` [U-Boot] [PATCH V1 3/3] mx6qsabrelite: set CONFIG_FEC_MXC_PHYMASK Troy Kisky
2012-08-20 23:07 ` [U-Boot] [PATCH V1 1/3] phy: add phy_connect_by_mask Troy Kisky
2012-08-21  0:35   ` Andy Fleming
2012-08-22 19:59     ` Troy Kisky
2012-08-22 20:40       ` Andy Fleming
2012-08-22 20:50         ` Joe Hershberger
2012-08-22 21:21         ` Troy Kisky
2012-09-26 17:26           ` Joe Hershberger
2012-09-26 17:47             ` Troy Kisky
2012-08-22 20:11     ` Eric Nelson
2012-08-22 20:50       ` Andy Fleming
2012-08-22 20:56         ` Eric Nelson
2012-10-23  2:40 ` [U-Boot] [PATCH V3 0/9] separate miiphy from ethernet Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 1/9] doc/README.fec_mxc: add documentation Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 2/9] net: fec_mxc: delete CONFIG_FEC_MXC_MULTI Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 3/9] net: fec_mxc: change fec_mii_setspeed parameter Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 4/9] net: fec_mxc: have fecmxc_initialize call fecmxc_initialize_multi Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 5/9] phy: add phy_find_by_mask/phy_connect_dev Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 6/9] net: fec_mxc: use fec_set_dev_name to set name Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 7/9] net: fec_mxc: only call phy_connect in fec_probe Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 8/9] net: fec_mxc: get phydev before fec_probe Troy Kisky
2012-10-23  2:40   ` [U-Boot] [PATCH V3 9/9] mx6qsabrelite: search mii phy address 4-7 Troy Kisky
2012-11-10  7:28   ` [U-Boot] [PATCH V3 0/9] separate miiphy from ethernet Stefano Babic
2013-01-22 23:48     ` Troy Kisky
2013-01-23  8:48       ` Stefano Babic
2013-01-23 19:06         ` Troy Kisky
2013-01-24  9:09           ` Stefano Babic
2013-01-23 22:35         ` Troy Kisky [this message]
2013-01-03 22:00   ` Troy Kisky
2013-01-28  6:00   ` Stefano Babic

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=510065AA.9070609@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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