[Bug 293376] Support combphy on RK3588
[email protected] Mon, 23 Feb 2026 05:19:09 +0000
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293376
Bug ID: 293376
Summary: Support combphy on RK3588
Product: Base System
Version: 14.3-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: arm
Assignee: [email protected]
Reporter: [email protected]
Created attachment 268285
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268285&action=edit
Patch for issue
This adds support for combphy on the RK3588 platform.
In general the masking of bits for read / modify / write
seems to have a "typo". For example:
/* Set PLL input clock divider 1/2 */
bus_write_4(sc->mem, PHYREG6,
(bus_read_4(sc->mem, PHYREG6) & PHYREG6_PLL_DIV_MASK) |
PHYREG6_PLL_DIV_2);
results in all other bits being masked off and the current
DIV setting being or'd with DIV_2. The mask probably
is intended to be applied as ~PHYREG6_PLL_DIV_MASK.
I moved the allocation of the memory resource later in
attach to avoid issues where the attach would fail for
some reason (i.e. a missing GRF or clock) leaving the
resource still allocated causing the next load attempt
to fail for the "wrong" reason.
The con0 - 3 setting are mostly identical for both chips
... a couple of bits are marked in the RK3588 TRM as
reserved / do not need to be set.
There's an additional mux that needs to be set when using
PCIE 2.
The RK3588 PLL programming is based on what Linux does.
Likewise there are multiple resets for the RK3588, however
Linux only uses the one called "phy".
Linux does program the RK3588 phys for SATA 6GBPS and the
RK3568 for 3GBPS. For simplicity I kept the same 3GBPS
programming for both. The TRM for both seems to indicate
they both support SATA 3GBPS and 6GBPS. I do not have a
board with SATA connectors so this is untested.
A couple of comments appeared to need updating.
RK3588 support tested with PCIE 2 using a FriendlyElec
NanoPC-T6 LTS on FreeBSD 14 stable (with various other RK3588
patches).
--
You are receiving this mail because:
You are the assignee for the bug.