Skip to content

Commit 620e239

Browse files
triha2workkuba-moo
authored andcommitted
net: dsa: microchip: Disable PTP function of KSZ8463
The PTP function of KSZ8463 is on by default. However, its proprietary way of storing timestamp directly in a reserved field inside the PTP message header is not suitable for use with the current Linux PTP stack implementation. It is necessary to disable the PTP function to not interfere the normal operation of the MAC. Note the PTP driver for KSZ switches does not work for KSZ8463 and is not activated for it. Signed-off-by: Tristram Ha <tristram.ha@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250725001753.6330-7-Tristram.Ha@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 006983e commit 620e239

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • drivers/net/dsa/microchip

drivers/net/dsa/microchip/ksz8.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,17 @@ void ksz8_config_cpu_port(struct dsa_switch *ds)
17601760
KSZ8463_REG_DSP_CTRL_6,
17611761
COPPER_RECEIVE_ADJUSTMENT, 0);
17621762
}
1763+
1764+
/* Turn off PTP function as the switch's proprietary way of
1765+
* handling timestamp is not supported in current Linux PTP
1766+
* stack implementation.
1767+
*/
1768+
regmap_update_bits(ksz_regmap_16(dev),
1769+
KSZ8463_PTP_MSG_CONF1,
1770+
PTP_ENABLE, 0);
1771+
regmap_update_bits(ksz_regmap_16(dev),
1772+
KSZ8463_PTP_CLK_CTRL,
1773+
PTP_CLK_ENABLE, 0);
17631774
}
17641775
}
17651776

0 commit comments

Comments
 (0)