[U-Boot] (no subject)

Date: Tue, 18 Sep 2018 15:35:32 -0600 Subject: [PATCH 0/3] net: phy: aquantia: firmware loading
This patch series adds optional support for loading firmware for Aquantia phys via MDIO commands. Because I'm adding more Kconfig options for this driver, I've cleaned up the existing defconfigs that use it.
It has been tested on a NXP ls1046ardb board, and a very similar custom board that doesn't have dedicated storage for the phy firmware.
Jeremy Gebben (3): configs: migrate CONFIG_PHY_AQUANTIA to Kconfig net: phy: aquantia: add firmware loading support net: phy: aquantia: autodetect if firmware needs to be loaded
configs/T1023RDB_NAND_defconfig | 2 +- configs/T1023RDB_SDCARD_defconfig | 2 +- configs/T1023RDB_SECURE_BOOT_defconfig | 2 +- configs/T1023RDB_SPIFLASH_defconfig | 2 +- configs/T1023RDB_defconfig | 2 +- configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- configs/T2080QDS_NAND_defconfig | 2 +- configs/T2080QDS_SDCARD_defconfig | 2 +- configs/T2080QDS_SECURE_BOOT_defconfig | 2 +- configs/T2080QDS_SPIFLASH_defconfig | 2 +- configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080QDS_defconfig | 2 +- configs/T2080RDB_NAND_defconfig | 2 +- configs/T2080RDB_SDCARD_defconfig | 2 +- configs/T2080RDB_SECURE_BOOT_defconfig | 2 +- configs/T2080RDB_SPIFLASH_defconfig | 2 +- configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080RDB_defconfig | 2 +- configs/T2081QDS_NAND_defconfig | 2 +- configs/T2081QDS_SDCARD_defconfig | 2 +- configs/T2081QDS_SPIFLASH_defconfig | 2 +- configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2081QDS_defconfig | 2 +- configs/ls1043ardb_defconfig | 2 +- configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 +- configs/ls1043ardb_nand_defconfig | 2 +- configs/ls1043ardb_sdcard_defconfig | 2 +- configs/ls1046ardb_emmc_defconfig | 2 +- configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_qspi_defconfig | 2 +- .../ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_sdcard_defconfig | 2 +- configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_qspi_defconfig | 1 + ...1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_defconfig | 1 + configs/ls2080ardb_defconfig | 2 +- configs/ls2080ardb_nand_defconfig | 2 +- drivers/net/phy/Kconfig | 26 +- drivers/net/phy/aquantia.c | 254 +++++++++++++++++- include/configs/T102xRDB.h | 2 - include/configs/T208xRDB.h | 2 - include/configs/ls1043ardb.h | 2 - include/configs/ls1046ardb.h | 2 - include/configs/ls1088ardb.h | 3 - include/configs/ls2080ardb.h | 3 - 50 files changed, 316 insertions(+), 58 deletions(-)

