Time Sensitive Networking (TSN) is a collection of Ethernet standards defined by IEEE 802.1Q that enables deterministic messaging over standard Ethernet networks. With TSN, Ethernet frames are not limited to Internet Protocol, so it can carry the payload of any industrial application.
Enable TSN support
To add TSN support and tools to your system, add the feature to your project’s conf/local.conf
file:
# TSN
DISTRO_FEATURES:append = " tsn"
Rebuild your image, for example:
$ bitbake dey-image-qt
Deploy the resulting images to the device.
Kernel configuration
You can manage the Ethernet driver and PHY device support through the following kernel configuration options:
-
802.1 Time-Sensitive Networking support (
CONFIG_TSN
) -
TSN Support for NXP ENETC driver (
CONFIG_ENETC_TSN
) -
ENETC hardware Time-Sensitive Network support (
CONFIG_FSL_ENETC_QOS
)
These options are enabled as built-in on the default ConnectCore 93 kernel configuration file.
IEEE 802.1 Standard configuration
The Linux ecosystem supports several TSN features such as Credit-Based Shaper (formerly Qav), Enhancements for Scheduled Traffic (EST, former Qbv), Generalized Precision Time Protocol (gPTP), and Audio/Video Transport Protocol (AVTP). You can manage the different TSN standards through the following kernel configuration options:
-
Hardware Multiqueue-aware Multi Band Queuing (MULTIQ) (
CONFIG_NET_SCH_MULTIQ
) -
Credit-Based Shaper (
CONFIG_NET_SCH_CBS
) -
Earliest TxTime First (
CONFIG_NET_SCH_ETF
) -
Time Aware Priority (taprio) Scheduler (
CONFIG_NET_SCH_TAPRIO
) -
Multi-queue priority scheduler (MQPRIO) (
CONFIG_NET_SCH_MQPRIO
) -
Elementary classification (BASIC) (
CONFIG_NET_CLS_BASIC
) -
Flower classifier (
CONFIG_NET_CLS_FLOWER
) -
Generic actions (
CONFIG_NET_ACT_GACT
) -
Redirecting and mirroring (
CONFIG_NET_ACT_MIRRED
) -
Frame gate entry list control tc action (
CONFIG_NET_ACT_GATE
)
These options are not enabled in the default defconfig, but they are added via a config fragment when you enable TSN support in your Digi Embedded Yocto project.
Many more configuration options are available. You must include or exclude options based on your final application. |
Kernel driver
The drivers for the i.MX93 TSN Ethernet support are located at:
File | Description |
---|---|
NXP ENETC driver |
|
TSN ENETC driver |
Device tree bindings and customization
The i.MX93 Ethernet interface device tree binding is documented at Documentation/devicetree/bindings/net/snps,dwmac.yaml
.
The Ethernet interface is defined in the i.MX93 CPU and ConnectCore 93 Development Kit device tree files.
Enable remaining EQoS driver Ethernet queues
All five queues are required for TSN support. Digi provides a pre-compiled device tree overlay to enable these remaining queues that are necessary for TSN support, and that are otherwise disabled on the default device tree. To apply this overlay, run the following command in U-Boot:
=> setenv overlays _ov_board_eqos-tsn_ccimx93-dvk.dtbo
=> saveenv
TSN user space tools
After enabling TSN support, Digi Embedded Yocto includes several tools into the rootfs to configure the TSN connection on the target. The following tools are available in user space.
-
ptp4l: Daemon that synchronizes the PTP Hardware Clock (PHC) from the NIC.
-
phc2sys: Daemon that synchronizes the PHC and the system clock.
-
pmc: Utility tool to configure ptp4l in run-time.
-
tc: Traffic Control (TC) subsystem that helps police, classify, shape, and schedule network traffic and manages packet content.