From: Lad Prabhakar Add support for an optional "ts" (timestamp) clock to the RZN1 A5PSW driver. Some SoC variants provide a dedicated clock source for timestamping or time synchronization features within the Ethernet switch IP. Request and enable this clock during probe if defined in the device tree. If the clock is not present, the driver continues to operate normally. This change prepares the driver for Renesas RZ/T2H and RZ/N2H SoCs, where the Ethernet switch includes a timestamp clock input. Signed-off-by: Lad Prabhakar --- v6: - No change v5: https://lore.kernel.org/all/20261120002549.1908299-14-prabhakar.mahadev-lad.rj@bp.renesas.com/ - No change v4: https://lore.kernel.org/all/20261104182105.1102555-9-prabhakar.mahadev-lad.rj@bp.renesas.com/ - No change v3: https://lore.kernel.org/all/20261014131906.990077-8-prabhakar.mahadev-lad.rj@bp.renesas.com/ - No change v2: https://lore.kernel.org/all/20261001154326.754314-7-prabhakar.mahadev-lad.rj@bp.renesas.com/ - No change v1: https://lore.kernel.org/all/20251121113553.2955854-7-prabhakar.mahadev-lad.rj@bp.renesas.com/ --- drivers/net/dsa/rzn1_a5psw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c index 038b6b963761..fef107c9627c 100644 --- a/drivers/net/dsa/rzn1_a5psw.c +++ b/drivers/net/dsa/rzn1_a5psw.c @@ -1215,6 +1215,7 @@ static int a5psw_probe(struct platform_device *pdev) struct device_node *mdio; struct dsa_switch *ds; struct a5psw *a5psw; + struct clk *ts; int ret; a5psw = devm_kzalloc_obj(dev, *a5psw); @@ -1249,6 +1250,13 @@ static int a5psw_probe(struct platform_device *pdev) goto free_pcs; } + ts = devm_clk_get_optional_enabled(dev, "ts"); + if (IS_ERR(ts)) { + ret = PTR_ERR(ts); + dev_err_probe(dev, ret, "failed get ts clock\n"); + goto free_pcs; + } + reset = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL); if (IS_ERR(reset)) { ret = PTR_ERR(reset); -- 2.56.1