Hi Ramon,

On 4/26/21 5:46 PM, Patrick Delaunay wrote:
The gpio reset and the assert or deassert delay are defined in generic
binding of the ethernet phy in Linux:
Documentation/devicetree/bindings/net/ethernet-phy.yaml

   reset-gpios:
     maxItems: 1
     description:
       The GPIO phandle and specifier for the PHY reset signal.

   reset-assert-us:
     description:
       Delay after the reset was asserted in microseconds. If this
       property is missing the delay will be skipped.

   reset-deassert-us:
     description:
       Delay after the reset was deasserted in microseconds. If
       this property is missing the delay will be skipped.

See also U-Boot: doc/device-tree-bindings/net/phy.txt

This patch adds the parsing of this common DT properties in the
u-class "eth_phy_generic", used by default in the associated driver
"eth_phy_generic_drv"

This parsing function eth_phy_of_to_plat can be reused by other
ethernet phy drivers for this uclass UCLASS_ETH_PHY.

Signed-off-by: Patrick Delaunay <patrick.delau...@foss.st.com>
---

Changes in v2:
- Update eth-phy driver (NEW)

  drivers/net/eth-phy-uclass.c | 50 ++++++++++++++++++++++++++++++++++++
  1 file changed, 50 insertions(+)


This patch cause issue on some board without CONFIG_DM_GPIO

   powerpc:  w+   ids8313 socrates UCP1020 P3041DS P3041DS_NAND P3041DS_SDCARD P3041DS_SPIFLASH P4080DS P4080DS_SDCARD P4080DS_SPIFLASH P5040DS P5040DS_NAND P5040DS_SDCARD P5040DS_SPIFLASH MPC8548CDS MPC8548CDS_36BIT MPC8548CDS_legacy T2080QDS T2080QDS_NAND T2080QDS_SDCARD T2080QDS_SECURE_BOOT T2080QDS_SPIFLASH T2080QDS_SRIO_PCIE_BOOT kmcent2 MCR3000 MPC8349EMDS MPC8349EMDS_PCI64 MPC8349EMDS_SDRAM MPC8349EMDS_SLAVE +   MPC837XERDB kmcoge5ne kmeter1 kmopti2 kmsupx5 kmtegr1 kmtepr2 tuge1 tuxx1 +powerpc-linux-ld.bfd: drivers/net/eth-phy-uclass.o: in function `eth_phy_of_to_plat': +drivers/net/eth-phy-uclass.c:133: undefined reference to `gpio_request_by_name' +powerpc-linux-ld.bfd: drivers/net/eth-phy-uclass.o: in function `eth_phy_reset': +drivers/net/eth-phy-uclass.c:153: undefined reference to `dm_gpio_set_value'
+make[1]: *** [Makefile:1788: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2


I detect the issue in my stm32/next branch

but I will sent a V3 of the serie with an correction.

Patrick

Reply via email to