Skip to contentSkip to conversation

net: phy: Don't limit phy addresses by default

RFC PATCH In review Joe Hershberger 4 participants 6 messages Mar 30, 2018 – Apr 15, 2018

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

RFC PATCH 1/1 net: phy: Don't limit phy addresses by default

Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in.

---

 configs/am335x_baltos_defconfig            | 1 +
 configs/am335x_shc_defconfig               | 1 +
 configs/am335x_shc_ict_defconfig           | 1 +
 configs/am335x_shc_netboot_defconfig       | 1 +
 configs/am335x_shc_prompt_defconfig        | 1 +
 configs/am335x_shc_sdboot_defconfig        | 1 +
 configs/am335x_shc_sdboot_prompt_defconfig | 1 +
 configs/devkit3250_defconfig               | 1 +
 configs/ds414_defconfig                    | 1 +
 configs/khadas-vim_defconfig               | 1 +
 configs/libretech-cc_defconfig             | 1 +
 configs/p212_defconfig                     | 1 +
 configs/pepper_defconfig                   | 1 +
 configs/work_92105_defconfig               | 1 +
 configs/x600_defconfig                     | 1 +
 drivers/net/phy/Kconfig                    | 8 ++++++++
 16 files changed, 23 insertions(+)
configs/am335x_baltos_defconfig +1 -0
index ab7d96d..ed7d3a7 100644
@@ -42,6 +42,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_OMAP24_I2C_SPEED=1000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_defconfig +1 -0
index fb714da..ade16b9 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_ict_defconfig +1 -0
index 2568e3d..ac19a74 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_netboot_defconfig +1 -0
index 16071fb..31f1847 100644
@@ -37,6 +37,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_prompt_defconfig +1 -0
index bbad6dd..803304e 100644
@@ -34,6 +34,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_sdboot_defconfig +1 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_sdboot_prompt_defconfig +1 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/devkit3250_defconfig +1 -0
index e1a9b49..b69808c 100644
@@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
configs/ds414_defconfig +1 -0
index 5d1d6ab..d68e64e 100644
@@ -39,6 +39,7 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_GIGE=y
 CONFIG_MVNETA=y
 CONFIG_PCI=y
configs/khadas-vim_defconfig +1 -0
index f4674ef..0bfb594 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/libretech-cc_defconfig +1 -0
index 18ddb45..931496c 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/p212_defconfig +1 -0
index b6923f3..44221fc 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/pepper_defconfig +1 -0
index a802e57..2752436 100644
@@ -30,6 +30,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_NETDEVICES=y
configs/work_92105_defconfig +1 -0
index 2451b56..76418f0 100644
@@ -35,6 +35,7 @@ CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LPC32XX_SSP=y
configs/x600_defconfig +1 -0
index 445759e..10d596b 100644
@@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y
 CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_NETDEVICES=y
drivers/net/phy/Kconfig +8 -0
index 179e041..f5821df 100644
@@ -13,12 +13,20 @@ menuconfig PHYLIB
 
 if PHYLIB
 
+config PHY_ADDR_ENABLE
+	bool "Limit phy address"
+	default y if ARCH_SUNXI
+	help
+	  Select this if you want to control which phy address is used
+
+if PHY_ADDR_ENABLE
 config PHY_ADDR
 	int "PHY address"
 	default 1 if ARCH_SUNXI
 	default 0
 	help
 	  The address of PHY on MII bus. Usually in range of 0 to 31.
+endif
 
 config B53_SWITCH
 	bool "Broadcom BCM53xx (RoboSwitch) Ethernet switch PHY support."
Signature · 1 line
1.7.11.5
#1 lore raw

RFC PATCH 1/1 net: phy: Don't limit phy addresses by default

Quoted 17 lines · Joe Hershberger

Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in.

---

 configs/am335x_baltos_defconfig            | 1 +
 configs/am335x_shc_defconfig               | 1 +
 configs/am335x_shc_ict_defconfig           | 1 +
 configs/am335x_shc_netboot_defconfig       | 1 +
 configs/am335x_shc_prompt_defconfig        | 1 +
 configs/am335x_shc_sdboot_defconfig        | 1 +
 configs/am335x_shc_sdboot_prompt_defconfig | 1 +
 configs/devkit3250_defconfig               | 1 +
 configs/ds414_defconfig                    | 1 +
