All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] AM335x Ethernet pin mux confusion
Date: Mon, 24 Nov 2014 14:27:26 -0000	[thread overview]
Message-ID: <00bb01d007f2$ca728fd0$5f57af70$@pont@sdcsystems.com> (raw)

Hello,

I am working on porting U-Boot 2014.07 to a custom TI AM3354 based hardware
platform and am confused trying to set the pin mux for the two Ethernet
interfaces that are on the board.  

RGMII1_ pins are connected to an ATHEROS AR8031 PHY (PHY ADDR 04) and the
pins GPMC_A0 .. GPMC_A11 are connected to a Micrel KSZ8041NL (PHY ADDR 01).
The output of the "mii info" command looks OK so the MDIO interface looks to
be OK as it gives:

PHY 0x00: OUI = 0x0885, Model = 0x11, Rev = 0x03,  10baseT, HDX
PHY 0x01: OUI = 0x0885, Model = 0x11, Rev = 0x03,  10baseT, HDX
PHY 0x04: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, FDX

However, with debug enabled, it is reporting the PHYs incorrectly as it
gives:

cpsw connected to Micrel KSZ804
cpsw connected to Micrel KSZ804
cpsw

The AR8031 provides a connection to the outside world and the KSZ8041
connects to an Ethernet switch which then connects on to other devices on
the board to form a private network.  The DHCP command just sits in a loop
waiting for PHY auto negotiation to complete but timing out!

In the SPL code I am setting up the pin mux as follows:

static struct module_pin_mux rgmii1_pin_mux[] = {
	{OFFSET(mii1_txen), MODE(2)},			/* RGMII1_TCTL */
	{OFFSET(mii1_rxdv), MODE(2) | RXACTIVE},	/* RGMII1_RCTL */
	{OFFSET(mii1_txd3), MODE(2)},			/* RGMII1_TD3 */
	{OFFSET(mii1_txd2), MODE(2)},			/* RGMII1_TD2 */
	{OFFSET(mii1_txd1), MODE(2)},			/* RGMII1_TD1 */
	{OFFSET(mii1_txd0), MODE(2)},			/* RGMII1_TD0 */
	{OFFSET(mii1_txclk), MODE(2)},			/* RGMII1_TCLK */
	{OFFSET(mii1_rxclk), MODE(2) | RXACTIVE},	/* RGMII1_RCLK */
	{OFFSET(mii1_rxd3), MODE(2) | RXACTIVE},	/* RGMII1_RD3 */
	{OFFSET(mii1_rxd2), MODE(2) | RXACTIVE},	/* RGMII1_RD2 */
	{OFFSET(mii1_rxd1), MODE(2) | RXACTIVE},	/* RGMII1_RD1 */
	{OFFSET(mii1_rxd0), MODE(2) | RXACTIVE},	/* RGMII1_RD0 */
	{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN},  /* MDIO_DATA
*/
	{OFFSET(mdio_clk), MODE(0) | PULLUP_EN},	/* MDIO_CLK */
	{-1},
};

static struct module_pin_mux rmii2_pin_mux[] = {
	{OFFSET(gpmc_a0), MODE(2)},			/* RMII2_TXEN */
	{OFFSET(gpmc_a1), MODE(2) | RXACTIVE},		/* RMII2_RXDV */
	{OFFSET(gpmc_a2), MODE(2)},			/* RMII2_TXD3 */
	{OFFSET(gpmc_a3), MODE(2)},			/* RMII2_TXD2 */
	{OFFSET(gpmc_a4), MODE(2)},			/* RMII2_TXD1 */
	{OFFSET(gpmc_a5), MODE(2)},			/* RMII2_TXD0 */
	{OFFSET(gpmc_a6), MODE(2)},			/* RMII2_TXCLK */
	{OFFSET(gpmc_a7), MODE(2) | RXACTIVE},		/* RMII2_RXCLK */
	{OFFSET(gpmc_a8), MODE(2) | RXACTIVE},		/* RMII2_RXD3 */
	{OFFSET(gpmc_a9), MODE(2) | RXACTIVE},		/* RMII2_RXD2 */
	{OFFSET(gpmc_a10), MODE(2) | RXACTIVE},		/* RMII2_RXD1 */
	{OFFSET(gpmc_a11), MODE(2) | RXACTIVE},		/* RMII2_RXD0 */
	{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
	{OFFSET(mdio_clk), MODE(0) | PULLUP_EN},	/* MDIO_CLK */
	{-1},
};

Any help would be much appreciated?

Thanks,

Andy.

             reply	other threads:[~2014-11-24 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 14:27 Andy Pont [this message]
2014-11-25  6:24 ` [U-Boot] AM335x Ethernet pin mux confusion Mugunthan V N
2014-11-25 13:47   ` Andy Pont

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='00bb01d007f2$ca728fd0$5f57af70$@pont@sdcsystems.com' \
    --to=andy.pont@sdcsystems.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.