1. 19 Dec, 2023 13 commits
  2. 18 Dec, 2023 23 commits
  3. 17 Dec, 2023 4 commits
    • David S. Miller's avatar
      Merge branch 'phy-ackage-addr-mmd-apis' · 54f4c257
      David S. Miller authored
      Christian Marangi says:
      
      ====================
      net: phy: add PHY package base addr + mmd APIs
      
      This small series is required for the upcoming qca807x PHY that
      will make use of PHY package mmd API and the new implementation
      with read/write based on base addr.
      
      The MMD PHY package patch currently has no use but it will be
      used in the upcoming patch and it does complete what a PHY package
      may require in addition to basic read/write to setup global PHY address.
      
      (Changelog for all the revision is present in the single patch)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54f4c257
    • Christian Marangi's avatar
      net: phy: add support for PHY package MMD read/write · d63710fc
      Christian Marangi authored
      Some PHY in PHY package may require to read/write MMD regs to correctly
      configure the PHY package.
      
      Add support for these additional required function in both lock and no
      lock variant.
      
      It's assumed that the entire PHY package is either C22 or C45. We use
      C22 or C45 way of writing/reading to mmd regs based on the passed phydev
      whether it's C22 or C45.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d63710fc
    • Christian Marangi's avatar
      net: phy: restructure __phy_write/read_mmd to helper and phydev user · 028672bd
      Christian Marangi authored
      Restructure phy_write_mmd and phy_read_mmd to implement generic helper
      for direct mdiobus access for mmd and use these helper for phydev user.
      
      This is needed in preparation of PHY package API that requires generic
      access to the mdiobus and are deatched from phydev struct but instead
      access them based on PHY package base_addr and offsets.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      028672bd
    • Christian Marangi's avatar
      net: phy: extend PHY package API to support multiple global address · 9eea577e
      Christian Marangi authored
      Current API for PHY package are limited to single address to configure
      global settings for the PHY package.
      
      It was found that some PHY package (for example the qca807x, a PHY
      package that is shipped with a bundle of 5 PHY) requires multiple PHY
      address to configure global settings. An example scenario is a PHY that
      have a dedicated PHY for PSGMII/serdes calibrarion and have a specific
      PHY in the package where the global PHY mode is set and affects every
      other PHY in the package.
      
      Change the API in the following way:
      - Change phy_package_join() to take the base addr of the PHY package
        instead of the global PHY addr.
      - Make __/phy_package_write/read() require an additional arg that
        select what global PHY address to use by passing the offset from the
        base addr passed on phy_package_join().
      
      Each user of this API is updated to follow this new implementation
      following a pattern where an enum is defined to declare the offset of the
      addr.
      
      We also drop the check if shared is defined as any user of the
      phy_package_read/write is expected to use phy_package_join first. Misuse
      of this will correctly trigger a kernel panic for NULL pointer
      exception.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9eea577e