2019-05-19 20:07:45 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2019-05-03 04:23:30 +08:00
|
|
|
config NET_DSA_SJA1105
|
|
|
|
tristate "NXP SJA1105 Ethernet switch family support"
|
|
|
|
depends on NET_DSA && SPI
|
2019-05-05 18:19:27 +08:00
|
|
|
select NET_DSA_TAG_SJA1105
|
2019-05-03 04:23:30 +08:00
|
|
|
select PACKING
|
|
|
|
select CRC32
|
|
|
|
help
|
|
|
|
This is the driver for the NXP SJA1105 automotive Ethernet switch
|
|
|
|
family. These are 5-port devices and are managed over an SPI
|
|
|
|
interface. Probing is handled based on OF bindings and so is the
|
2019-06-08 21:03:42 +08:00
|
|
|
linkage to PHYLINK. The driver supports the following revisions:
|
2019-05-03 04:23:30 +08:00
|
|
|
- SJA1105E (Gen. 1, No TT-Ethernet)
|
|
|
|
- SJA1105T (Gen. 1, TT-Ethernet)
|
|
|
|
- SJA1105P (Gen. 2, No SGMII, No TT-Ethernet)
|
|
|
|
- SJA1105Q (Gen. 2, No SGMII, TT-Ethernet)
|
|
|
|
- SJA1105R (Gen. 2, SGMII, No TT-Ethernet)
|
|
|
|
- SJA1105S (Gen. 2, SGMII, TT-Ethernet)
|
net: dsa: sja1105: Add support for the PTP clock
The design of this PHC driver is influenced by the switch's behavior
w.r.t. timestamping. It exposes two PTP counters, one free-running
(PTPTSCLK) and the other offset- and frequency-corrected in hardware
through PTPCLKVAL, PTPCLKADD and PTPCLKRATE. The MACs can sample either
of these for frame timestamps.
However, the user manual warns that taking timestamps based on the
corrected clock is less than useful, as the switch can deliver corrupted
timestamps in a variety of circumstances.
Therefore, this PHC uses the free-running PTPTSCLK together with a
timecounter/cyclecounter structure that translates it into a software
time domain. Thus, the settime/adjtime and adjfine callbacks are
hardware no-ops.
The timestamps (introduced in a further patch) will also be translated
to the correct time domain before being handed over to the userspace PTP
stack.
The introduction of a second set of PHC operations that operate on the
hardware PTPCLKVAL/PTPCLKADD/PTPCLKRATE in the future is somewhat
unavoidable, as the TTEthernet core uses the corrected PTP time domain.
However, the free-running counter + timecounter structure combination
will suffice for now, as the resulting timestamps yield a sub-50 ns
synchronization offset in steady state using linuxptp.
For this patch, in absence of frame timestamping, the operations of the
switch PHC were tested by syncing it to the system time as a local slave
clock with:
phc2sys -s CLOCK_REALTIME -c swp2 -O 0 -m -S 0.01
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-08 20:04:34 +08:00
|
|
|
|
|
|
|
config NET_DSA_SJA1105_PTP
|
2019-06-17 21:14:10 +08:00
|
|
|
bool "Support for the PTP clock on the NXP SJA1105 Ethernet switch"
|
net: dsa: sja1105: Add support for the PTP clock
The design of this PHC driver is influenced by the switch's behavior
w.r.t. timestamping. It exposes two PTP counters, one free-running
(PTPTSCLK) and the other offset- and frequency-corrected in hardware
through PTPCLKVAL, PTPCLKADD and PTPCLKRATE. The MACs can sample either
of these for frame timestamps.
However, the user manual warns that taking timestamps based on the
corrected clock is less than useful, as the switch can deliver corrupted
timestamps in a variety of circumstances.
Therefore, this PHC uses the free-running PTPTSCLK together with a
timecounter/cyclecounter structure that translates it into a software
time domain. Thus, the settime/adjtime and adjfine callbacks are
hardware no-ops.
The timestamps (introduced in a further patch) will also be translated
to the correct time domain before being handed over to the userspace PTP
stack.
The introduction of a second set of PHC operations that operate on the
hardware PTPCLKVAL/PTPCLKADD/PTPCLKRATE in the future is somewhat
unavoidable, as the TTEthernet core uses the corrected PTP time domain.
However, the free-running counter + timecounter structure combination
will suffice for now, as the resulting timestamps yield a sub-50 ns
synchronization offset in steady state using linuxptp.
For this patch, in absence of frame timestamping, the operations of the
switch PHC were tested by syncing it to the system time as a local slave
clock with:
phc2sys -s CLOCK_REALTIME -c swp2 -O 0 -m -S 0.01
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-08 20:04:34 +08:00
|
|
|
depends on NET_DSA_SJA1105
|
|
|
|
help
|
|
|
|
This enables support for timestamping and PTP clock manipulations in
|
|
|
|
the SJA1105 DSA driver.
|
2019-09-15 10:00:02 +08:00
|
|
|
|
|
|
|
config NET_DSA_SJA1105_TAS
|
|
|
|
bool "Support for the Time-Aware Scheduler on NXP SJA1105"
|
2019-10-25 15:26:35 +08:00
|
|
|
depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
|
|
|
|
depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
|
2019-09-15 10:00:02 +08:00
|
|
|
help
|
|
|
|
This enables support for the TTEthernet-based egress scheduling
|
|
|
|
engine in the SJA1105 DSA driver, which is controlled using a
|
|
|
|
hardware offload of the tc-tqprio qdisc.
|