From 9189ae97f1c4b0b0eefb3e1dc8ac87eaa3dac8a1 Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Thu, 31 Jan 2019 16:45:14 +0530 Subject: [PATCH] ipq807x: Moved ethernet PHY configs Moved Aquantia, QCA8033, QCA8075 and QCA8081 PHY configs to defconfig. For tiny u-boot variant, except QCA8075 all other PHYs are disabled. Change-Id: Iaafa848bf7d578bfa3bcdaf0cfcb815ecfef067f Signed-off-by: Gokul Sriram Palanisamy --- board/ipq807x/Kconfig | 11 +++++++++++ configs/ipq807x_defconfig | 8 ++++++++ configs/ipq807x_tiny_defconfig | 8 ++++++++ drivers/net/ipq807x/ipq807x_edma.c | 6 ++++++ include/configs/ipq807x.h | 4 ---- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/board/ipq807x/Kconfig b/board/ipq807x/Kconfig index d0affc4077..f801bb1180 100644 --- a/board/ipq807x/Kconfig +++ b/board/ipq807x/Kconfig @@ -19,3 +19,14 @@ config USB_XHCI_IPQ config PCI_IPQ bool "ipq807x pci support for ipq807x" +config QCA_AQUANTIA_PHY + bool "Enable Aquantia PHY support for ipq807x" + +config QCA8033_PHY + bool "Enable QCA8033 PHY support for ipq807x" + +config QCA8081_PHY + bool "Enable QCA8081 PHY support for ipq807x" + +config QCA8075_PHY + bool "Enable QCA8075 PHY support for ipq807x" diff --git a/configs/ipq807x_defconfig b/configs/ipq807x_defconfig index e719e54526..70b4183e32 100644 --- a/configs/ipq807x_defconfig +++ b/configs/ipq807x_defconfig @@ -95,6 +95,14 @@ CONFIG_CMD_NET=y # CONFIG_CMD_DNS is not set # CONFIG_CMD_LINK_LOCAL is not set +# +# Network PHY +# +CONFIG_QCA8075_PHY=y +CONFIG_QCA_AQUANTIA_PHY=y +CONFIG_QCA8033_PHY=y +CONFIG_QCA8081_PHY=y + # # Misc commands # diff --git a/configs/ipq807x_tiny_defconfig b/configs/ipq807x_tiny_defconfig index 9865039a2e..9633b7fe97 100644 --- a/configs/ipq807x_tiny_defconfig +++ b/configs/ipq807x_tiny_defconfig @@ -95,6 +95,14 @@ CONFIG_CMD_NET=y # CONFIG_CMD_DNS is not set # CONFIG_CMD_LINK_LOCAL is not set +# +# Network PHY +# +CONFIG_QCA8075_PHY=y +CONFIG_QCA_AQUANTIA_PHY is not set +CONFIG_QCA8033_PHY is not set +CONFIG_QCA8081_PHY is not set + # # Misc commands # diff --git a/drivers/net/ipq807x/ipq807x_edma.c b/drivers/net/ipq807x/ipq807x_edma.c index 7c55e7d4fc..8ddd18eb1b 100755 --- a/drivers/net/ipq807x/ipq807x_edma.c +++ b/drivers/net/ipq807x/ipq807x_edma.c @@ -1870,13 +1870,18 @@ int ipq807x_edma_init(void *edma_board_cfg) else if ( mode == PORT_WRAPPER_QSGMII) qca8075_phy_interface_set_mode(0x0, 0x4); break; +#ifdef CONFIG_QCA8033_PHY case QCA8033_PHY: ipq_qca8033_phy_init(&ipq807x_edma_dev[i]->ops[phy_id], phy_addr); break; +#endif +#ifdef CONFIG_QCA8081_PHY case QCA8081_PHY: case QCA8081_1_1_PHY: ipq_qca8081_phy_init(&ipq807x_edma_dev[i]->ops[phy_id], phy_addr); break; +#endif +#ifdef CONFIG_QCA_AQUANTIA_PHY case AQUANTIA_PHY_107: case AQUANTIA_PHY_109: case AQUANTIA_PHY_111: @@ -1886,6 +1891,7 @@ int ipq807x_edma_init(void *edma_board_cfg) ipq_board_fw_download(phy_addr); ipq_qca_aquantia_phy_init(&ipq807x_edma_dev[i]->ops[phy_id], phy_addr); break; +#endif default: ipq_qca8075_phy_map_ops(&ipq807x_edma_dev[i]->ops[phy_id]); break; diff --git a/include/configs/ipq807x.h b/include/configs/ipq807x.h index 3f2eb193b3..c8d980f735 100644 --- a/include/configs/ipq807x.h +++ b/include/configs/ipq807x.h @@ -303,10 +303,6 @@ extern loff_t board_env_size; #define CONFIG_SERVERIP 192.168.10.1 #define CONFIG_CMD_TFTPPUT #define CONFIG_IPQ_MDIO 1 -#define CONFIG_QCA8075_PHY 1 -#define CONFIG_QCA8033_PHY 1 -#define CONFIG_QCA8081_PHY 1 -#define CONFIG_QCA_AQUANTIA_PHY 1 #define CONFIG_IPQ_ETH_INIT_DEFER /*