linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/15] net: phy: adin: add support for Analog Devices PHYs
@ 2019-08-08 12:30 Alexandru Ardelean
  2019-08-08 12:30 ` [PATCH v2 01/15] " Alexandru Ardelean
                   ` (15 more replies)
  0 siblings, 16 replies; 34+ messages in thread
From: Alexandru Ardelean @ 2019-08-08 12:30 UTC (permalink / raw)
  To: netdev, devicetree, linux-kernel
  Cc: davem, robh+dt, mark.rutland, f.fainelli, hkallweit1, andrew,
	Alexandru Ardelean

This changeset adds support for Analog Devices Industrial Ethernet PHYs.
Particularly the PHYs this driver adds support for:
 * ADIN1200 - Robust, Industrial, Low Power 10/100 Ethernet PHY
 * ADIN1300 - Robust, Industrial, Low Latency 10/100/1000 Gigabit
   Ethernet PHY

The 2 chips are pin & register compatible with one another. The main
difference being that ADIN1200 doesn't operate in gigabit mode.

The chips can be operated by the Generic PHY driver as well via the
standard IEEE PHY registers (0x0000 - 0x000F) which are supported by the
kernel as well. This assumes that configuration of the PHY has been done
completely in HW, according to spec, i.e. no extra SW configuration
required.

This changeset also implements the ability to configure the chips via SW
registers.

Datasheets:
  https://www.analog.com/media/en/technical-documentation/data-sheets/ADIN1300.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/ADIN1200.pdf

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Alexandru Ardelean (15):
  net: phy: adin: add support for Analog Devices PHYs
  net: phy: adin: hook genphy_read_abilities() to get_features
  net: phy: adin: hook genphy_{suspend,resume} into the driver
  net: phy: adin: add support for interrupts
  net: phy: adin: add {write,read}_mmd hooks
  net: phy: adin: configure RGMII/RMII/MII modes on config
  net: phy: adin: make RGMII internal delays configurable
  net: phy: adin: make RMII fifo depth configurable
  net: phy: adin: add support MDI/MDIX/Auto-MDI selection
  net: phy: adin: add EEE translation layer from Clause 45 to Clause 22
  net: phy: adin: implement PHY subsystem software reset
  net: phy: adin: implement Energy Detect Powerdown mode
  net: phy: adin: configure downshift on config_init
  net: phy: adin: add ethtool get_stats support
  dt-bindings: net: add bindings for ADIN PHY driver

 .../devicetree/bindings/net/adi,adin.yaml     |  76 ++
 MAINTAINERS                                   |   8 +
 drivers/net/phy/Kconfig                       |   9 +
 drivers/net/phy/Makefile                      |   1 +
 drivers/net/phy/adin.c                        | 732 ++++++++++++++++++
 5 files changed, 826 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/adi,adin.yaml
 create mode 100644 drivers/net/phy/adin.c

-- 


Changelog v1 -> v2:
[ patch numbers are from v1 ]

* patch 01/16: net: phy: adin: add support for Analog Devices PHYs
   - return genphy_config_init() directly
   - remove `features` field; the ADIN1200/ADIN1300 support the standard IEEE regs
     for reading link caps
   - use PHY_ID_MATCH_MODEL() macro in `adin_tbl` and `adin_driver` tables
* added new patch: net: phy: adin: hook genphy_read_abilities() to get_features
   - this hooks the genphy_read_abilities() to `get_features` hook to make sure
     that features are initialized correctly
* patch 03/16: net: phy: adin: add support for interrupts
   - removed deprecated `.flags = PHY_HAS_INTERRUPT,`
   - compress return code in `adin_phy_ack_intr()`
* patch 04/16: net: phy: adin: add {write,read}_mmd hooks
   - changed reg-style to 4 digit format; it was the only place where this was
     inconsistent
* patch 05/16: net: phy: adin: configure RGMII/RMII/MII modes on config
   - removed `goto` statements; used `phy_clear_bits_mmd()` for clean
     disable-n-exit path
   - dev_info -> phydev_dbg
   - fixed `phy_interface_t` type conversion for rc; reverted back to `int` in 
     `genphy_config_init()`
   - added missing space in commit description
     `For RGMII with internal delays (modes RGMII_ID, RGMII_TXID, RGMII_RXID)`
   - overall: things have been simplified since this no longer needs to account
     for `phy-mode-internal` thingi/patch
