summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorFlorinel Iordache <florinel.iordache@nxp.com>2020-03-16 15:36:02 +0200
committerPriyanka Jain <priyanka.jain@nxp.com>2020-04-20 13:35:11 +0530
commite174fb7061e7a3f1996f57eb36525c51dd87b5a3 (patch)
tree2df2e269a51f1fdb4c8934cc09e1e15201a83c1b /board
parentd4694ad86a330a1eb5e78c7a3784c5388eee1435 (diff)
t208xqds: add support for backplane kr
Add support for backplane kr on t208xqds: remove board specific fixups on t208xqds for ethernet interfaces specified in device tree as supported backplane modes. Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/t208xqds/eth_t208xqds.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index 23b59bcc09..697c23b038 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2013 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
*
* Shengzhou Liu <Shengzhou.Liu@freescale.com>
*/
@@ -200,6 +201,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
char buf[32] = "serdes-1,";
struct fixed_link f_link;
int media_type = 0;
+ const char *phyconn;
int off;
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
@@ -412,15 +414,24 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
}
if (!media_type) {
- /* fixed-link is used for XFI fiber cable */
- f_link.phy_id = port;
- f_link.duplex = 1;
- f_link.link_speed = 10000;
- f_link.pause = 0;
- f_link.asym_pause = 0;
- fdt_delprop(fdt, offset, "phy-handle");
- fdt_setprop(fdt, offset, "fixed-link", &f_link,
- sizeof(f_link));
+ phyconn = fdt_getprop(fdt, offset,
+ "phy-connection-type",
+ NULL);
+ if (is_backplane_mode(phyconn)) {
+ /* Backplane KR mode: skip fixups */
+ printf("Interface %d in backplane KR mode\n",
+ port);
+ } else {
+ /* fixed-link for XFI fiber cable */
+ f_link.phy_id = port;
+ f_link.duplex = 1;
+ f_link.link_speed = 10000;
+ f_link.pause = 0;
+ f_link.asym_pause = 0;
+ fdt_delprop(fdt, offset, "phy-handle");
+ fdt_setprop(fdt, offset, "fixed-link",
+ &f_link, sizeof(f_link));
+ }
} else {
/* set property for copper cable */
off = fdt_node_offset_by_compat_reg(fdt,