rkcomphy: add 24mhz for rk3588

"Jan Schreiber" <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.