Quoted 9 lines
 configs/khadas-vim_defconfig               | 1 +
 configs/libretech-cc_defconfig             | 1 +
 configs/p212_defconfig                     | 1 +
 configs/pepper_defconfig                   | 1 +
 configs/work_92105_defconfig               | 1 +
 configs/x600_defconfig                     | 1 +
 drivers/net/phy/Kconfig                    | 8 ++++++++
 16 files changed, 23 insertions(+)

Looks no one has any comments, let's do this to unblock Intel Galileo board. In the long term, PHY address should be read from DTS instead.

Tested on Intel Galileo

Regards,
Bin

#2 lore raw

RFC PATCH 1/1 net: phy: Don't limit phy addresses by default

In reply to Joe Hershberger
Quoted 222 lines · Joe Hershberger

Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in.

---

 configs/am335x_baltos_defconfig            | 1 +
 configs/am335x_shc_defconfig               | 1 +
 configs/am335x_shc_ict_defconfig           | 1 +
 configs/am335x_shc_netboot_defconfig       | 1 +
 configs/am335x_shc_prompt_defconfig        | 1 +
 configs/am335x_shc_sdboot_defconfig        | 1 +
 configs/am335x_shc_sdboot_prompt_defconfig | 1 +
 configs/devkit3250_defconfig               | 1 +
 configs/ds414_defconfig                    | 1 +
 configs/khadas-vim_defconfig               | 1 +
 configs/libretech-cc_defconfig             | 1 +
 configs/p212_defconfig                     | 1 +
 configs/pepper_defconfig                   | 1 +
 configs/work_92105_defconfig               | 1 +
 configs/x600_defconfig                     | 1 +
 drivers/net/phy/Kconfig                    | 8 ++++++++
 16 files changed, 23 insertions(+)
configs/am335x_baltos_defconfig +1 -0
index ab7d96d..ed7d3a7 100644
@@ -42,6 +42,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_OMAP24_I2C_SPEED=1000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_defconfig +1 -0
index fb714da..ade16b9 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_ict_defconfig +1 -0
index 2568e3d..ac19a74 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_netboot_defconfig +1 -0
index 16071fb..31f1847 100644
@@ -37,6 +37,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_prompt_defconfig +1 -0
index bbad6dd..803304e 100644
@@ -34,6 +34,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_sdboot_defconfig +1 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/am335x_shc_sdboot_prompt_defconfig +1 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
configs/devkit3250_defconfig +1 -0
index e1a9b49..b69808c 100644
@@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
configs/ds414_defconfig +1 -0
index 5d1d6ab..d68e64e 100644
@@ -39,6 +39,7 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_GIGE=y
 CONFIG_MVNETA=y
 CONFIG_PCI=y
configs/khadas-vim_defconfig +1 -0
index f4674ef..0bfb594 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/libretech-cc_defconfig +1 -0
index 18ddb45..931496c 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/p212_defconfig +1 -0
index b6923f3..44221fc 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_PHY_MESON_GXL=y
 CONFIG_DM_ETH=y
configs/pepper_defconfig +1 -0
index a802e57..2752436 100644
@@ -30,6 +30,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_NETDEVICES=y
configs/work_92105_defconfig +1 -0
index 2451b56..76418f0 100644
@@ -35,6 +35,7 @@ CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LPC32XX_SSP=y
configs/x600_defconfig +1 -0
index 445759e..10d596b 100644
@@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y
 CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_NETDEVICES=y
drivers/net/phy/Kconfig +7 -0
index 179e041..f5821df 100644
@@ -13,12 +13,20 @@ menuconfig PHYLIB
 
 if PHYLIB
 
+config PHY_ADDR_ENABLE
+	bool "Limit phy address"
+	default y if ARCH_SUNXI
+	help
+	  Select this if you want to control which phy address is used
+
+if PHY_ADDR_ENABLE

