mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2025-12-25 05:27:09 +00:00
Until now the SerDes access is realized with some helper functions in the mdio bus. These were moved around a lot and had no real home. End that temporary solution to move them where they belong. The target design for the different Realtek drivers is as follows: - dsa driver manages switch - pcs driver manages SerDes on high level (to be developed) - mdio driver manages SerDes on low level (this commit) This driver adds the low level SerDes access via mdio. For debugging purposes the user can interact with the SerDes in different ways. First, there is a debug interface in /sys/kernel/debug/realtek_otto_serdes/serdes.X/registers. With that a dump of all registers can be shown. > cat /sys/kernel/debug/realtek_otto_serdes/serdes.4/registers Back SDS 4: 00 01 02 03 04 05 06 07 08 SDS : 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 SDS_EXT : 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA ... Second, one can read/write registers via the mmd functions of the mdio command line tool. Important to know: The registers are accessed on the vendor specific MDIO_MMD_VEND1 device address (=30). Additionally the SerDes page and register are concatenated into the the mmd register. Top 8 bits are SerDes page and bottom 8 bits are SerDEs register. E.g. - mmd 0x0206 : SerDes page 0x02, SerDes register 0x06 - mmd 0x041f : SerDes page 0x04, SerDes register 0x1f Read register 0x02 on page 0x03 of SerDes 0 > mdio realtek-serdes-mdio mmd 0:30 raw 0x0302 Write register 0x12 on page 0x02 of SerDes 1 > mdio realtek-serdes-mdio mmd 1:30 raw 0x0212 0x2222 For now this driver is only defined in the devicetree and activated in the kernel build. There is no current consumer but at least the debugging interface is available. Cleanup of the currently used SerDes functions will come later. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/20062 Signed-off-by: Robert Marko <robimarko@gmail.com> |
||
|---|---|---|
| .. | ||
| macros.dtsi | ||
| rtl83xx_d-link_dgs-1210_common.dtsi | ||
| rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi | ||
| rtl83xx_d-link_dgs-1210_gpio.dtsi | ||
| rtl83xx_hpe_1920.dtsi | ||
| rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi | ||
| rtl838x.dtsi | ||
| rtl839x.dtsi | ||
| rtl930x.dtsi | ||
| rtl931x.dtsi | ||
| rtl8380_d-link_dgs-1210-10mp-f.dts | ||
| rtl8380_engenius_ews2910p-v1.dts | ||
| rtl8380_engenius_ews2910p-v3.dts | ||
| rtl8380_engenius_ews2910p.dtsi | ||
| rtl8380_hpe_1920-8g-poe-65w.dts | ||
| rtl8380_hpe_1920-8g-poe-180w.dts | ||
| rtl8380_hpe_1920-8g.dts | ||
| rtl8380_hpe_1920-8g.dtsi | ||
| rtl8380_linksys_lgs310c.dts | ||
| rtl8380_netgear_gigabit.dtsi | ||
| rtl8380_netgear_gs108t-v3.dts | ||
| rtl8380_netgear_gs110tpp-v1.dts | ||
| rtl8380_netgear_gs110tup-v1.dts | ||
| rtl8380_netgear_gs308t-v1.dts | ||
| rtl8380_netgear_gs310tp-v1.dts | ||
| rtl8380_panasonic_m8eg-pn28080k.dts | ||
| rtl8380_tplink_sg2xxx.dtsi | ||
| rtl8380_tplink_sg2008p-v1.dts | ||
| rtl8380_tplink_sg2210p-v3.dts | ||
| rtl8380_zyxel_gs1900_gpio_emulated.dtsi | ||
| rtl8380_zyxel_gs1900_gpio.dtsi | ||
| rtl8380_zyxel_gs1900-8-v1.dts | ||
| rtl8380_zyxel_gs1900-8-v2.dts | ||
| rtl8380_zyxel_gs1900-8hp-v1.dts | ||
| rtl8380_zyxel_gs1900-8hp-v2.dts | ||
| rtl8380_zyxel_gs1900-10hp.dts | ||
| rtl8380_zyxel_gs1900.dtsi | ||
| rtl8382_allnet_all-sg8208m.dts | ||
| rtl8382_apresia_aplgs120gtss.dts | ||
| rtl8382_d-link_dgs-1210-10p.dts | ||
| rtl8382_d-link_dgs-1210-16.dts | ||
| rtl8382_d-link_dgs-1210-20.dts | ||
| rtl8382_d-link_dgs-1210-26.dts | ||
| rtl8382_d-link_dgs-1210-28_common.dtsi | ||
| rtl8382_d-link_dgs-1210-28.dts | ||
| rtl8382_d-link_dgs-1210-28mp-f.dts | ||
| rtl8382_d-link_dgs-1210-28p_common.dtsi | ||
| rtl8382_d-link_dgs-1210-28p-f.dts | ||
| rtl8382_hpe_1920-16g.dts | ||
| rtl8382_hpe_1920-24g-poe-180w.dts | ||
| rtl8382_hpe_1920-24g-poe-370w.dts | ||
| rtl8382_hpe_1920-24g.dts | ||
| rtl8382_hpe_1920-24g.dtsi | ||
| rtl8382_hpe_1920.dtsi | ||
| rtl8382_inaba_aml2-17gp.dts | ||
| rtl8382_iodata_bsh-g24mb.dts | ||
| rtl8382_panasonic_m16eg-pn28160k.dts | ||
| rtl8382_panasonic_m24eg-pn28240k.dts | ||
| rtl8382_tplink_t1600g-28ts-v3.dts | ||
| rtl8382_zyxel_gs1900-16.dts | ||
| rtl8382_zyxel_gs1900-24-v1.dts | ||
| rtl8382_zyxel_gs1900-24e.dts | ||
| rtl8382_zyxel_gs1900-24ep.dts | ||
| rtl8382_zyxel_gs1900-24hp-v1.dts | ||
| rtl8382_zyxel_gs1900-24hp-v2.dts | ||
| rtl8393_d-link_dgs-1210-52.dts | ||
| rtl8393_hpe_1920-48g-poe.dts | ||
| rtl8393_hpe_1920-48g.dts | ||
| rtl8393_hpe_1920.dtsi | ||
| rtl8393_netgear_gs750e.dts | ||
| rtl8393_panasonic_m48eg-pn28480k.dts | ||
| rtl8393_tplink_sg2452p-v4.dts | ||
| rtl8393_zyxel_gs1900-48.dts | ||
| rtl9302_plasmacloud_common.dtsi | ||
| rtl9302_plasmacloud_psx8.dts | ||
| rtl9302_plasmacloud_psx10.dts | ||
| rtl9302_zyxel_xgs1210-12-a1.dts | ||
| rtl9302_zyxel_xgs1210-12-common.dtsi | ||
| rtl9302_zyxel_xgs1250-12.dts | ||
| rtl9303_hasivo_s1100w-8xgt-se.dts | ||
| rtl9303_tplink_tl-st1008f-v2.dts | ||
| rtl9303_vimin_vm-s100-0800ms.dts | ||
| rtl9303_xikestor_sks8300-8x.dts | ||
| rtl9303_xikestor_sks8310-8x.dts | ||