1. 24 Apr, 2017 1 commit
    • Roger Quadros's avatar
      mdio_bus: Issue GPIO RESET to PHYs. · 69226896
      Roger Quadros authored
      Some boards [1] leave the PHYs at an invalid state
      during system power-up or reset thus causing unreliability
      issues with the PHY which manifests as PHY not being detected
      or link not functional. To fix this, these PHYs need to be RESET
      via a GPIO connected to the PHY's RESET pin.
      Some boards have a single GPIO controlling the PHY RESET pin of all
      PHYs on the bus whereas some others have separate GPIOs controlling
      individual PHY RESETs.
      In both cases, the RESET de-assertion cannot be done in the PHY driver
      as the PHY will not probe till its reset is de-asserted.
      So do the RESET de-assertion in the MDIO bus driver.
      [1] - am572x-idk, am571x-idk, a437x-idk
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  2. 19 Feb, 2017 1 commit
  3. 30 Nov, 2016 1 commit
  4. 17 Nov, 2016 2 commits
  5. 17 Jul, 2016 1 commit
  6. 28 Jun, 2016 1 commit
    • Arnd Bergmann's avatar
      of_mdio: select fixed phy support unconditionally · a5e4bd99
      Arnd Bergmann authored
      Calling the fixed-phy functions when CONFIG_FIXED_PHY=m as a previous
      change tried cannot work if the caller is in built-in code:
      drivers/of/built-in.o: In function `of_phy_register_fixed_link':
      of_reserved_mem.c:(.text+0x85e0): undefined reference to `fixed_phy_register'
      Making of_mdio depend on 'FIXED_PHY || !FIXED_PHY' would solve this
      dependency by enforcing that OF_MDIO itself becomes a loadable module
      when FIXED_PHY=y, but that creates a different dependency as it
      breaks any built-in ethernet driver that uses of_mdio.
      Making FIXED_PHY a bool option also cannot work, since it depends on
      PHYLIB, which again is tristate.
      This version now uses 'select FIXED_PHY' to ensure that the fixed-phy
      portion of of_mdio is not optional. The main downside of this is
      a small increase in code size for cases that do not need fixed phy
      support, but it should avoid all of the link-time problems.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: d1bd330a
       ("of_mdio: Enable fixed PHY support if driver is a module")
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  7. 23 Jun, 2016 1 commit
  8. 01 May, 2016 1 commit
  9. 26 Apr, 2016 1 commit
  10. 19 Apr, 2016 1 commit
  11. 14 Mar, 2016 3 commits
  12. 01 Mar, 2016 2 commits
  13. 09 Feb, 2016 1 commit
  14. 29 Jan, 2016 2 commits
  15. 12 Jan, 2016 1 commit
  16. 07 Jan, 2016 5 commits
  17. 25 Sep, 2015 1 commit
    • Russell King's avatar
      of_mdio: fix MDIO phy device refcounting · f018ae7a
      Russell King authored
      bus_find_device() is defined as:
       * This is similar to the bus_for_each_dev() function above, but it
       * returns a reference to a device that is 'found' for later use, as
       * determined by the @match callback.
      and it does indeed return a reference-counted pointer to the device:
              while ((dev = next_device(&i)))
                      if (match(dev, data) && get_device(dev))
              return dev;
      What that means is that when we're done with the struct device, we must
      drop that reference.  Neither of_phy_connect() nor of_phy_attach() did
      this when phy_connect_direct() or phy_attach_direct() failed.
      With our previous patch, phy_connect_direct() and phy_attach_direct()
      take a new refcount on the phy device when successful, so we can drop
      our local reference immediatley after these functions, whether or not
      they succeeded.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  18. 31 Aug, 2015 1 commit
  19. 21 Jul, 2015 1 commit
    • Stas Sergeev's avatar
      of_mdio: add new DT property 'managed' to specify the PHY management type · 4cba5c21
      Stas Sergeev authored
      Currently the PHY management type is selected by the MAC driver arbitrary.
      The decision is based on the presence of the "fixed-link" node and on a
      will of the driver's authors.
      This caused a regression recently, when mvneta driver suddenly started
      to use the in-band status for auto-negotiation on fixed links.
      It appears the auto-negotiation may not work when expected by the MAC driver.
      Sebastien Rannou explains:
      << Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
      a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
      inband status) is connected to the switch through QSGMII, and in this context
      we are on the media side of the PHY. >>
      This patch introduces the new string property 'managed' that allows
      the user to set the management type explicitly.
      The supported values are:
      "auto" - default. Uses either MDIO or nothing, depending on the presence
      of the fixed-link node
      "in-band-status" - use in-band status
      Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Florian Fainelli <f.fainelli@gmail.com>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: devicetree@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  20. 14 May, 2015 1 commit
    • Florian Fainelli's avatar
      of: mdio: Add a "broken-turn-around" property · ab6016e0
      Florian Fainelli authored
      Some Ethernet PHY devices/switches may not properly release the MDIO bus
      during turn-around time, and fail to drive it low, which can be seen by
      some controllers as a read failure, while the data clocked in is still
      Add a boolean property "broken-turn-around" which is parsed by the
      generic MDIO bus probing code and will set the corresponding bit in the
      MDIO bus phy_ignore_ta_mask bitmask for MDIO bus drivers to utilize that
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  21. 11 Mar, 2015 1 commit
  22. 07 Oct, 2014 1 commit
    • Petri Gynther's avatar
      net: phy: adjust fixed_phy_register() return value · fd2ef0ba
      Petri Gynther authored
      Adjust fixed_phy_register() to return struct phy_device *, so that
      it becomes easy to use fixed PHYs without device tree support:
        phydev = fixed_phy_register(PHY_POLL, &fixed_phy_status, NULL);
        fixed_phy_set_link_update(phydev, fixed_phy_link_update);
        phy_connect_direct(netdev, phydev, handler_fn, phy_interface);
      This change is a prerequisite for modifying bcmgenet driver to work
      without a device tree on Broadcom's MIPS-based 7xxx platforms.
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  23. 19 Sep, 2014 1 commit
    • Florian Fainelli's avatar
      of: mdio: honor flags passed to of_phy_connect · 2f637151
      Florian Fainelli authored
      Commit f9a8f83b ("net: phy: remove flags argument from phy_{attach,
      connect, connect_direct}") removed the flags argument to the PHY library
      calls to: phy_{attach,connect,connect_direct}.
      Most Device Tree aware drivers call of_phy_connect() with the flag
      argument set to 0, but some of them might want to set a different value
      there in order for the PHY driver to key a specific behavior based on
      the phy_device::phy_flags value.
      Allow such drivers to set custom phy_flags as part of the
      of_phy_connect() call since of_phy_connect() does start the PHY state
      machine, it will call into the PHY driver config_init() callback which
      is usually where a specific phy_flags value is important.
      Fixes: f9a8f83b
       ("net: phy: remove flags argument from phy_{attach, connect, connect_direct}")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  24. 02 Jul, 2014 1 commit
  25. 23 Jun, 2014 1 commit
  26. 02 Jun, 2014 2 commits
  27. 29 May, 2014 3 commits
  28. 26 May, 2014 1 commit