[U-Boot] [U-boot] [Patch 2/5] net: keystone_serdes: add keystone K2E SoC support
Ivan Khoronzhuk
ivan.khoronzhuk at ti.com
Thu Oct 2 18:44:55 CEST 2014
Keystone2 Edison SoC uses the same keystone SerDes driver.
This patch adds support for K2E SoCs.
Acked-by: Vitaly Andrianov <vitalya at ti.com>
Acked-by: Murali Karicheri <m-karicheri2 at ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk at ti.com>
---
arch/arm/include/asm/arch-keystone/hardware-k2e.h | 4 ++++
drivers/net/keystone_net.c | 6 ++++++
include/configs/k2e_evm.h | 3 +++
include/configs/ks2_evm.h | 1 +
4 files changed, 14 insertions(+)
diff --git a/arch/arm/include/asm/arch-keystone/hardware-k2e.h b/arch/arm/include/asm/arch-keystone/hardware-k2e.h
index f09aa93..4eac5f8 100644
--- a/arch/arm/include/asm/arch-keystone/hardware-k2e.h
+++ b/arch/arm/include/asm/arch-keystone/hardware-k2e.h
@@ -38,6 +38,10 @@
#define KS2_CIC2_DDR3_ECC_IRQ_NUM -1 /* not defined in K2E */
#define KS2_CIC2_DDR3_ECC_CHAN_NUM -1 /* not defined in K2E */
+/* SGMII SerDes */
+#define KS2_SGMII_SERDES2_BASE 0x02324000
+#define KS2_LANES_PER_SGMII_SERDES 4
+
/* Number of DSP cores */
#define KS2_NUM_DSPS 1
diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index 8348a91..6897dd9 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -546,6 +546,12 @@ static void keystone2_net_serdes_setup(void)
&ks2_serdes_sgmii_156p25mhz,
CONFIG_KSNET_SERDES_LANES_PER_SGMII);
+#ifdef CONFIG_SOC_K2E
+ ks2_serdes_init(CONFIG_KSNET_SERDES_SGMII2_BASE,
+ &ks2_serdes_sgmii_156p25mhz,
+ CONFIG_KSNET_SERDES_LANES_PER_SGMII);
+#endif
+
/* wait till setup */
udelay(5000);
}
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 3502d10..fd45d61 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -34,4 +34,7 @@
/* NAND Configuration */
#define CONFIG_SYS_NAND_PAGE_2K
+/* SerDes */
+#define CONFIG_TI_KEYSTONE_SERDES
+
#endif /* __CONFIG_K2E_EVM_H */
diff --git a/include/configs/ks2_evm.h b/include/configs/ks2_evm.h
index dcce7c3..a92ab04 100644
--- a/include/configs/ks2_evm.h
+++ b/include/configs/ks2_evm.h
@@ -140,6 +140,7 @@
#define CONFIG_KSNET_MAC_ID_BASE KS2_MAC_ID_BASE_ADDR
#define CONFIG_KSNET_NETCP_BASE KS2_NETCP_BASE
#define CONFIG_KSNET_SERDES_SGMII_BASE KS2_SGMII_SERDES_BASE
+#define CONFIG_KSNET_SERDES_SGMII2_BASE KS2_SGMII_SERDES2_BASE
#define CONFIG_KSNET_SERDES_LANES_PER_SGMII KS2_LANES_PER_SGMII_SERDES
/* AEMIF */
--
1.8.3.2
More information about the U-Boot
mailing list