2019-05-19 13:07:45 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phylink: add phylink infrastructure
The link between the ethernet MAC and its PHY has become more complex
as the interface evolves. This is especially true with serdes links,
where the part of the PHY is effectively integrated into the MAC.
Serdes links can be connected to a variety of devices, including SFF
modules soldered down onto the board with the MAC, a SFP cage with
a hotpluggable SFP module which may contain a PHY or directly modulate
the serdes signals onto optical media with or without a PHY, or even
a classical PHY connection.
Moreover, the negotiation information on serdes links comes in two
varieties - SGMII mode, where the PHY provides its speed/duplex/flow
control information to the MAC, and 1000base-X mode where both ends
exchange their abilities and each resolve the link capabilities.
This means we need a more flexible means to support these arrangements,
particularly with the hotpluggable nature of SFP, where the PHY can
be attached or detached after the network device has been brought up.
Ethtool information can come from multiple sources:
- we may have a PHY operating in either SGMII or 1000base-X mode, in
which case we take ethtool/mii data directly from the PHY.
- we may have a optical SFP module without a PHY, with the MAC
operating in 1000base-X mode - the ethtool/mii data needs to come
from the MAC.
- we may have a copper SFP module with a PHY whic can't be accessed,
which means we need to take ethtool/mii data from the MAC.
Phylink aims to solve this by providing an intermediary between the
MAC and PHY, providing a safe way for PHYs to be hotplugged, and
allowing a SFP driver to reconfigure the serdes connection.
Phylink also takes over support of fixed link connections, where the
speed/duplex/flow control are fixed, but link status may be controlled
by a GPIO signal. By avoiding the fixed-phy implementation, phylink
can provide a faster response to link events: fixed-phy has to wait for
phylib to operate its state machine, which can take several seconds.
In comparison, phylink takes milliseconds.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- remove sync status
- rework supported and advertisment handling
- add 1000base-x speed for fixed links
- use functionality exported from phy-core, reworking
__phylink_ethtool_ksettings_set for it
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-25 15:03:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-18 14:59:20 +02:00
|
|
|
|
2018-04-27 12:41:49 -07:00
|
|
|
|
2017-09-18 14:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-12 23:28:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-02 00:49:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
2017-11-02 00:49:18 +01:00
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2024-08-12 09:30:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-20 10:45:51 +02:00
|
|
|
|
2023-04-26 10:15:31 +02:00
|
|
|
|
2023-04-20 10:45:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2023-12-13 09:42:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 15:03:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-19 09:41:39 -07:00
|
|
|
|
2017-07-25 15:03:39 +01:00
|
|
|
|
|
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
net: phy: Add support for Aeonsemi AS21xxx PHYs
Add support for Aeonsemi AS21xxx 10G C45 PHYs. These PHYs integrate
an IPC to setup some configuration and require special handling to
sync with the parity bit. The parity bit is a way the IPC use to
follow correct order of command sent.
Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1,
AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1,
AS21210PB1 that all register with the PHY ID 0x7500 0x7510
before the firmware is loaded.
They all support up to 5 LEDs with various HW mode supported.
While implementing it was found some strange coincidence with using the
same logic for implementing C22 in MMD regs in Broadcom PHYs.
For reference here the AS21xxx PHY name logic:
AS21x1xxB1
^ ^^
| |J: Supports SyncE/PTP
| |P: No SyncE/PTP support
| 1: Supports 2nd Serdes
| 2: Not 2nd Serdes support
0: 10G, 5G, 2.5G
5: 5G, 2.5G
2: 2.5G
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://patch.msgid.link/20250517201353.5137-6-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-17 22:13:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-26 17:23:05 +01:00
|
|
|
|
|
|
|
|
|
2026-01-19 11:12:17 +02:00
|
|
|
|
2024-03-26 17:23:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2023-09-24 10:19:02 +02:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2023-09-24 10:19:02 +02:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-18 21:36:04 +01:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-16 16:09:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-29 18:34:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-28 07:35:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-14 15:08:41 +01:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2019-06-07 17:37:34 +12:00
|
|
|
|
2018-04-19 14:05:18 +12:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-13 09:42:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-21 22:04:53 -07:00
|
|
|
|
|
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-12 23:28:18 +02:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2018-09-12 01:53:10 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-21 16:23:30 -07:00
|
|
|
|
2019-03-20 12:53:13 -07:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2019-03-20 12:53:13 -07:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-21 22:04:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
2017-05-29 09:11:30 +00:00
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-05-29 09:11:30 +00:00
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2015-10-06 12:25:47 -07:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-05 23:41:11 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-06-05 23:41:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-07-15 16:26:33 +08:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2017-06-05 12:23:16 +01:00
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-06-05 12:23:16 +01:00
|
|
|
|
|
|
|
|
|
2023-07-19 08:42:58 +02:00
|
|
|
|
|
|
|
|
|
2024-02-18 08:57:45 +01:00
|
|
|
|
2023-07-19 08:42:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-15 17:19:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 13:32:12 +08:00
|
|
|
|
|
|
|
|
|
2022-06-22 16:17:16 +02:00
|
|
|
|
|
|
|
|
|
2021-07-19 13:32:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-21 23:28:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-09 00:34:51 +08:00
|
|
|
|
2023-06-11 00:48:10 +01:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2022-03-14 12:02:54 +01:00
|
|
|
|
2025-06-12 23:28:18 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
net: phy: micrel: Update Kconfig help text
This driver by now supports 17 different Microchip (formerly known as
Micrel) chips: KSZ9021, KSZ9031, KSZ9131, KSZ8001, KS8737, KSZ8021,
KSZ8031, KSZ8041, KSZ8051, KSZ8061, KSZ8081, KSZ8873MLL, KSZ886X,
KSZ9477, LAN8814, LAN8804 and LAN8841.
Support for the VSC8201 was removed in commit 51f932c4870f ("micrel phy
driver - updated(1)")
Update the help text to reflect that, list families instead of models to
ease future maintenance.
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250911-micrel-kconfig-v2-1-e8f295059050@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-11 10:29:03 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2023-04-21 18:38:54 +02:00
|
|
|
|
2023-05-26 20:53:43 +05:30
|
|
|
|
2023-04-21 18:38:54 +02:00
|
|
|
|
2025-10-30 15:52:57 +05:30
|
|
|
|
2024-10-10 13:52:04 +05:30
|
|
|
|
2023-04-21 18:38:54 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2016-07-25 17:12:40 -07:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-07-25 17:12:40 -07:00
|
|
|
|
2018-05-02 21:09:17 +05:30
|
|
|
|
|
|
|
|
|
2025-01-10 11:14:24 +05:30
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2024-12-19 18:03:09 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-02 21:09:17 +05:30
|
|
|
|
2016-08-05 17:54:21 +05:30
|
|
|
|
2016-09-08 14:09:31 +05:30
|
|
|
|
2020-01-13 23:31:46 +01:00
|
|
|
|
ethernet: fix PTP_1588_CLOCK dependencies
The 'imply' keyword does not do what most people think it does, it only
politely asks Kconfig to turn on another symbol, but does not prevent
it from being disabled manually or built as a loadable module when the
user is built-in. In the ICE driver, the latter now causes a link failure:
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':
This is a recurring problem in many drivers, and we have discussed
it several times befores, without reaching a consensus. I'm providing
a link to the previous email thread for reference, which discusses
some related problems.
To solve the dependency issue better than the 'imply' keyword, introduce a
separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
can depend on if it is able to use PTP support when available, but works
fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
then prevented from being built-in, the same way as with a 'depends on
PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
but that can be rather confusing when you first see it.
Since this should cover the dependencies correctly, the IS_REACHABLE()
hack in the header is no longer needed now, and can be turned back
into a normal IS_ENABLED() check. Any driver that gets the dependency
wrong will now cause a link time failure rather than being unable to use
PTP support when that is in a loadable module.
However, the two recently added ptp_get_vclocks_index() and
ptp_convert_timestamp() interfaces are only called from builtin code with
ethtool and socket timestamps, so keep the current behavior by stubbing
those out completely when PTP is in a loadable module. This should be
addressed properly in a follow-up.
As Richard suggested, we may want to actually turn PTP support into a
'bool' option later on, preventing it from being a loadable module
altogether, which would be one way to solve the problem with the ethtool
interface.
Fixes: 06c16d89d2cb ("ice: register 1588 PTP clock device object for E810 devices")
Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
Acked-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-12 20:33:58 +02:00
|
|
|
|
2020-06-25 09:18:16 +02:00
|
|
|
|
2025-06-12 23:28:18 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
net: phy: mscc: add support for VSC8514 PHY.
The VSC8514 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX,
1000BASE-X, can communicate with the MAC via QSGMII.
The MAC interface protocol for each port within QSGMII can
be either 1000BASE-X or SGMII, if the QSGMII MAC that the VSC8514 is
connecting to supports this functionality.
VSC8514 also supports SGMII MAC-side autonegotiation on each individual
port, downshifting, can set the blinking pattern of each of its 4 LEDs,
SyncE, 1000BASE-T Ring Resiliency as well as HP Auto-MDIX detection.
This adds support for 10BASE-T, 100BASE-TX, and 1000BASE-T,
QSGMII link with the MAC, downshifting, HP Auto-MDIX detection
and blinking pattern for its 4 LEDs.
The GPIO register bank is a set of registers that are common to all PHYs
in the package. So any modification in any register of this bank affects
all PHYs of the package.
If the PHYs haven't been reset before booting the Linux kernel and were
configured to use interrupts for e.g. link status updates, it is
required to clear the interrupts mask register of all PHYs before being
able to use interrupts with any PHY. The first PHY of the package that
will be init will take care of clearing all PHYs interrupts mask
registers. Thus, we need to keep track of the init sequence in the
package, if it's already been done or if it's to be done.
Most of the init sequence of a PHY of the package is common to all PHYs
in the package, thus we use the SMI broadcast feature which enables us
to propagate a write in one register of one PHY to all PHYs in the same
package.
Signed-off-by: Kavya Sree Kotagiri <kavyasree.kotagiri@microchip.com>
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Co-developed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-22 11:51:35 +00:00
|
|
|
|
2016-08-05 17:54:21 +05:30
|
|
|
|
2021-05-20 12:32:30 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-02 11:00:37 +08:00
|
|
|
|
2021-05-20 12:32:30 -04:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
net: phy: add basic driver for NXP CBTX PHY
The CBTX PHY is a Fast Ethernet PHY integrated into the SJA1110 A/B/C
automotive Ethernet switches.
It was hoped it would work with the Generic PHY driver, but alas, it
doesn't. The most important reason why is that the PHY is powered down
by default, and it needs a vendor register to power it on.
It has a linear memory map that is accessed over SPI by the SJA1110
switch driver, which exposes a fake MDIO controller. It has the
following (and only the following) standard clause 22 registers:
0x0: MII_BMCR
0x1: MII_BMSR
0x2: MII_PHYSID1
0x3: MII_PHYSID2
0x4: MII_ADVERTISE
0x5: MII_LPA
0x6: MII_EXPANSION
0x7: the missing MII_NPAGE for Next Page Transmit Register
Every other register is vendor-defined.
The register map expands the standard clause 22 5-bit address space of
0x20 registers, however the driver does not need to access the extra
registers for now (and hopefully never). If it ever needs to do that, it
is possible to implement a fake (software) page switching mechanism
between the PHY driver and the SJA1110 MDIO controller driver.
Also, Auto-MDIX is turned off by default in hardware, the driver turns
it on by default and reports the current status. I've tested this with a
VSC8514 link partner and a crossover cable, by forcing the mode on the
link partner, and seeing that the CBTX PHY always sees the reverse of
the mode forced on the VSC8514 (and that traffic works). The link
doesn't come up (as expected) if MDI modes are forced on both ends in
the same way (with the cross-over cable, that is).
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230418190141.1040562-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-18 22:01:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-19 19:14:00 +03:00
|
|
|
|
|
|
|
|
|
ethernet: fix PTP_1588_CLOCK dependencies
The 'imply' keyword does not do what most people think it does, it only
politely asks Kconfig to turn on another symbol, but does not prevent
it from being disabled manually or built as a loadable module when the
user is built-in. In the ICE driver, the latter now causes a link failure:
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':
This is a recurring problem in many drivers, and we have discussed
it several times befores, without reaching a consensus. I'm providing
a link to the previous email thread for reference, which discusses
some related problems.
To solve the dependency issue better than the 'imply' keyword, introduce a
separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
can depend on if it is able to use PTP support when available, but works
fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
then prevented from being built-in, the same way as with a 'depends on
PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
but that can be rather confusing when you first see it.
Since this should cover the dependencies correctly, the IS_REACHABLE()
hack in the header is no longer needed now, and can be turned back
into a normal IS_ENABLED() check. Any driver that gets the dependency
wrong will now cause a link time failure rather than being unable to use
PTP support when that is in a loadable module.
However, the two recently added ptp_get_vclocks_index() and
ptp_convert_timestamp() interfaces are only called from builtin code with
ethtool and socket timestamps, so keep the current behavior by stubbing
those out completely when PTP is in a loadable module. This should be
addressed properly in a follow-up.
As Richard suggested, we may want to actually turn PTP support into a
'bool' option later on, preventing it from being a loadable module
altogether, which would be one way to solve the problem with the ethtool
interface.
Fixes: 06c16d89d2cb ("ice: register 1588 PTP clock device object for E810 devices")
Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
Acked-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-12 20:33:58 +02:00
|
|
|
|
2023-12-19 16:53:31 +02:00
|
|
|
|
2021-04-19 19:14:00 +03:00
|
|
|
|
|
|
|
|
|
2025-02-28 17:43:20 +02:00
|
|
|
|
2021-04-19 19:14:00 +03:00
|
|
|
|
2019-05-24 16:22:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2025-09-05 14:20:50 +02:00
|
|
|
|
2019-05-24 16:22:28 +02:00
|
|
|
|
2023-01-09 18:00:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 15:15:19 +01:00
|
|
|
|
2019-11-06 23:36:12 +01:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
2025-01-11 21:50:19 +01:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2017-10-08 13:40:08 +00:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-10-08 13:40:08 +00:00
|
|
|
|
|
|
|
|
|
2017-08-10 21:56:40 +08:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2019-09-23 17:52:43 +02:00
|
|
|
|
2017-08-10 21:56:40 +08:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2023-07-25 16:54:30 -07:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:06 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2020-08-27 04:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-06 06:23:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-12 06:41:44 +01:00
|
|
|
|
|
|
|
|
|
2024-08-12 09:30:46 +02:00
|
|
|
|
2023-12-12 06:41:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2016-08-18 23:56:05 +02:00
|
|
|
|
2016-08-10 11:20:08 +05:30
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-08-14 15:43:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-10 11:20:08 +05:30
|
|
|
|
2007-05-10 22:52:55 -07:00
|
|
|
|