Re: [net-next: PATCH v3 1/6] Documentation: ACPI: DSD: describe additional MAC configuration
flat view
From: Marcin Wojtas <hidden>
Date: 2021-06-23 21:00:58
Also in:
lkml
Hi Andrew, śr., 23 cze 2021 o 22:18 Andrew Lunn [off-list ref] napisał(a):
quoted
+MAC node example with a "fixed-link" subnode. +--------------------------------------------- + +.. code-block:: none + + Scope(\_SB.PP21.ETH1) + { + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"phy-mode", "sgmii"}, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), + Package () { + Package () {"fixed-link", "LNK0"} + } + })At least in the DT world, it is pretty unusual to see both fixed-link and phy-mode.
I did a quick experiment: git grep -C 8 fixed-link arch/arm64/boot/dts/ git grep -C 8 fixed-link arch/arm/boot/dts/ almost all MAC nodes (i.e. not switch ports) containing 'fixed-link' have an adjacent 'phy-mode' property defined. How else would the drivers know how to configure the HW connection type in its registers?
You might have one of the four RGMII modes, in order to set the delays when connecting to a switch. But sgmii and fixed link seems very unlikely, how is sgmii autoneg going to work?
Indeed most cases in the tree are "rgmii*", but we can also see e.g. 10gbase-r, sgmii and 2500base-x. You can find sgmii + fixed-link on the eth1 of the armada-388-clearfog. Regarding the autoneg - I'm mostly familiar with the mvneta/mvpp2, but in this mode the autonegotiation is disabled and the link is forcibly set up/down in MAC registers during the netedev_open/close accordingly. FYI, along with the 10G ports on CN913x-DB, I tested fixed-link on Macchiatobin sgmii port. Anyway - all above is a bit side discussion to the actual DSDT description and how the fixed-link subnode looks like. I think phy-mode set to "sgmii" is not incorrect, but we can change it to whatever other type of your preference, as well. Best regards, Marcin
quoted
+ Name (LNK0, Package(){ // Data-only subnode of port + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"speed", 1000}, + Package () {"full-duplex", 1} + } + }) + } +Andrew