drivers/net/phy/Kconfig menuconfig PHYLIB · line 32

Quoted 10 lines
drivers/net/phy/Kconfig +1 -0
 config PHY_ADDR
 	int "PHY address"
 	default 1 if ARCH_SUNXI
 	default 0
 	help
 	  The address of PHY on MII bus. Usually in range of 0 to 31.
+endif
 
 config B53_SWITCH
 	bool "Broadcom BCM53xx (RoboSwitch) Ethernet switch PHY support."

Hi,

For p212, libretech-cc and khadas-vim,

Neil

#3 lore raw

RFC PATCH 1/1 net: phy: Don't limit phy addresses by default

Quoted 9 lines · Neil Armstrong
Quoted 5 lines · Joe Hershberger

Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in.

See below for recommended change.

Quoted 207 lines
Quoted 207 lines

---

configs/am335x_baltos_defconfig            | 1 +
configs/am335x_shc_defconfig               | 1 +
configs/am335x_shc_ict_defconfig           | 1 +
configs/am335x_shc_netboot_defconfig       | 1 +
configs/am335x_shc_prompt_defconfig        | 1 +
configs/am335x_shc_sdboot_defconfig        | 1 +
configs/am335x_shc_sdboot_prompt_defconfig | 1 +
configs/devkit3250_defconfig               | 1 +
configs/ds414_defconfig                    | 1 +
configs/khadas-vim_defconfig               | 1 +
configs/libretech-cc_defconfig             | 1 +
configs/p212_defconfig                     | 1 +
configs/pepper_defconfig                   | 1 +
configs/work_92105_defconfig               | 1 +
configs/x600_defconfig                     | 1 +
drivers/net/phy/Kconfig                    | 8 ++++++++
16 files changed, 23 insertions(+)
configs/am335x_baltos_defconfig +0 -0
index ab7d96d..ed7d3a7 100644
@@ -42,6 +42,7 @@ CONFIG_BOOTCOUNT_LIMIT=y

CONFIG_SYS_OMAP24_I2C_SPEED=1000
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_defconfig +0 -0
index fb714da..ade16b9 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_ict_defconfig +0 -0
index 2568e3d..ac19a74 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_netboot_defconfig +0 -0
index 16071fb..31f1847 100644
@@ -37,6 +37,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_prompt_defconfig +0 -0
index bbad6dd..803304e 100644
@@ -34,6 +34,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_sdboot_defconfig +0 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/am335x_shc_sdboot_prompt_defconfig +0 -0
index 82a61a3..2d4f4d1 100644
@@ -36,6 +36,7 @@ CONFIG_CMD_MMC=y
 # CONFIG_SPL_ISO_PARTITION is not set

CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y

configs/devkit3250_defconfig +0 -0
index e1a9b49..b69808c 100644
@@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y

CONFIG_NAND=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=31
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y

configs/ds414_defconfig +0 -0
index 5d1d6ab..d68e64e 100644
@@ -39,6 +39,7 @@ CONFIG_SPL_OF_TRANSLATE=y

CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_GIGE=y
CONFIG_MVNETA=y
CONFIG_PCI=y

configs/khadas-vim_defconfig +0 -0
index f4674ef..0bfb594 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y

CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y

configs/libretech-cc_defconfig +0 -0
index 18ddb45..931496c 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y

CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y

configs/p212_defconfig +0 -0
index b6923f3..44221fc 100644
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y

CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y

configs/pepper_defconfig +0 -0
index a802e57..2752436 100644
@@ -30,6 +30,7 @@ CONFIG_CMD_SPI=y

CONFIG_CMD_EXT4_WRITE=y
CONFIG_MMC_OMAP_HS=y
CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y

configs/work_92105_defconfig +0 -0
index 2451b56..76418f0 100644
@@ -35,6 +35,7 @@ CONFIG_SPL_DM=y

CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
CONFIG_PHYLIB=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LPC32XX_SSP=y

configs/x600_defconfig +0 -0
index 445759e..10d596b 100644
@@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y

CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y

