mbox series

[RFC,0/1] Move PHY out of pcie-kirin driver

Message ID cover.1625573452.git.mchehab+huawei@kernel.org
Headers show
Series Move PHY out of pcie-kirin driver | expand

Message

Mauro Carvalho Chehab July 6, 2021, 12:23 p.m. UTC
During the review of the Kirin 970 PCIe patch series, it was pointed that
the pcie-kirin driver has PHY logic mixed inside it:

   https://lore.kernel.org/lkml/CAL_JsqK7_hAw4aacHyiqJWE6zSWiMez5695+deaCSHfeWuX-XA@mail.gmail.com/

Probably due to that, support for those devices weren't added 
upstream.

Before trying to re-send it again, let's split the existing PHY code
for Kirin 960 (Hisi3660) from the driver.

Please notice that this change will alter the device tree, as a new PHY
descriptor will be needed, and the PHY properties from the pcie nodes
will need to switch.

This patch doesn't change the documentation yet, but it does change
the DTS file. If this change is OK, I'll resend this patch together with
the documentation changes.

Tested on a Hikey 960. After the patch, the PCI bridge is properly
displayed:

	$ lspci
	00:00.0 PCI bridge: Huawei Technologies Co., Ltd. Device 3660 (rev 01)

Unfortunately, currently I can't test if the bridge is working as this
bridge supports only non-SATA M.2 devices.  I'm acquiring one for
tests, but it will take a couple weeks to arrive.

Mauro Carvalho Chehab (1):
  PCI: dwc: pcie-kirin: split PHY interface from the driver

 arch/arm64/boot/dts/hisilicon/hi3660.dtsi |  24 +-
 drivers/pci/controller/dwc/pcie-kirin.c   | 195 +++-------------
 drivers/phy/hisilicon/Kconfig             |  10 +
 drivers/phy/hisilicon/Makefile            |   1 +
 drivers/phy/hisilicon/phy-hi3660-pcie.c   | 261 ++++++++++++++++++++++
 5 files changed, 321 insertions(+), 170 deletions(-)
 create mode 100644 drivers/phy/hisilicon/phy-hi3660-pcie.c