Re: [PATCH v15 02/13] PCI: kirin: Add support for a PHY layer

From: Mauro Carvalho Chehab
Date: Mon Oct 25 2021 - 04:53:04 EST


Hi Kishon,

Em Mon, 25 Oct 2021 13:44:57 +0530
Kishon Vijay Abraham I <kishon@xxxxxx> escreveu:

> Hi Mauro,

> > +
> > +static const struct of_device_id kirin_pcie_match[] = {
> > + {
> > + .compatible = "hisilicon,kirin960-pcie",
> > + .data = (void *)PCIE_KIRIN_INTERNAL_PHY
> > + },
>
> Where is PCIE_KIRIN_EXTERNAL_PHY used?

See:
[PATCH v15 06/13] PCI: kirin: Add Kirin 970 compatible

https://lore.kernel.org/all/ac8c730c0300b90d96bdaaf387d458d8949241a9.1634812676.git.mchehab+huawei@xxxxxxxxxx/

Basically, Kirin 970 (and any other devices that would use the same
driver) should also use PCIE_KIRIN_EXTERNAL_PHY and place the PHY
driver inside drivers/phy, instead of hardcoding it at the driver.

The Kirin 970 PHY driver was already merged at linux-next:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/phy/hisilicon/phy-hi3670-pcie.c

Regards,
Mauro