From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2
Date: Mon, 21 Mar 2016 21:56:36 +0100 [thread overview]
Message-ID: <56F06004.5000309@redhat.com> (raw)
In-Reply-To: <20160321173000.GD4751@excalibur.cnev.de>
Hi,
On 21-03-16 18:30, Karsten Merker wrote:
> On Mon, Mar 21, 2016 at 04:47:15PM +0100, Karsten Merker wrote:
>> On Sun, Mar 20, 2016 at 07:51:20PM +0100, Hans de Goede wrote:
>>> On 20-03-16 16:28, Michael Haas wrote:
>>>> On 03/20/2016 02:45 PM, Hans de Goede wrote:
>>>>> On 19-03-16 14:40, Michael Haas wrote:
>
>>>>>> 0xA was set to 7800 for working runs and 3800 for broken runs. The
>>>>>> difference is bit 14 in the GBSR: 'MASTER/SLAVE Configuration
>>>>>> Resolution'. In the broken runs, the autonegotation configured the
>>>>>> OlinuXino to 'slave'. I have whipped up a quick patch which disable the
>>>>>> master/slave part of the autonegotiation and force master mode.
>
>>>>>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>>>>>> index 51b5746..484b2be 100644
>>>>>> --- a/drivers/net/phy/phy.c
>>>>>> +++ b/drivers/net/phy/phy.c
>>>>>> @@ -170,6 +170,7 @@ int genphy_restart_aneg(struct phy_device *phydev)
>>>>>> int genphy_config_aneg(struct phy_device *phydev)
>>>>>> {
>>>>>> int result;
>>>>>> + phy_write(phydev, MDIO_DEVAD_NONE, 0x09, 0x1A00);
>>>>>>
>>>>>> if (AUTONEG_ENABLE != phydev->autoneg)
>>>>>> return genphy_setup_forced(phydev);
>>>>>>
>
>>>> I was going to add that in realtek.c, not in phy.c - as soon as I figure
>>>> out which section there is applicable.
>
> Unfortunately the issue is now split over two threads - this one and the
> "Which entry in drivers/net/phy/realtek.c matches my device?" thread.
>
> It looks like we have three related but separate issues here:
>
> a) The sunxi config doesn't actually build the phy drivers:
>
> include/configs/sunxi-common.h contains:
>
> 302 /* Ethernet support */
> 303 #ifdef CONFIG_SUNXI_EMAC
> 304 #define CONFIG_PHY_ADDR 1
> 305 #define CONFIG_MII /* MII PHY management */
> 306 #define CONFIG_PHYLIB
> 307 #endif
> 308
> 309 #ifdef CONFIG_SUNXI_GMAC
> 310 #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */
> 311 #define CONFIG_PHY_ADDR 1
> 312 #define CONFIG_MII /* MII PHY management */
> 313 #endif
>
> For the sunxi EMAC case (which is AFAIK only used on A10/A13)
> CONFIG_PHYLIB is enabled, but for the CONFIG_SUNXI_GMAC case (all
> other sunxi-based systems) we don't enable any PHY driver.
We do enable phylib for gmac based systems, we have CONFIG_ETH_DESIGNWARE=y
in defconfigs using GMAC and drivers/net/Kconfig has:
config ETH_DESIGNWARE
bool "Synopsys Designware Ethernet MAC"
select PHYLIB
We do however only enable the generic (vendor neutral phy) phylib support
and not any vendor specific drivers, I've a commit in my tree enabling
realtek phy support.
https://github.com/jwrdegoede/u-boot-sunxi/commit/8121866aa55b010d31fe75c1eb5d2372c1e27a62
So it looks like a) is already covered :)
> So we
> either need to enable CONFIG_PHYLIB for CONFIG_SUNXI_GMAC as well
> or enable the relevant PHY drivers (do we actually have anything
> besides realtek on sunxi-based systems?) separately, i.e.
> something like
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index b26363d..ea15e37 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -310,6 +310,7 @@ extern int soft_i2c_gpio_scl;
> #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */
> #define CONFIG_PHY_ADDR 1
> #define CONFIG_MII /* MII PHY management */
> +#define CONFIG_PHY_REALTEK
> #endif
>
> #ifdef CONFIG_USB_EHCI_HCD
>
>
> b) The realtek PHY driver (drivers/net/phy/realtek.c) doesn't match
> on the RTL8211CL PHY ID, so even if it is compiled in, it still
> doesn't work. For more details on this issue, see the "Which entry
> in drivers/net/phy/realtek.c matches my device?" thread.
>
>
> c) The master/slave mode problem that can be worked around by forcing
> master mode on the RTL8211CL.
Regards,
Hans
next prev parent reply other threads:[~2016-03-21 20:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 5:41 [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2 Michael Haas
[not found] ` <20160315180914.GA1878@excalibur.cnev.de>
2016-03-15 20:41 ` Tom Rini
2016-03-16 8:32 ` Michael Haas
2016-03-16 9:29 ` Hans de Goede
2016-03-16 10:53 ` Hans de Goede
[not found] ` <20160316203642.GC1817@excalibur.cnev.de>
2016-03-17 5:28 ` Michael Haas
2016-03-17 10:52 ` Hans de Goede
2016-03-17 21:53 ` Michael Haas
2016-03-18 7:41 ` Hans de Goede
[not found] ` <20160318190220.GC1815@excalibur.cnev.de>
2016-03-18 19:06 ` Michael Haas
2016-03-20 8:36 ` Michael Haas
2016-03-20 10:05 ` François-David Collin
2016-03-18 20:32 ` Michael Haas
2016-03-18 21:53 ` Michael Haas
2016-03-19 8:39 ` François-David Collin
2016-03-19 9:32 ` Hans de Goede
2016-03-19 9:35 ` Michael Haas
2016-03-19 9:45 ` Michael Haas
2016-03-19 13:40 ` Michael Haas
2016-03-19 14:35 ` François-David Collin
2016-03-20 13:45 ` Hans de Goede
2016-03-20 15:28 ` Michael Haas
2016-03-20 18:51 ` Hans de Goede
[not found] ` <20160321154714.GA4751@excalibur.cnev.de>
2016-03-21 18:57 ` Michael Haas
2016-03-21 20:59 ` Hans de Goede
2016-03-21 21:01 ` Hans de Goede
2016-03-21 21:47 ` Michael Haas
2016-03-21 22:00 ` Hans de Goede
2016-03-22 5:12 ` Michael Haas
2016-03-22 8:46 ` Peter Korsgaard
2016-03-22 8:57 ` Hans de Goede
2016-03-22 9:01 ` Michael Haas
2016-03-22 9:50 ` Peter Korsgaard
[not found] ` <20160321173000.GD4751@excalibur.cnev.de>
2016-03-21 20:56 ` Hans de Goede [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-18 17:33 François-David Collin
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=56F06004.5000309@redhat.com \
--to=hdegoede@redhat.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