* dropped: patch 06/16: net: phy: adin: support PHY mode converters
* patch 07/16: net: phy: adin: make RGMII internal delays configurable
   - changed mechanism, to specify delays in pico-seconds and convert them
     to register values; mechanism will be used for RMII fifo depth as well
   - fixed masking bug for internal delays when reworking this mechanism
   - changed DT props `adi,{rx,tx}-internal-delay` -> `adi,{rx,tx}-internal-delay-ps`
* patch 08/16: net: phy: adin: make RMII fifo depth configurable
   - using same mechanism to access access RMII fifo depth bits
   - changed DT prop `adi,fifo-depth` -> `adi,fifo-depth-bits`
* patch 10/16: net: phy: adin: add EEE translation layer for Clause 22
   - use `phydev_err` instead of `pr_err()` in `adin_cl22_to_adin_reg()` helper
   - renamed types from cl22 -> cl45 or clause22 -> clause45; the translation
     is from Clause 45 to Clause 22 indirect access
* patch 11/16: net: phy: adin: PHY reset mechanisms
   - dropped GPIO logic; using phylib's
   - doing SW subsystem reset if there is no reset GPIO defined via phylib
* dropped: patch 12/16: net: phy: adin: read EEE setting from device-tree
* patch 14/16: net: phy: adin: make sure down-speed auto-neg is enabled
   - use `phy_set_bits` to enable/disable down-speed
   - implemented downshift similar to marvell driver; also configuring
     num-speed retries
* patch 15/16:  net: phy: adin: add ethtool get_stats support
   - changed `do_not_inc` -> `do_not_accumulate`
   - in commit comment: `incremented` -> `accumulated`
   - use `strlcpy()` instead of `memcpy()` for get_stats
* patch 16/16: dt-bindings: net: add bindings for ADIN PHY driver
   - updated bindings with all stuff that was left in the driver; some things
     went away (like reset-gpio)
   - implemented Rob's suggestions

2.20.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2019-08-09 12:33 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 12:30 [PATCH v2 00/15] net: phy: adin: add support for Analog Devices PHYs Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 01/15] " Alexandru Ardelean
2019-08-08 15:13   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 02/15] net: phy: adin: hook genphy_read_abilities() to get_features Alexandru Ardelean
2019-08-08 15:24   ` Andrew Lunn
2019-08-08 19:32     ` Heiner Kallweit
2019-08-09 12:00       ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 03/15] net: phy: adin: hook genphy_{suspend,resume} into the driver Alexandru Ardelean
2019-08-08 15:24   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 04/15] net: phy: adin: add support for interrupts Alexandru Ardelean
2019-08-08 15:25   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 05/15] net: phy: adin: add {write,read}_mmd hooks Alexandru Ardelean
2019-08-08 15:35   ` Andrew Lunn
2019-08-09 12:05     ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 06/15] net: phy: adin: configure RGMII/RMII/MII modes on config Alexandru Ardelean
2019-08-08 15:38   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 07/15] net: phy: adin: make RGMII internal delays configurable Alexandru Ardelean
2019-08-08 15:40   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 08/15] net: phy: adin: make RMII fifo depth configurable Alexandru Ardelean
2019-08-08 15:42   ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 09/15] net: phy: adin: add support MDI/MDIX/Auto-MDI selection Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 10/15] net: phy: adin: add EEE translation layer from Clause 45 to Clause 22 Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 11/15] net: phy: adin: implement PHY subsystem software reset Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 12/15] net: phy: adin: implement Energy Detect Powerdown mode Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 13/15] net: phy: adin: configure downshift on config_init Alexandru Ardelean
2019-08-08 19:38   ` Heiner Kallweit
2019-08-08 20:39     ` Andrew Lunn
2019-08-09 12:06       ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 14/15] net: phy: adin: add ethtool get_stats support Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 15/15] dt-bindings: net: add bindings for ADIN PHY driver Alexandru Ardelean
2019-08-08 23:03   ` Rob Herring
2019-08-09 12:06     ` Ardelean, Alexandru
2019-08-08 18:24 ` [PATCH v2 00/15] net: phy: adin: add support for Analog Devices PHYs David Miller
2019-08-09 12:32   ` Ardelean, Alexandru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).