Index | Thread | Search

From:
"Jan Schreiber" <jes@posteo.de>
Subject:
rkcomphy: add 24mhz for rk3588
To:
<tech@openbsd.org>
Date:
Thu, 28 May 2026 17:32:35 +0000

Download raw body.

Thread
  • Jan Schreiber:

    rkcomphy: add 24mhz for rk3588

Hi,

on my RK3588 based machine dmesg is showing:
rkcomphy1: unsupported reference clock (24000000 Hz)

Currently there is only the PCIe PHY matched, so I think it's fine
to add the 24mHz in the freq switch. If USB3 or SATA will be added they
would be in that part of the switch statement (if I'm not completely mistaken).
Since they are not currently it'll at least silence the message, same as
the 25mHz case below.

Jan

diff --git sys/dev/fdt/rkcomphy.c sys/dev/fdt/rkcomphy.c
index 16d2d70f5de..35bae5d55fd 100644
--- sys/dev/fdt/rkcomphy.c
+++ sys/dev/fdt/rkcomphy.c
@@ -594,6 +594,10 @@ rkcomphy_rk3588_enable(void *cookie, uint32_t *cells)

 	freq = clock_get_frequency(node, "ref");
 	switch (freq) {
+	case 24000000:
+		regmap_write_4(phy_rm, PIPE_PHY_GRF_PIPE_CON(1),
+		    PIPE_PHY_GRF_PIPE_CLK_24M);
+		break;
 	case 25000000:
 		regmap_write_4(phy_rm, PIPE_PHY_GRF_PIPE_CON(1),
 		    PIPE_PHY_GRF_PIPE_CLK_25M);