1. 10 Feb, 2024 3 commits
    • Christian Marangi's avatar
      net: phy: add devm/of_phy_package_join helper · 471e8fd3
      Christian Marangi authored
      Add devm/of_phy_package_join helper to join PHYs in a PHY package. These
      are variant of the manual phy_package_join with the difference that
      these will use DT nodes to derive the base_addr instead of manually
      passing an hardcoded value.
      
      An additional value is added in phy_package_shared, "np" to reference
      the PHY package node pointer in specific PHY driver probe_once and
      config_init_once functions to make use of additional specific properties
      defined in the PHY package node in DT.
      
      The np value is filled only with of_phy_package_join if a valid PHY
      package node is found. A valid PHY package node must have the node name
      set to "ethernet-phy-package".
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      471e8fd3
    • Christian Marangi's avatar
      net: phy: add support for scanning PHY in PHY packages nodes · 385ef48f
      Christian Marangi authored
      Add support for scanning PHY in PHY package nodes. PHY packages nodes
      are just container for actual PHY on the MDIO bus.
      
      Their PHY address defined in the PHY package node are absolute and
      reflect the address on the MDIO bus.
      
      mdio_bus.c and of_mdio.c is updated to now support and parse also
      PHY package subnode by checking if the node name match
      "ethernet-phy-package".
      
      As PHY package reg is mandatory and each PHY in the PHY package must
      have a reg, every invalid PHY Package node is ignored and will be
      skipped by the autoscan fallback.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      385ef48f
    • Christian Marangi's avatar
      dt-bindings: net: document ethernet PHY package nodes · 8453c88c
      Christian Marangi authored
      Document ethernet PHY package nodes used to describe PHY shipped in
      bundle of 2-5 PHY. The special node describe a container of PHY that
      share common properties. This is a generic schema and PHY package
      should create specialized version with the required additional shared
      properties.
      
      Example are PHY packages that have some regs only in one PHY of the
      package and will affect every other PHY in the package, for example
      related to PHY interface mode calibration or global PHY mode selection.
      
      The PHY package node MUST declare the base address used by the PHY driver
      for global configuration by calculating the offsets of the global PHY
      based on the base address of the PHY package.
      
      Each reg of the PHYs defined in the PHY package node is absolute and
      describe the real address of the Ethernet PHY on the bus.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8453c88c
  2. 09 Feb, 2024 37 commits