# stmmac (synopsys dwmac) devlink support

_Peios Kernel / Internals / Networking / devlink_

> This document describes the devlink features implemented by the stmmac device driver.

<a id="rst-stmmac-synopsys-dwmac-devlink-support"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

This document describes the devlink features implemented by the `stmmac` device driver.

<a id="rst-parameters"></a>

## Parameters

The `stmmac` driver implements the following driver-specific parameters.


<table>
<caption>Driver-specific parameters implemented</caption>
<tbody>
<tr>
<td>


Name

</td>
<td>


Type

</td>
<td>


Mode

</td>
<td>


Description

</td>
</tr>
<tr>
<td>


`phc_coarse_adj`

</td>
<td>


Boolean

</td>
<td>


runtime

</td>
<td>


Enable the Coarse timestamping mode, as defined in the DWMAC TRM. A detailed explanation of this timestamping mode can be found in the Socfpga Functionnal Description \[1\].

In Coarse mode, the ptp clock is expected to be fed by a high-precision clock that is externally adjusted, and the subsecond increment used for timestamping is set to 1/ptp_clock_rate.

In Fine mode (i.e. Coarse mode == false), the ptp clock frequency is continuously adjusted, but the subsecond increment is set to 2/ptp_clock_rate.

Coarse mode is suitable for PTP Grand Master operation. If unsure, leave the parameter to False.

\[1\] [https://www.intel.com/content/www/us/en/docs/programmable/683126/21-2/functional-description-of-the-emac.html](<https://www.intel.com/content/www/us/en/docs/programmable/683126/21-2/functional-description-of-the-emac.html>)

</td>
</tr>
</tbody>
</table>
