Skip to contentSkip to conversation

boards/t1040qds: Adds ethernet support for T1040

PATCH New Prabhakar Kushwaha 2 participants 2 messages Jan 27, 2014 – Feb 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 boards/t1040qds: Adds ethernet support for T1040

Enable entherent for T1040QDS. It enables FM1 at DTSEC3, FM1 at DTSEC4, FM1 at DTSEC5
- Define MDIO related configs
- Added eth.c file
- Update t1040.c to support RGMII and SGMII
- Update t1040qds.c to support ethernet
- Define the PHY address

---
Changes for v2:
- Added missed sign off

 arch/powerpc/include/asm/immap_85xx.h |   11 +
 board/freescale/t1040qds/Makefile     |    1 +
 board/freescale/t1040qds/eth.c        |  492 +++++++++++++++++++++++++++++++++
 board/freescale/t1040qds/t1040qds.c   |    1 +
 drivers/net/fm/t1040.c                |   56 ++++
 include/configs/T1040QDS.h            |    5 +-
 6 files changed, 563 insertions(+), 3 deletions(-)
 create mode 100644 board/freescale/t1040qds/eth.c
arch/powerpc/include/asm/immap_85xx.h +11 -0
index 68c3c82..9d08321 100644
@@ -1759,6 +1759,17 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)
 #define FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT	24
 #define FSL_CORENET2_RCWSR4_SRDS2_PRTCL	0x00fe0000
 #define FSL_CORENET2_RCWSR4_SRDS2_PRTCL_SHIFT	17
+#define FSL_CORENET_RCWSR13_EC1	0x30000000 /* bits 418..419 */
+#define FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_RGMII	0x00000000
+#define FSL_CORENET_RCWSR13_EC1_FM1_GPIO	0x10000000
+#define FSL_CORENET_RCWSR13_EC1_FM1_DTSEC4_MII	0x20000000
+#define FSL_CORENET_RCWSR13_EC2	0x0c000000 /* bits 420..421 */
+#define FSL_CORENET_RCWSR13_EC2_FM1_DTSEC5_RGMII	0x00000000
+#define FSL_CORENET_RCWSR13_EC2_FM1_GPIO	0x10000000
+#define FSL_CORENET_RCWSR13_EC2_FM1_DTSEC5_MII	0x20000000
+#define FSL_CORENET_RCWSR13_MAC2_GMII_SEL	0x00000080
+#define FSL_CORENET_RCWSR13_MAC2_GMII_SEL_L2_SWITCH	0x00000000
+#define FSL_CORENET_RCWSR13_MAC2_GMII_SEL_ENET_PORT	0x80000000
 #elif defined(CONFIG_PPC_T2080) || defined(CONFIG_PPC_T2081)
 #define FSL_CORENET2_RCWSR4_SRDS1_PRTCL		0xff000000
 #define FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT	24
board/freescale/t1040qds/Makefile +1 -0
index 93af9eb..c7470d7 100644
@@ -9,3 +9,4 @@ obj-y	+= ddr.o
 obj-$(CONFIG_PCI)     += pci.o
 obj-y	+= law.o
 obj-y	+= tlb.o
+obj-y	+= eth.o
board/freescale/t1040qds/eth.c new file +492 -0

492 lines not on this page · raw message

board/freescale/t1040qds/t1040qds.c +1 -0
index de3ea5c..3dec447 100644
@@ -223,6 +223,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
 #ifdef CONFIG_SYS_DPAA_FMAN
 	fdt_fixup_fman_ethernet(blob);
+	fdt_fixup_board_enet(blob);
 #endif
 }
 
drivers/net/fm/t1040.c +56 -0

61 lines not on this page · raw message

include/configs/T1040QDS.h +2 -3
index 91b511b..bf22bec 100644
@@ -612,9 +612,8 @@ unsigned long get_board_ddr_clk(void);
 #endif
 
 #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
+#define CONFIG_SYS_FM1_DTSEC4_PHY_ADDR	0x01
+#define CONFIG_SYS_FM1_DTSEC5_PHY_ADDR	0x02
 
 #define CONFIG_SYS_FM1_DTSEC1_RISER_PHY_ADDR    0x1c
 #define CONFIG_SYS_FM1_DTSEC2_RISER_PHY_ADDR    0x1d
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 2/2 boards/t1040qds: Adds ethernet support for T1040

Quoted 13 lines · Prabhakar Kushwaha

Enable entherent for T1040QDS. It enables FM1 at DTSEC3, FM1 at DTSEC4, FM1 at DTSEC5
- Define MDIO related configs
- Added eth.c file
- Update t1040.c to support RGMII and SGMII
- Update t1040qds.c to support ethernet
- Define the PHY address

Quoted 4 lines

---
Changes for v2:
- Added missed sign off

Applied to u-boot-mpc85xx master branch.

York