The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com --- configs/T1023RDB_NAND_defconfig | 2 +- configs/T1023RDB_SDCARD_defconfig | 2 +- configs/T1023RDB_SECURE_BOOT_defconfig | 2 +- configs/T1023RDB_SPIFLASH_defconfig | 2 +- configs/T1023RDB_defconfig | 2 +- configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- configs/T2080QDS_NAND_defconfig | 2 +- configs/T2080QDS_SDCARD_defconfig | 2 +- configs/T2080QDS_SECURE_BOOT_defconfig | 2 +- configs/T2080QDS_SPIFLASH_defconfig | 2 +- configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080QDS_defconfig | 2 +- configs/T2080RDB_NAND_defconfig | 2 +- configs/T2080RDB_SDCARD_defconfig | 2 +- configs/T2080RDB_SECURE_BOOT_defconfig | 2 +- configs/T2080RDB_SPIFLASH_defconfig | 2 +- configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080RDB_defconfig | 2 +- configs/T2081QDS_NAND_defconfig | 2 +- configs/T2081QDS_SDCARD_defconfig | 2 +- configs/T2081QDS_SPIFLASH_defconfig | 2 +- configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2081QDS_defconfig | 2 +- configs/ls1043ardb_defconfig | 2 +- configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 +- configs/ls1043ardb_nand_defconfig | 2 +- configs/ls1043ardb_sdcard_defconfig | 2 +- configs/ls1046ardb_emmc_defconfig | 2 +- configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_qspi_defconfig | 2 +- configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_sdcard_defconfig | 2 +- configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_qspi_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_defconfig | 1 + configs/ls2080ardb_defconfig | 2 +- configs/ls2080ardb_nand_defconfig | 2 +- drivers/net/phy/Kconfig | 2 ++ drivers/net/phy/aquantia.c | 4 ---- include/configs/T102xRDB.h | 2 -- include/configs/T208xRDB.h | 2 -- include/configs/ls1043ardb.h | 2 -- include/configs/ls1046ardb.h | 2 -- include/configs/ls1088ardb.h | 3 --- include/configs/ls2080ardb.h | 3 --- 50 files changed, 44 insertions(+), 56 deletions(-)
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig index dc3dcb9989..03016158fc 100644 --- a/configs/T1023RDB_NAND_defconfig +++ b/configs/T1023RDB_NAND_defconfig @@ -48,7 +48,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1023RDB_SDCARD_defconfig b/configs/T1023RDB_SDCARD_defconfig index bf9e699545..74c1fd10bb 100644 --- a/configs/T1023RDB_SDCARD_defconfig +++ b/configs/T1023RDB_SDCARD_defconfig @@ -47,7 +47,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1023RDB_SECURE_BOOT_defconfig b/configs/T1023RDB_SECURE_BOOT_defconfig index 9820d34212..0b9fb82e25 100644 --- a/configs/T1023RDB_SECURE_BOOT_defconfig +++ b/configs/T1023RDB_SECURE_BOOT_defconfig @@ -37,7 +37,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1023RDB_SPIFLASH_defconfig b/configs/T1023RDB_SPIFLASH_defconfig index a1e37a6f38..b8d1b4c5d8 100644 --- a/configs/T1023RDB_SPIFLASH_defconfig +++ b/configs/T1023RDB_SPIFLASH_defconfig @@ -48,7 +48,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1023RDB_defconfig b/configs/T1023RDB_defconfig index 07220b9d56..eb71da11fc 100644 --- a/configs/T1023RDB_defconfig +++ b/configs/T1023RDB_defconfig @@ -36,7 +36,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1024RDB_NAND_defconfig b/configs/T1024RDB_NAND_defconfig index fc9e407783..13afd7d4dd 100644 --- a/configs/T1024RDB_NAND_defconfig +++ b/configs/T1024RDB_NAND_defconfig @@ -50,7 +50,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig index 9c3d9c6316..e56e220f75 100644 --- a/configs/T1024RDB_SDCARD_defconfig +++ b/configs/T1024RDB_SDCARD_defconfig @@ -49,7 +49,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1024RDB_SECURE_BOOT_defconfig b/configs/T1024RDB_SECURE_BOOT_defconfig index 10810c0c4f..a95ed6bbdf 100644 --- a/configs/T1024RDB_SECURE_BOOT_defconfig +++ b/configs/T1024RDB_SECURE_BOOT_defconfig @@ -39,7 +39,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig index 5718ed3945..dd557a86df 100644 --- a/configs/T1024RDB_SPIFLASH_defconfig +++ b/configs/T1024RDB_SPIFLASH_defconfig @@ -50,7 +50,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T1024RDB_defconfig b/configs/T1024RDB_defconfig index ab40d599d1..c0e2dc9a49 100644 --- a/configs/T1024RDB_defconfig +++ b/configs/T1024RDB_defconfig @@ -38,7 +38,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig index 6b5de4d009..c5eb4b6e2b 100644 --- a/configs/T2080QDS_NAND_defconfig +++ b/configs/T2080QDS_NAND_defconfig @@ -46,7 +46,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig index a203582cb5..2d545120ab 100644 --- a/configs/T2080QDS_SDCARD_defconfig +++ b/configs/T2080QDS_SDCARD_defconfig @@ -45,7 +45,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig index 29873cefe6..f9a970a1bd 100644 --- a/configs/T2080QDS_SECURE_BOOT_defconfig +++ b/configs/T2080QDS_SECURE_BOOT_defconfig @@ -35,7 +35,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig index 6528eea389..9a9e60d871 100644 --- a/configs/T2080QDS_SPIFLASH_defconfig +++ b/configs/T2080QDS_SPIFLASH_defconfig @@ -46,7 +46,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig index 38216b84f9..9c9a436d81 100644 --- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig +++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig @@ -30,7 +30,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig index 4a5cbb26ad..16feb6a234 100644 --- a/configs/T2080QDS_defconfig +++ b/configs/T2080QDS_defconfig @@ -34,7 +34,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig index fa30d2917b..b6d503d719 100644 --- a/configs/T2080RDB_NAND_defconfig +++ b/configs/T2080RDB_NAND_defconfig @@ -46,7 +46,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig index 30fe40e506..37e3b2c82e 100644 --- a/configs/T2080RDB_SDCARD_defconfig +++ b/configs/T2080RDB_SDCARD_defconfig @@ -45,7 +45,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_SECURE_BOOT_defconfig b/configs/T2080RDB_SECURE_BOOT_defconfig index 1e8bea5b7a..33746fa63f 100644 --- a/configs/T2080RDB_SECURE_BOOT_defconfig +++ b/configs/T2080RDB_SECURE_BOOT_defconfig @@ -35,7 +35,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig index 8a96ff8752..3530b5443d 100644 --- a/configs/T2080RDB_SPIFLASH_defconfig +++ b/configs/T2080RDB_SPIFLASH_defconfig @@ -46,7 +46,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig index 947f8eceda..297c31f3c5 100644 --- a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig +++ b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig @@ -30,7 +30,7 @@ CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig index 969e7d730e..edcda82e46 100644 --- a/configs/T2080RDB_defconfig +++ b/configs/T2080RDB_defconfig @@ -34,7 +34,7 @@ CONFIG_MTD_PARTITIONS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2081QDS_NAND_defconfig b/configs/T2081QDS_NAND_defconfig index bba3457248..deb2ce81a6 100644 --- a/configs/T2081QDS_NAND_defconfig +++ b/configs/T2081QDS_NAND_defconfig @@ -46,7 +46,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2081QDS_SDCARD_defconfig b/configs/T2081QDS_SDCARD_defconfig index a64be133e3..3d709a7994 100644 --- a/configs/T2081QDS_SDCARD_defconfig +++ b/configs/T2081QDS_SDCARD_defconfig @@ -45,7 +45,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2081QDS_SPIFLASH_defconfig b/configs/T2081QDS_SPIFLASH_defconfig index 40812b7aed..d0dd1f59f5 100644 --- a/configs/T2081QDS_SPIFLASH_defconfig +++ b/configs/T2081QDS_SPIFLASH_defconfig @@ -46,7 +46,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig index 88102aecff..43fe470320 100644 --- a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig +++ b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig @@ -30,7 +30,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/T2081QDS_defconfig b/configs/T2081QDS_defconfig index 85d8b89aa8..23aacd7af5 100644 --- a/configs/T2081QDS_defconfig +++ b/configs/T2081QDS_defconfig @@ -34,7 +34,7 @@ CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig index c72231b307..7b46c3b1dd 100644 --- a/configs/ls1043ardb_defconfig +++ b/configs/ls1043ardb_defconfig @@ -29,7 +29,7 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig index 64e41ecfd2..a64650f68d 100644 --- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig @@ -46,7 +46,7 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig index a3d1ee84b4..72957d5a06 100644 --- a/configs/ls1043ardb_nand_defconfig +++ b/configs/ls1043ardb_nand_defconfig @@ -46,7 +46,7 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig index b44c35d1ec..5e4e74f8f2 100644 --- a/configs/ls1043ardb_sdcard_defconfig +++ b/configs/ls1043ardb_sdcard_defconfig @@ -44,7 +44,7 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig index e0f07b702d..8fa395c202 100644 --- a/configs/ls1046ardb_emmc_defconfig +++ b/configs/ls1046ardb_emmc_defconfig @@ -45,7 +45,7 @@ CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig index 6495447b83..fbb3669012 100644 --- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig @@ -30,7 +30,7 @@ CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig index 5204bb51a1..25548d1a3c 100644 --- a/configs/ls1046ardb_qspi_defconfig +++ b/configs/ls1046ardb_qspi_defconfig @@ -31,7 +31,7 @@ CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig index 9f04424c7a..24a08b6e01 100644 --- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig @@ -45,7 +45,7 @@ CONFIG_SPL_DM=y CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig index 07eebbf50f..1e280d5553 100644 --- a/configs/ls1046ardb_sdcard_defconfig +++ b/configs/ls1046ardb_sdcard_defconfig @@ -44,7 +44,7 @@ CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig index 859ff11a1d..0b5a7eba6c 100644 --- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig @@ -35,6 +35,7 @@ CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls1088ardb_qspi_defconfig b/configs/ls1088ardb_qspi_defconfig index a42158c862..400f98ea2b 100644 --- a/configs/ls1088ardb_qspi_defconfig +++ b/configs/ls1088ardb_qspi_defconfig @@ -35,6 +35,7 @@ CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig index f7ec11fe05..f584dd3c59 100644 --- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig @@ -48,6 +48,7 @@ CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig b/configs/ls1088ardb_sdcard_qspi_defconfig index bc53bba1e6..ace8f77317 100644 --- a/configs/ls1088ardb_sdcard_qspi_defconfig +++ b/configs/ls1088ardb_sdcard_qspi_defconfig @@ -45,6 +45,7 @@ CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig index a62e09bdf7..a060ec1b3c 100644 --- a/configs/ls2080ardb_defconfig +++ b/configs/ls2080ardb_defconfig @@ -36,7 +36,7 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2080ardb_nand_defconfig index 4801f51bcc..7d8ffb50fd 100644 --- a/configs/ls2080ardb_nand_defconfig +++ b/configs/ls2080ardb_nand_defconfig @@ -43,7 +43,7 @@ CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_MTD_NOR_FLASH=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index f5821dfed9..28f3ee35f1 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -66,6 +66,8 @@ config PHYLIB_10G
config PHY_AQUANTIA bool "Aquantia Ethernet PHYs support" + select PHY_GIGE + select PHYLIB_10G
config PHY_ATHEROS bool "Atheros Ethernet PHYs support" diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index fe81217432..a44fba0f1a 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -9,10 +9,6 @@ #include <dm.h> #include <phy.h>
-#ifndef CONFIG_PHYLIB_10G -#error The Aquantia PHY needs 10G support -#endif - #define AQUNTIA_10G_CTL 0x20 #define AQUNTIA_VENDOR_P1 0xc400
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index f7a54f7a97..42e6671d58 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -719,9 +719,7 @@ unsigned long get_board_ddr_clk(void);
#ifdef CONFIG_SYS_DPAA_FMAN #define CONFIG_FMAN_ENET -#define CONFIG_PHYLIB_10G #define CONFIG_PHY_REALTEK -#define CONFIG_PHY_AQUANTIA #if defined(CONFIG_TARGET_T1024RDB) #define RGMII_PHY1_ADDR 0x2 #define RGMII_PHY2_ADDR 0x6 diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index ebee9083ed..51505d2d52 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -591,8 +591,6 @@ unsigned long get_board_ddr_clk(void);
#ifdef CONFIG_SYS_DPAA_FMAN #define CONFIG_FMAN_ENET -#define CONFIG_PHYLIB_10G -#define CONFIG_PHY_AQUANTIA #define CONFIG_PHY_CORTINA #define CONFIG_PHY_REALTEK #define CONFIG_CORTINA_FW_LENGTH 0x40000 diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index bc639e586f..5484569ee0 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -251,8 +251,6 @@
#ifdef CONFIG_SYS_DPAA_FMAN #define CONFIG_FMAN_ENET -#define CONFIG_PHYLIB_10G -#define CONFIG_PHY_AQUANTIA
#define RGMII_PHY1_ADDR 0x1 #define RGMII_PHY2_ADDR 0x2 diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index ffca410b1a..dcb5854046 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -180,8 +180,6 @@
#ifdef CONFIG_SYS_DPAA_FMAN #define CONFIG_FMAN_ENET -#define CONFIG_PHY_AQUANTIA -#define CONFIG_PHYLIB_10G #define RGMII_PHY1_ADDR 0x1 #define RGMII_PHY2_ADDR 0x2
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h index eb220bf6e9..e8d5ebf14a 100644 --- a/include/configs/ls1088ardb.h +++ b/include/configs/ls1088ardb.h @@ -423,12 +423,9 @@
/* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET -#define CONFIG_PHYLIB_10G -#define CONFIG_PHY_GIGE #define CONFIG_PHYLIB
#define CONFIG_PHY_VITESSE -#define CONFIG_PHY_AQUANTIA #define AQ_PHY_ADDR1 0x00 #define AQR105_IRQ_MASK 0x00000004
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index 3d53a69e8a..57160e7b40 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -456,8 +456,6 @@ unsigned long get_board_sys_clk(void);
/* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET -#define CONFIG_PHYLIB_10G -#define CONFIG_PHY_AQUANTIA #define CONFIG_PHY_CORTINA #define CONFIG_SYS_CORTINA_FW_IN_NOR #ifdef CONFIG_QSPI_BOOT @@ -478,7 +476,6 @@ unsigned long get_board_sys_clk(void); #define AQR405_IRQ_MASK 0x36
#define CONFIG_ETHPRIME "DPMAC1@xgmii" -#define CONFIG_PHY_AQUANTIA #endif
#include <asm/fsl_secure_boot.h>

On 09/18/2018 02:50 PM, Jeremy Gebben wrote:
The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
configs/T1023RDB_NAND_defconfig | 2 +- configs/T1023RDB_SDCARD_defconfig | 2 +- configs/T1023RDB_SECURE_BOOT_defconfig | 2 +- configs/T1023RDB_SPIFLASH_defconfig | 2 +- configs/T1023RDB_defconfig | 2 +- configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- configs/T2080QDS_NAND_defconfig | 2 +- configs/T2080QDS_SDCARD_defconfig | 2 +- configs/T2080QDS_SECURE_BOOT_defconfig | 2 +- configs/T2080QDS_SPIFLASH_defconfig | 2 +- configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080QDS_defconfig | 2 +- configs/T2080RDB_NAND_defconfig | 2 +- configs/T2080RDB_SDCARD_defconfig | 2 +- configs/T2080RDB_SECURE_BOOT_defconfig | 2 +- configs/T2080RDB_SPIFLASH_defconfig | 2 +- configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080RDB_defconfig | 2 +- configs/T2081QDS_NAND_defconfig | 2 +- configs/T2081QDS_SDCARD_defconfig | 2 +- configs/T2081QDS_SPIFLASH_defconfig | 2 +- configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2081QDS_defconfig | 2 +- configs/ls1043ardb_defconfig | 2 +- configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 +- configs/ls1043ardb_nand_defconfig | 2 +- configs/ls1043ardb_sdcard_defconfig | 2 +- configs/ls1046ardb_emmc_defconfig | 2 +- configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_qspi_defconfig | 2 +- configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_sdcard_defconfig | 2 +- configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_qspi_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_defconfig | 1 + configs/ls2080ardb_defconfig | 2 +- configs/ls2080ardb_nand_defconfig | 2 +- drivers/net/phy/Kconfig | 2 ++ drivers/net/phy/aquantia.c | 4 ---- include/configs/T102xRDB.h | 2 -- include/configs/T208xRDB.h | 2 -- include/configs/ls1043ardb.h | 2 -- include/configs/ls1046ardb.h | 2 -- include/configs/ls1088ardb.h | 3 --- include/configs/ls2080ardb.h | 3 --- 50 files changed, 44 insertions(+), 56 deletions(-)
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig index dc3dcb9989..03016158fc 100644 --- a/configs/T1023RDB_NAND_defconfig +++ b/configs/T1023RDB_NAND_defconfig @@ -48,7 +48,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y
Shouldn't this patch be put after your 2nd patch?
York

On Tue, Sep 18, 2018 at 4:07 PM York Sun york.sun@nxp.com wrote:
On 09/18/2018 02:50 PM, Jeremy Gebben wrote:
The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
configs/T1023RDB_NAND_defconfig | 2 +- configs/T1023RDB_SDCARD_defconfig | 2 +- configs/T1023RDB_SECURE_BOOT_defconfig | 2 +- configs/T1023RDB_SPIFLASH_defconfig | 2 +- configs/T1023RDB_defconfig | 2 +- configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- configs/T2080QDS_NAND_defconfig | 2 +- configs/T2080QDS_SDCARD_defconfig | 2 +- configs/T2080QDS_SECURE_BOOT_defconfig | 2 +- configs/T2080QDS_SPIFLASH_defconfig | 2 +- configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080QDS_defconfig | 2 +- configs/T2080RDB_NAND_defconfig | 2 +- configs/T2080RDB_SDCARD_defconfig | 2 +- configs/T2080RDB_SECURE_BOOT_defconfig | 2 +- configs/T2080RDB_SPIFLASH_defconfig | 2 +- configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080RDB_defconfig | 2 +- configs/T2081QDS_NAND_defconfig | 2 +- configs/T2081QDS_SDCARD_defconfig | 2 +- configs/T2081QDS_SPIFLASH_defconfig | 2 +- configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2081QDS_defconfig | 2 +- configs/ls1043ardb_defconfig | 2 +- configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 +- configs/ls1043ardb_nand_defconfig | 2 +- configs/ls1043ardb_sdcard_defconfig | 2 +- configs/ls1046ardb_emmc_defconfig | 2 +- configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_qspi_defconfig | 2 +- configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_sdcard_defconfig | 2 +- configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_qspi_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_defconfig | 1 + configs/ls2080ardb_defconfig | 2 +- configs/ls2080ardb_nand_defconfig | 2 +- drivers/net/phy/Kconfig | 2 ++ drivers/net/phy/aquantia.c | 4 ---- include/configs/T102xRDB.h | 2 -- include/configs/T208xRDB.h | 2 -- include/configs/ls1043ardb.h | 2 -- include/configs/ls1046ardb.h | 2 -- include/configs/ls1088ardb.h | 3 --- include/configs/ls2080ardb.h | 3 --- 50 files changed, 44 insertions(+), 56 deletions(-)
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig index dc3dcb9989..03016158fc 100644 --- a/configs/T1023RDB_NAND_defconfig +++ b/configs/T1023RDB_NAND_defconfig @@ -48,7 +48,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y
Shouldn't this patch be put after your 2nd patch?
If you prefer, but it should work either way. CONFIG_PHY_AQUANTIA already existed in Kconfig, but it was being set in header files instead of defconfigs.
Thanks for reviewing,
Jeremy
York

On 09/18/2018 03:22 PM, Jeremy Gebben wrote:
On Tue, Sep 18, 2018 at 4:07 PM York Sun york.sun@nxp.com wrote:
On 09/18/2018 02:50 PM, Jeremy Gebben wrote:
The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
configs/T1023RDB_NAND_defconfig | 2 +- configs/T1023RDB_SDCARD_defconfig | 2 +- configs/T1023RDB_SECURE_BOOT_defconfig | 2 +- configs/T1023RDB_SPIFLASH_defconfig | 2 +- configs/T1023RDB_defconfig | 2 +- configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- configs/T2080QDS_NAND_defconfig | 2 +- configs/T2080QDS_SDCARD_defconfig | 2 +- configs/T2080QDS_SECURE_BOOT_defconfig | 2 +- configs/T2080QDS_SPIFLASH_defconfig | 2 +- configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080QDS_defconfig | 2 +- configs/T2080RDB_NAND_defconfig | 2 +- configs/T2080RDB_SDCARD_defconfig | 2 +- configs/T2080RDB_SECURE_BOOT_defconfig | 2 +- configs/T2080RDB_SPIFLASH_defconfig | 2 +- configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2080RDB_defconfig | 2 +- configs/T2081QDS_NAND_defconfig | 2 +- configs/T2081QDS_SDCARD_defconfig | 2 +- configs/T2081QDS_SPIFLASH_defconfig | 2 +- configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 2 +- configs/T2081QDS_defconfig | 2 +- configs/ls1043ardb_defconfig | 2 +- configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 +- configs/ls1043ardb_nand_defconfig | 2 +- configs/ls1043ardb_sdcard_defconfig | 2 +- configs/ls1046ardb_emmc_defconfig | 2 +- configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_qspi_defconfig | 2 +- configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 +- configs/ls1046ardb_sdcard_defconfig | 2 +- configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_qspi_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1088ardb_sdcard_qspi_defconfig | 1 + configs/ls2080ardb_defconfig | 2 +- configs/ls2080ardb_nand_defconfig | 2 +- drivers/net/phy/Kconfig | 2 ++ drivers/net/phy/aquantia.c | 4 ---- include/configs/T102xRDB.h | 2 -- include/configs/T208xRDB.h | 2 -- include/configs/ls1043ardb.h | 2 -- include/configs/ls1046ardb.h | 2 -- include/configs/ls1088ardb.h | 3 --- include/configs/ls2080ardb.h | 3 --- 50 files changed, 44 insertions(+), 56 deletions(-)
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig index dc3dcb9989..03016158fc 100644 --- a/configs/T1023RDB_NAND_defconfig +++ b/configs/T1023RDB_NAND_defconfig @@ -48,7 +48,7 @@ CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_AQUANTIA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_SYS_NS16550=y
Shouldn't this patch be put after your 2nd patch?
If you prefer, but it should work either way. CONFIG_PHY_AQUANTIA already existed in Kconfig, but it was being set in header files instead of defconfigs.
I didn't realize PHY_AQUANTIA already exists in Kconfig. PHY_GIGE is selected so it doesn't need to be set in defconfig. Your patch is OK.
York

On Tue, Sep 18, 2018 at 4:52 PM Jeremy Gebben jgebben@sweptlaser.com wrote:
The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
Acked-by: Joe Hershberger joe.hershberger@ni.com

Hi Jeremy,
https://patchwork.ozlabs.org/patch/971306/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks! -Joe

Aquantia phys have firmware that can be loaded automatically from storage directly attached to the phy or via MDIO commands. Add support for loading firmware from either a file or a raw location on an MMC device.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com --- drivers/net/phy/Kconfig | 24 +++- drivers/net/phy/aquantia.c | 234 ++++++++++++++++++++++++++++++++++++- 2 files changed, 256 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 28f3ee35f1..3dc0822d9c 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -64,11 +64,33 @@ endif # MV88E61XX_SWITCH config PHYLIB_10G bool "Generic 10G PHY support"
-config PHY_AQUANTIA +menuconfig PHY_AQUANTIA bool "Aquantia Ethernet PHYs support" select PHY_GIGE select PHYLIB_10G
+config PHY_AQUANTIA_UPLOAD_FW + bool "Aquantia firmware loading support" + default n + depends on PHY_AQUANTIA + help + Aquantia PHYs use firmware which can be either loaded automatically + from storage directly attached to the phy or loaded by the boot loader + via MDIO commands. The firmware is loaded from a file, specified by + the PHY_AQUANTIA_FW_PART and PHY_AQUANTIA_FW_NAME options. + +config PHY_AQUANTIA_FW_PART + string "Aquantia firmware partition" + depends on PHY_AQUANTIA_UPLOAD_FW + help + Partition containing the firmware file. + +config PHY_AQUANTIA_FW_NAME + string "Aquantia firmware filename" + depends on PHY_AQUANTIA_UPLOAD_FW + help + Firmware filename. + config PHY_ATHEROS bool "Atheros Ethernet PHYs support"
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index a44fba0f1a..cbd70120d1 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -8,6 +8,10 @@ #include <common.h> #include <dm.h> #include <phy.h> +#include <crc.h> +#include <malloc.h> +#include <asm/byteorder.h> +#include <fs.h>
#define AQUNTIA_10G_CTL 0x20 #define AQUNTIA_VENDOR_P1 0xc400 @@ -15,9 +19,237 @@ #define AQUNTIA_SPEED_LSB_MASK 0x2000 #define AQUNTIA_SPEED_MSB_MASK 0x40
+/* registers in MDIO_MMD_VEND1 region */ +#define GLOBAL_FIRMWARE_ID 0x20 +#define GLOBAL_FAULT 0xc850 +#define GLOBAL_RSTATUS_1 0xc885 + +#define GLOBAL_STANDARD_CONTROL 0x0 +#define SOFT_RESET BIT(15) +#define LOW_POWER BIT(11) + +#define MAILBOX_CONTROL 0x0200 +#define MAILBOX_EXECUTE BIT(15) +#define MAILBOX_WRITE BIT(14) +#define MAILBOX_RESET_CRC BIT(12) +#define MAILBOX_BUSY BIT(8) + +#define MAILBOX_CRC 0x0201 + +#define MAILBOX_ADDR_MSW 0x0202 +#define MAILBOX_ADDR_LSW 0x0203 + +#define MAILBOX_DATA_MSW 0x0204 +#define MAILBOX_DATA_LSW 0x0205 + +#define UP_CONTROL 0xc001 +#define UP_RESET BIT(15) +#define UP_RUN_STALL_OVERRIDE BIT(6) +#define UP_RUN_STALL BIT(0) + +/* addresses of memory segments in the phy */ +#define DRAM_BASE_ADDR 0x3FFE0000 +#define IRAM_BASE_ADDR 0x40000000 + +/* firmware image format constants */ +#define VERSION_STRING_SIZE 0x40 +#define VERSION_STRING_OFFSET 0x0200 +#define HEADER_OFFSET 0x300 + +#pragma pack(1) +struct fw_header { + u8 padding[4]; + u8 iram_offset[3]; + u8 iram_size[3]; + u8 dram_offset[3]; + u8 dram_size[3]; +}; + +#pragma pack() + +#if defined(CONFIG_PHY_AQUANTIA_UPLOAD_FW) +static int aquantia_read_fw(u8 **fw_addr, size_t *fw_length) +{ + loff_t length, read; + int ret; + void *addr = NULL; + + *fw_addr = NULL; + *fw_length = 0; + debug("Loading Acquantia microcode from %s %s\n", + CONFIG_PHY_AQUANTIA_FW_PART, CONFIG_PHY_AQUANTIA_FW_NAME); + ret = fs_set_blk_dev("mmc", CONFIG_PHY_AQUANTIA_FW_PART, FS_TYPE_ANY); + if (ret < 0) + goto cleanup; + + ret = fs_size(CONFIG_PHY_AQUANTIA_FW_NAME, &length); + if (ret < 0) + goto cleanup; + + addr = malloc(length); + if (!addr) { + ret = -ENOMEM; + goto cleanup; + } + + ret = fs_set_blk_dev("mmc", CONFIG_PHY_AQUANTIA_FW_PART, FS_TYPE_ANY); + if (ret < 0) + goto cleanup; + + ret = fs_read(CONFIG_PHY_AQUANTIA_FW_NAME, (ulong)addr, 0, length, + &read); + if (ret < 0) + goto cleanup; + + *fw_addr = addr; + *fw_length = length; + debug("Found Acquantia microcode.\n"); + +cleanup: + if (ret < 0) { + printf("loading firmware file %s %s failed with error %d\n", + CONFIG_PHY_AQUANTIA_FW_PART, + CONFIG_PHY_AQUANTIA_FW_NAME, ret); + free(addr); + } + return ret; +} + +/* load data into the phy's memory */ +static int aquantia_load_memory(struct phy_device *phydev, u32 addr, + const u8 *data, size_t len) +{ + size_t pos; + u16 crc = 0, up_crc; + + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_CONTROL, MAILBOX_RESET_CRC); + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_ADDR_MSW, addr >> 16); + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_ADDR_LSW, addr & 0xfffc); + + for (pos = 0; pos < len; pos += min(sizeof(u32), len - pos)) { + u32 word = 0; + + memcpy(&word, &data[pos], min(sizeof(u32), len - pos)); + + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_DATA_MSW, + (word >> 16)); + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_DATA_LSW, + word & 0xffff); + + phy_write(phydev, MDIO_MMD_VEND1, MAILBOX_CONTROL, + MAILBOX_EXECUTE | MAILBOX_WRITE); + + /* keep a big endian CRC to match the phy processor */ + word = cpu_to_be32(word); + crc = crc16_ccitt(crc, (u8 *)&word, sizeof(word)); + } + + up_crc = phy_read(phydev, MDIO_MMD_VEND1, MAILBOX_CRC); + if (crc != up_crc) { + printf("%s crc mismatch: calculated 0x%04hx phy 0x%04hx\n", + phydev->dev->name, crc, up_crc); + return -EINVAL; + } + return 0; +} + +static u32 unpack_u24(const u8 *data) +{ + return (data[2] << 16) + (data[1] << 8) + data[0]; +} + +static int aquantia_upload_firmware(struct phy_device *phydev) +{ + int ret; + u8 *addr = NULL; + size_t fw_length = 0; + u16 calculated_crc, read_crc; + char version[VERSION_STRING_SIZE]; + u32 primary_offset, iram_offset, iram_size, dram_offset, dram_size; + const struct fw_header *header; + + ret = aquantia_read_fw(&addr, &fw_length); + if (ret != 0) + return ret; + + read_crc = (addr[fw_length - 2] << 8) | addr[fw_length - 1]; + calculated_crc = crc16_ccitt(0, addr, fw_length - 2); + if (read_crc != calculated_crc) { + printf("%s bad firmware crc: file 0x%04x calculated 0x%04x\n", + phydev->dev->name, read_crc, calculated_crc); + ret = -EINVAL; + goto done; + } + + /* Find the DRAM and IRAM sections within the firmware file. */ + primary_offset = ((addr[9] & 0xf) << 8 | addr[8]) << 12; + + header = (struct fw_header *)&addr[primary_offset + HEADER_OFFSET]; + + iram_offset = primary_offset + unpack_u24(header->iram_offset); + iram_size = unpack_u24(header->iram_size); + + dram_offset = primary_offset + unpack_u24(header->dram_offset); + dram_size = unpack_u24(header->dram_size); + + debug("primary %d iram offset=%d size=%d dram offset=%d size=%d\n", + primary_offset, iram_offset, iram_size, dram_offset, dram_size); + + strlcpy(version, (char *)&addr[dram_offset + VERSION_STRING_OFFSET], + VERSION_STRING_SIZE); + printf("%s loading firmare version '%s'\n", phydev->dev->name, version); + + /* stall the microcprocessor */ + phy_write(phydev, MDIO_MMD_VEND1, UP_CONTROL, + UP_RUN_STALL | UP_RUN_STALL_OVERRIDE); + + debug("loading dram 0x%08x from offset=%d size=%d\n", + DRAM_BASE_ADDR, dram_offset, dram_size); + ret = aquantia_load_memory(phydev, DRAM_BASE_ADDR, &addr[dram_offset], + dram_size); + if (ret != 0) + goto done; + + debug("loading iram 0x%08x from offset=%d size=%d\n", + IRAM_BASE_ADDR, iram_offset, iram_size); + ret = aquantia_load_memory(phydev, IRAM_BASE_ADDR, &addr[iram_offset], + iram_size); + if (ret != 0) + goto done; + + /* make sure soft reset and low power mode are clear */ + phy_write(phydev, MDIO_MMD_VEND1, GLOBAL_STANDARD_CONTROL, 0); + + /* Release the microprocessor. UP_RESET must be held for 100 usec. */ + phy_write(phydev, MDIO_MMD_VEND1, UP_CONTROL, + UP_RUN_STALL | UP_RUN_STALL_OVERRIDE | UP_RESET); + + udelay(100); + + phy_write(phydev, MDIO_MMD_VEND1, UP_CONTROL, UP_RUN_STALL_OVERRIDE); + + printf("%s firmare loading done.\n", phydev->dev->name); +done: + free(addr); + return ret; +} +#else +static int aquantia_upload_firmware(struct phy_device *phydev) +{ + return 0; +} +#endif + int aquantia_config(struct phy_device *phydev) { - u32 val = phy_read(phydev, MDIO_MMD_PMAPMD, MII_BMCR); + u32 val; + int ret; + + ret = aquantia_upload_firmware(phydev); + if (ret != 0) + return ret; + + val = phy_read(phydev, MDIO_MMD_PMAPMD, MII_BMCR);
if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { /* 1000BASE-T mode */

On Tue, Sep 18, 2018 at 4:52 PM Jeremy Gebben jgebben@sweptlaser.com wrote:
Aquantia phys have firmware that can be loaded automatically from storage directly attached to the phy or via MDIO commands. Add support for loading firmware from either a file or a raw location on an MMC device.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
Acked-by: Joe Hershberger joe.hershberger@ni.com

-----Original Message----- From: U-Boot u-boot-bounces@lists.denx.de On Behalf Of Jeremy Gebben Sent: Wednesday, September 19, 2018 3:20 AM To: u-boot@lists.denx.de Cc: Joe Hershberger joe.hershberger@ni.com; Shaohui Xie Shaohui.Xie@freescale.com; York Sun yorksun@freescale.com Subject: [U-Boot] [PATCH 2/3] net: phy: aquantia: add firmware loading support
Aquantia phys have firmware that can be loaded automatically from storage directly attached to the phy or via MDIO commands. Add support for loading firmware from either a file or a raw location on an MMC device.
We have integrated your patch series. Now we have one AQR FW: AQR-G3_v4.2.C-AQR.cld How to flash this FW on Aquantia card ? When my u-boot will boot, does Firmware programming process will trigger by itself or do we need to execute some command on u-boot prompt ?
--pk

On Wed, Oct 24, 2018 at 3:34 AM Prabhakar Kushwaha prabhakar.kushwaha@nxp.com wrote:
-----Original Message----- From: U-Boot u-boot-bounces@lists.denx.de On Behalf Of Jeremy Gebben Sent: Wednesday, September 19, 2018 3:20 AM To: u-boot@lists.denx.de Cc: Joe Hershberger joe.hershberger@ni.com; Shaohui Xie Shaohui.Xie@freescale.com; York Sun yorksun@freescale.com Subject: [U-Boot] [PATCH 2/3] net: phy: aquantia: add firmware loading support
Aquantia phys have firmware that can be loaded automatically from storage directly attached to the phy or via MDIO commands. Add support for loading firmware from either a file or a raw location on an MMC device.
We have integrated your patch series. Now we have one AQR FW: AQR-G3_v4.2.C-AQR.cld How to flash this FW on Aquantia card ?
Not sure what you are asking here.
My patches don't provide support for programming the persistent storage attached to the aquantia phy on NXP's development boards.
To program the firmware, put the AQR-G3_v4.2.C-AQR.cld file in a directory on a partition that uboot can read. Then set PHY_AQUANTIA_FW_PART to the parition code (for example "0:2") and PHY_AQUANTIA_FW_NAME to the full path to the firmware file (for example "/boot/AQR-G3_v4.2.C-AQR.cld")
If you #define DEBUG in aquantia.c, you should get some output as the code loads the file and verifies checksums.
When my u-boot will boot, does Firmware programming process will trigger by itself or do we need to execute some command on u-boot prompt ?
Firmware programming should happen automatically when the phy is configured.
Does that help?
Jeremy
--pk

Hi Jeremy,
https://patchwork.ozlabs.org/patch/971309/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks! -Joe

If the phy reports a valid firmware version and doesn't indicate a fault, skip loading the firmware. This allows the same image to be used on boards that have firmware storage and those that do not.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com --- drivers/net/phy/aquantia.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index cbd70120d1..37749e0185 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -236,18 +236,34 @@ done: #else static int aquantia_upload_firmware(struct phy_device *phydev) { - return 0; + printf("ERROR %s firmware loading disabled.\n", phydev->dev->name); + return -1; } #endif
int aquantia_config(struct phy_device *phydev) { - u32 val; - int ret; + u32 val, id, rstatus, fault;
- ret = aquantia_upload_firmware(phydev); - if (ret != 0) - return ret; + id = phy_read(phydev, MDIO_MMD_VEND1, GLOBAL_FIRMWARE_ID); + rstatus = phy_read(phydev, MDIO_MMD_VEND1, GLOBAL_RSTATUS_1); + fault = phy_read(phydev, MDIO_MMD_VEND1, GLOBAL_FAULT); + + if (id != 0) + printf("%s running firmware version %X.%X.%X\n", + phydev->dev->name, (id >> 8), id & 0xff, + (rstatus >> 4) & 0xf); + + if (fault != 0) + printf("%s fault 0x%04x detected\n", phydev->dev->name, fault); + + if (id == 0 || fault != 0) { + int ret; + + ret = aquantia_upload_firmware(phydev); + if (ret != 0) + return ret; + }
val = phy_read(phydev, MDIO_MMD_PMAPMD, MII_BMCR);

On Tue, Sep 18, 2018 at 4:53 PM Jeremy Gebben jgebben@sweptlaser.com wrote:
If the phy reports a valid firmware version and doesn't indicate a fault, skip loading the firmware. This allows the same image to be used on boards that have firmware storage and those that do not.
Signed-off-by: Jeremy Gebben jgebben@sweptlaser.com
Acked-by: Joe Hershberger joe.hershberger@ni.com

Hi Jeremy,
https://patchwork.ozlabs.org/patch/971312/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks! -Joe
participants (4)
-
Jeremy Gebben
-
Joe Hershberger
-
Prabhakar Kushwaha
-
York Sun