drivers/net/phy/Kconfig +0 -0
index 179e041..f5821df 100644
@@ -13,12 +13,20 @@ menuconfig PHYLIB
 
Quoted 5 lines

drivers/net/phy/Kconfig menuconfig PHYLIB · line 18

Quoted 5 lines

if PHYLIB

drivers/net/phy/Kconfig +3 -0
+config PHY_ADDR_ENABLE
+	bool "Limit phy address"
+	default y if ARCH_SUNXI

Not happy about this one being in this specific Kconfig.
This should be an ‘default’ or 'imply’ over in the sunxi top-level Kconfig (i.e. whereever ARCH_SUNXI is declared).

Quoted 22 lines
Quoted 12 lines
drivers/net/phy/Kconfig +4 -0
+	help
+	  Select this if you want to control which phy address is used
+
+if PHY_ADDR_ENABLE

config PHY_ADDR
int "PHY address"
default 1 if ARCH_SUNXI
default 0
help
The address of PHY on MII bus. Usually in range of 0 to 31.
+endif

Quoted 3 lines

config B53_SWITCH
bool "Broadcom BCM53xx (RoboSwitch) Ethernet switch PHY support."

Hi,

For p212, libretech-cc and khadas-vim,

Acked-by Neil Armstrong <narmstrong at baylibre.com <mailto:[email protected]>>

Neil

#4 lore raw

RFC PATCH 1/1 net: phy: Don't limit phy addresses by default

Quoted 34 lines · Dr. Philipp Tomsich
Quoted 9 lines · Neil Armstrong
Quoted 5 lines · Joe Hershberger

Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in.

See below for recommended change.

Quoted 20 lines
Quoted 20 lines

---

configs/am335x_baltos_defconfig            | 1 +
configs/am335x_shc_defconfig               | 1 +
configs/am335x_shc_ict_defconfig           | 1 +
configs/am335x_shc_netboot_defconfig       | 1 +
configs/am335x_shc_prompt_defconfig        | 1 +
configs/am335x_shc_sdboot_defconfig        | 1 +
configs/am335x_shc_sdboot_prompt_defconfig | 1 +
configs/devkit3250_defconfig               | 1 +
configs/ds414_defconfig                    | 1 +
configs/khadas-vim_defconfig               | 1 +
configs/libretech-cc_defconfig             | 1 +
configs/p212_defconfig                     | 1 +
configs/pepper_defconfig                   | 1 +
configs/work_92105_defconfig               | 1 +
configs/x600_defconfig                     | 1 +
drivers/net/phy/Kconfig                    | 8 ++++++++
16 files changed, 23 insertions(+)

[...]

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/phy/Kconfig +0 -0
index 179e041..f5821df 100644
@@ -13,12 +13,20 @@ menuconfig PHYLIB
 
Quoted 9 lines
Quoted 5 lines

drivers/net/phy/Kconfig menuconfig PHYLIB · line 18

Quoted 5 lines

if PHYLIB

drivers/net/phy/Kconfig +3 -0
+config PHY_ADDR_ENABLE
+    bool "Limit phy address"
+    default y if ARCH_SUNXI

Not happy about this one being in this specific Kconfig.
This should be an ‘default’ or 'imply’ over in the sunxi top-level Kconfig (i.e. whereever ARCH_SUNXI is declared).

Patches welcome. I'm not sure how Kconfig would react to that.

Quoted 27 lines
Quoted 17 lines
Quoted 12 lines
drivers/net/phy/Kconfig +4 -0
+    help
+      Select this if you want to control which phy address is used
+
+if PHY_ADDR_ENABLE

config PHY_ADDR
int "PHY address"
default 1 if ARCH_SUNXI
default 0
help
The address of PHY on MII bus. Usually in range of 0 to 31.
+endif

Quoted 3 lines

config B53_SWITCH
bool "Broadcom BCM53xx (RoboSwitch) Ethernet switch PHY support."

Hi,

Quoted 5 lines

For p212, libretech-cc and khadas-vim,

Acked-by Neil Armstrong <narmstrong at baylibre.com <mailto:[email protected]>>

Neil

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot