[PATCH v5 2/6] PCI: spacemit-k1: Add multiple PHY handles support
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Tue Sep 8 03:29:27 PDT 2026
On Mon, Sep 07, 2026 at 07:26:01PM +0800, Inochi Amaoto wrote:
> The PCIe controller on Spacemit K3 may use multiple PHYs at the
> same time. The feature is not supported by the current driver.
> So extend the PHY definition to support multiple PHY handles.
...
> +static int k1_pcie_get_phy_handle(struct k1_pcie *k1, struct device_node *node)
> +{
> + const struct k1_pcie_device_data *data = k1->data;
> + struct device *dev = k1->pci.dev;
> + int count;
> +
> + count = devm_of_phy_bulk_get_all(dev, node, &k1->phys);
> + if (count < 0)
> + return count;
> + if (count == 0 || count > data->max_phy_count)
> + return -EINVAL;
Elsewhere we distinguish count == 0 with -ENOENT.
> + k1->phy_count = count;
> +
> + return 0;
> +}
--
With Best Regards,
Andy Shevchenko
More information about the linux-riscv
mailing list