0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-09-20 17:39:23 +00:00
Files
Markus Stockhausen fe27cce1ec realtek: add SerDes PCS driver
Until now the the SerDes configuration is realized with helper functions
scattered around the DSA and PHY driver. Give them a new home as a PCS
driver.

The target design is as follows:

- dsa driver manages switch
- pcs driver manages SerDes on high level (this commit)
- mdio driver manages SerDes on low level

This driver adds the high level SerDes access via PCS. It makes use of
the low level mdio SerDes driver to access the registers.

Remark: This initial version provides exactly all phylink_pcs_ops that
are currently part of the DSA driver. So this can be swapped in one of
the next commits as a drop in replacement. To make use of it something
like this is needed:

...
ports = of_get_child_by_name(node, "ethernet-ports");
if (!ports)
	return -EINVAL;

for_each_available_child_of_node(ports, port) {
	pcs_node = of_parse_phandle(port, "pcs-handle", 0);
	of_property_read_u32(port, "reg", &port_nr)) {

	priv->pcs[port_nr] = rtpcs_create(dev, pcs_node, port_nr);
}
...

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/20075
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-20 12:51:23 +02:00
..
2025-09-20 12:51:23 +02:00
2025-09-20 12:51:23 +02:00
2025-09-20 12:51:23 +02:00
2025-09-20 12:51:23 +02:00
2025-09-20 12:51:23 +02:00
2025-09-20 12:51:23 +02:00
2025-08-10 11:46:52 +02:00