Re: [net-next: PATCH 2/3] net: mvpp2: enable using phylink with ACPI
From: Marcin Wojtas <hidden>
Date: 2021-06-13 21:23:12
Also in:
lkml
Hi, niedz., 13 cze 2021 o 21:47 Andrew Lunn [off-list ref] napisał(a):
quoted
+static bool mvpp2_use_acpi_compat_mode(struct fwnode_handle *port_fwnode) +{ + if (!is_acpi_node(port_fwnode)) + return false; + + return (!fwnode_property_present(port_fwnode, "phy-handle") && + !fwnode_property_present(port_fwnode, "managed") && + !fwnode_get_named_child_node(port_fwnode, "fixed-link"));fixed-link and managed are not documented in Documentation/firmware-guide/acpi/dsd/phy.rst.
True. I picked the port type properties that are interpreted by phylink. Basically, I think that everything that's described in: devicetree/bindings/net/ethernet-controller.yaml is valid for the ACPI as well - the kernel already is using 'fwnode_' in most (if not all) cases. Would you like me to add "managed" and "fixed-link" description/examples to the mentioned file?
Also, should you be looking for phy-mode?
In the beginning of the mvpp2_port_probe, there's:
phy_mode = fwnode_get_phy_mode(port_fwnode);
if (phy_mode < 0) {
dev_err(&pdev->dev, "incorrect phy mode\n");
err = phy_mode;
goto err_free_netdev;
}
So we won't reach further checks in case anything is wrong with it.
Best regards,
Marcin