From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 17/31] Enable XAUI interface for B4860QDS
Date: Fri, 22 Mar 2013 10:29:15 -0700 [thread overview]
Message-ID: <1363973369-26110-17-git-send-email-yorksun@freescale.com> (raw)
In-Reply-To: <1363973369-26110-1-git-send-email-yorksun@freescale.com>
From: Suresh Gupta <suresh.gupta@freescale.com>
- Added SERDES2 PRTCLs = 0x98, 0x9E
- Default Phy Addresses for Teranetics PHY on XAUI card
The PHY addresses of Teranetics PHY on XAUI riser card are assigned
based on the slot it is in. Switches SW4[2:4] and SW6[2:4] on
AMC2PEX-2S On B4860QDS, AMC2PEX card decide the PHY addresses on slot1
and slot2
- Configure MDIO for 10Gig Mac
Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
---
board/freescale/b4860qds/eth_b4860qds.c | 38 +++++++++++++++++++++++++++++++
drivers/net/fm/b4860.c | 4 +++-
include/configs/B4860QDS.h | 6 ++++-
3 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/board/freescale/b4860qds/eth_b4860qds.c b/board/freescale/b4860qds/eth_b4860qds.c
index 68e2725..0e151dd 100644
--- a/board/freescale/b4860qds/eth_b4860qds.c
+++ b/board/freescale/b4860qds/eth_b4860qds.c
@@ -275,6 +275,27 @@ int board_eth_init(bd_t *bis)
fm_info_set_phy_address(FM1_DTSEC4,
CONFIG_SYS_FM1_DTSEC2_RISER_PHY_ADDR);
break;
+ case 0x98:
+ /* XAUI in Slot1 and Slot2 */
+ debug("Setting phy addresses on B4860 QDS AMC2PEX-2S"
+ "for FM1_10GEC1: %x\n",
+ CONFIG_SYS_FM1_10GEC1_PHY_ADDR);
+ fm_info_set_phy_address(FM1_10GEC1,
+ CONFIG_SYS_FM1_10GEC1_PHY_ADDR);
+ debug("Setting phy addresses on B4860 QDS AMC2PEX-2S"
+ "for FM1_10GEC2: %x\n",
+ CONFIG_SYS_FM1_10GEC2_PHY_ADDR);
+ fm_info_set_phy_address(FM1_10GEC2,
+ CONFIG_SYS_FM1_10GEC2_PHY_ADDR);
+ break;
+ case 0x9E:
+ /* XAUI in Slot2 */
+ debug("Setting phy addresses on B4860 QDS AMC2PEX-2S"
+ "for FM1_10GEC2: %x\n",
+ CONFIG_SYS_FM1_10GEC2_PHY_ADDR);
+ fm_info_set_phy_address(FM1_10GEC2,
+ CONFIG_SYS_FM1_10GEC2_PHY_ADDR);
+ break;
default:
printf("Fman: Unsupported SerDes2 Protocol 0x%02x\n",
serdes2_prtcl);
@@ -300,6 +321,23 @@ int board_eth_init(bd_t *bis)
}
}
+ for (i = FM1_10GEC1; i < FM1_10GEC1 + CONFIG_SYS_NUM_FM1_10GEC; i++) {
+ int idx = i - FM1_10GEC1;
+
+ switch (fm_info_get_enet_if(i)) {
+ case PHY_INTERFACE_MODE_XGMII:
+ fm_info_set_mdio(i,
+ miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME));
+ break;
+ default:
+ printf("Fman1: 10GSEC%u set to unknown interface %i\n",
+ idx + 1, fm_info_get_enet_if(i));
+ fm_info_set_phy_address(i, 0);
+ break;
+ }
+ }
+
+
cpu_eth_init(bis);
#endif
diff --git a/drivers/net/fm/b4860.c b/drivers/net/fm/b4860.c
index 8cde7af..a247ccc 100644
--- a/drivers/net/fm/b4860.c
+++ b/drivers/net/fm/b4860.c
@@ -55,8 +55,10 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
if (is_device_disabled(port))
return PHY_INTERFACE_MODE_NONE;
+ /*B4860 has two 10Gig Mac*/
if ((port == FM1_10GEC1 || port == FM1_10GEC2)
- && (is_serdes_configured(XAUI_FM1)))
+ && ((is_serdes_configured(XAUI_FM1_MAC9))
+ || (is_serdes_configured(XAUI_FM1_MAC10))))
return PHY_INTERFACE_MODE_XGMII;
/* Fix me need to handle RGMII here first */
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 00ee5ac..22cd808 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -646,7 +646,11 @@ unsigned long get_board_ddr_clk(void);
#ifdef CONFIG_FMAN_ENET
#define CONFIG_SYS_FM1_DTSEC5_PHY_ADDR 0x10
#define CONFIG_SYS_FM1_DTSEC6_PHY_ADDR 0x11
-#define CONFIG_SYS_FM1_10GEC1_PHY_ADDR 4
+
+/*B4860 QDS AMC2PEX-2S default PHY_ADDR */
+#define CONFIG_SYS_FM1_10GEC1_PHY_ADDR 0x7 /*SLOT 1*/
+#define CONFIG_SYS_FM1_10GEC2_PHY_ADDR 0x6 /*SLOT 2*/
+
#define CONFIG_SYS_FM1_DTSEC1_RISER_PHY_ADDR 0x1c
#define CONFIG_SYS_FM1_DTSEC2_RISER_PHY_ADDR 0x1d
--
1.7.9.5
next prev parent reply other threads:[~2013-03-22 17:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 17:28 [U-Boot] [PATCH 01/31] 83xx/pcie: fix build error for 83xx pcie York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 02/31] Enable L2 cache parity/ECC error checking York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 03/31] net/phy: fix select line for TN80xx York Sun
2013-03-22 20:59 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 04/31] powerpc/mpc85xx: check if core is disabled for showing status York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 05/31] powerpc/t4240qds: Add VDD override York Sun
2013-03-22 21:00 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 06/31] T4240/ramboot: enable PBL tool for T4240 York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 07/31] Add e6500 L2 replacement policy selection York Sun
2013-03-22 21:00 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 08/31] powerpc/p5040: enable NAND, SD, SPI boot support York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 09/31] powerpc/T4160: Merge T4160 and T4240 in config_mpc85xx.h York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 10/31] powerpc/mpc8xxx: Add T1040 and variant SoCs York Sun
2013-03-22 21:00 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 11/31] powerpc/chassis2: Change core numbering scheme York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 12/31] powerpc/mpc8xxx: Allow DDR overclock York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 13/31] powerpc/qixis: add clock measurement registers York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 14/31] powerpc/t4qds: use clock measurement for sysclk and ddr clock York Sun
2013-03-22 21:01 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 15/31] powerpc/p5040: enable PBL tool support York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 16/31] board/t4240qds, b4860qds: LAW/TLB for DCSR set to size 32M York Sun
2013-03-22 17:29 ` York Sun [this message]
2013-03-22 21:02 ` [U-Boot] [PATCH 17/31] Enable XAUI interface for B4860QDS Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 18/31] powerpc/t4qds: Add SW7[4] in the DIP switch display York Sun
2013-03-22 21:02 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 19/31] powerpc/t4qds: Enable master module for Boot from SRIO and PCIE York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 20/31] powerpc/t4qds: Slave module for boot " York Sun
2013-03-22 21:02 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 21/31] powerpc/t4240qds: fix PHY reset timeout issue York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 22/31] powerpc/doc: Fix the misalignment of document README.srio-pcie-boot-corenet York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 23/31] powerpc/b4860: fix for Serdes connectivity to SFP's York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 24/31] powerpc/mpc85xx: add setting of clock-frequency for mpic node York Sun
2013-03-22 21:03 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 25/31] powerpc/p2041: fix serdes reference clock frequency display for PC board York Sun
2013-03-22 21:03 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 26/31] sf: spansion: Add support for S25FL128S York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 27/31] powerpc/B4: Merge B4420 and B4860 in config_mpc85xx.h York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 28/31] powerpc/p5040: fix mdio mux for 10G port York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 29/31] powerpc/usb: Fix usb device-tree fix-up York Sun
2013-03-22 21:04 ` Wolfgang Denk
2013-03-22 17:29 ` [U-Boot] [PATCH 30/31] fman/mEMAC: set SETSP bit in IF_MODE regisgter for RGMII speed York Sun
2013-03-22 17:29 ` [U-Boot] [PATCH 31/31] powerpc/b4860qds: Add LAW Target ID and Create LAW entry for Maple York Sun
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=1363973369-26110-17-git-send-email-yorksun@freescale.com \
--to=yorksun@freescale.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