Re: [PATCH] net: dsa: sja1105: Add rev-rmii support sja1110 devices

From: Martijn de Gouw

Date: Wed Jun 10 2026 - 06:00:59 EST


Hi

On 10/06/2026 03:59, Jakub Kicinski wrote:
On Mon, 8 Jun 2026 16:16:51 +0200 Martijn de Gouw wrote:
When a rmii port is used in phy-mode (rev-rmii), the ref_clk is an input on
the rx clk pin. Configure both the rx and tx clock source to use the
rx_clk as external clock source input.

drivers/net/dsa/sja1105/sja1105_clocking.c:969:5: warning: no previous prototype for function 'sja1110_clocking_setup_port' [-Wmissing-prototypes]
969 | int sja1110_clocking_setup_port(struct sja1105_private *priv, int port)
| ^
drivers/net/dsa/sja1105/sja1105_clocking.c:969:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
969 | int sja1110_clocking_setup_port(struct sja1105_private *priv, int port)
| ^
| static

Looking into why sja1105_clocking_setup_port is not declared static as well reveals that sja1105_clocking_setup_port is called directly from sja1105_set_port_speed() in sja1105_main.c as well. I think this should also be handled via the struct sja1105_info. If this port specific function is available via the info struct, there is also no longer a need to have a sja1105/sja1110 specific clocking_setup() function.

Unless there are additional comments I'll try to form a patch-series that implements this.

Regards, Martijn