Skip to content

RFC Cleanup pci-keystone.c and Add AM654 PCIe Support

Kishon Vijay Abraham I linux-arm-kernel linux-devicetree linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest40 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/40PCI: keystone: Use quirk to limit MRRS for K2Gdrivers/pci/controller/dwc/pci-keystone.c+3 -00 replies
2/40PCI: keystone: Use quirk to set MRRS for PCI host bridgedrivers/pci/controller/dwc/pci-keystone.c+15 -220 replies
3/40PCI: keystone: Move dw_pcie_setup_rc out of ks_pcie_establish_link()drivers/pci/controller/dwc/pci-keystone.c+2 -20 replies
4/40PCI: keystone: Do not initiate link training multiple timesdrivers/pci/controller/dwc/pci-keystone.c+4 -70 replies
5/40PCI: keystone: Remove unused argument from ks_dw_pcie_host_init()drivers/pci/controller/dwc/pci-keystone-dw.c drivers/pci/controller/dwc/pci-keystone.c drivers/pci/controller/dwc/pci-keystone.h+3 -50 replies
6/40PCI: keystone: Add start_link/stop_link dw_pcie_opsdrivers/pci/controller/dwc/pci-keystone-dw.c drivers/pci/controller/dwc/pci-keystone.c drivers/pci/controller/dwc/pci-keystone.h+38 -250 replies
7/40PCI: keystone: Merge pci-keystone-dw.c and pci-keystone.cMAINTAINERS drivers/pci/controller/dwc/Makefile drivers/pci/controller/dwc/pci-keystone-dw.c +2 more+494 -5480 replies
8/40PCI: keystone: Cleanup MSI/legacy interrupt configuration and handlingdrivers/pci/controller/dwc/pci-keystone.c+150 -2423 replies
9/40PCI: keystone: Remove redundant platform_set_drvdatadrivers/pci/controller/dwc/pci-keystone.c+0 -20 replies
10/40PCI: keystone: Use uniform function naming conventiondrivers/pci/controller/dwc/pci-keystone.c+120 -1470 replies
11/40dt-bindings: PCI: keystone: Add bindings to get device control moduleDocumentation/devicetree/bindings/pci/pci-keystone.txt+3 -01 reply
12/40PCI: keystone: Use syscon APIs to get device id from control moduledrivers/pci/controller/dwc/pci-keystone.c+31 -150 replies
13/40dt-bindings: PCI: keystone: Add "reg-names" binding informationDocumentation/devicetree/bindings/pci/pci-keystone.txt+4 -22 replies
14/40PCI: keystone: Use platform_get_resource_byname to get memory resourcesdrivers/pci/controller/dwc/pci-keystone.c+7 -100 replies
15/40PCI: keystone: Cleanup PHY handlingdrivers/pci/controller/dwc/pci-keystone.c+115 -180 replies
16/40PCI: keystone: Invoke pm_runtime APIs to enable clockdrivers/pci/controller/dwc/pci-keystone.c+14 -150 replies
17/40PCI: keystone: Cleanup configuration space accessdrivers/pci/controller/dwc/pci-keystone.c+20 -500 replies
18/40PCI: keystone: Get number of OB windows from DT and cleanup MEM space configurationdrivers/pci/controller/dwc/pci-keystone.c+49 -370 replies
19/40PCI: keystone: Cleanup set_dbi_mode and get_dbi_modedrivers/pci/controller/dwc/pci-keystone.c+7 -50 replies
20/40PCI: keystone: Cleanup ks_pcie_link_up()drivers/pci/controller/dwc/pci-keystone.c drivers/pci/controller/dwc/pcie-designware.h+7 -70 replies
21/40PCI: keystone: Add debug error message for all errorsdrivers/pci/controller/dwc/pci-keystone.c+25 -200 replies
22/40PCI: keystone: Reorder header file in alphabetical orderdrivers/pci/controller/dwc/pci-keystone.c+4 -40 replies
23/40PCI: keystone: Cleanup macros defined in pci-keystone.cdrivers/pci/controller/dwc/pci-keystone.c+16 -250 replies
24/40PCI: keystone: Move initializations to appropriate placesdrivers/pci/controller/dwc/pci-keystone.c+15 -120 replies
25/40dt-bindings: PCI: Add dt-binding to configure PCIe modeDocumentation/devicetree/bindings/pci/pci-keystone.txt+2 -00 replies
26/40PCI: keystone: Explicitly set the PCIe modedrivers/pci/controller/dwc/pci-keystone.c+37 -00 replies
27/40dt-bindings: PCI: Document "atu" reg-namesDocumentation/devicetree/bindings/pci/designware-pcie.txt+5 -20 replies
28/40PCI: dwc: Fix ATU identification for designware version >= 4.80drivers/pci/controller/dwc/pcie-designware-host.c drivers/pci/controller/dwc/pcie-designware.c drivers/pci/controller/dwc/pcie-designware.h+52 -230 replies
29/40PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64drivers/pci/controller/dwc/pci-keystone.c+4 -00 replies
30/40dt-bindings: PCI: Add PCI RC dt binding documentation for AM654Documentation/devicetree/bindings/pci/pci-keystone.txt+5 -10 replies
31/40PCI: keystone: Add support for PCIe in AM654x Platformsdrivers/pci/controller/dwc/Kconfig drivers/pci/controller/dwc/pci-keystone.c+107 -130 replies
32/40phy: core: Invoke pm_runtime_get_*/pm_runtime_put_* before invoking reset callbackdrivers/phy/phy-core.c+6 -00 replies
33/40dt-bindings: phy: ti: Add dt binding documentation for SERDES in AM654x SoCDocumentation/devicetree/bindings/phy/ti-phy.txt include/dt-bindings/phy/phy-am654-serdes.h+90 -00 replies
34/40phy: ti: Add a new SERDES driver for TI's AM654x SoCdrivers/phy/ti/Kconfig drivers/phy/ti/Makefile drivers/phy/ti/phy-am654-serdes.c+525 -00 replies
35/40ARM: dts: keystone-k2e: Use the updated binding to describe PCIe in k2earch/arm/boot/dts/keystone-k2e.dtsi arch/arm/boot/dts/keystone.dtsi+22 -110 replies
36/40arm64: dts: k3-am6: Add "socionext,synquacer-pre-its" property to gic_itsarch/arm64/boot/dts/ti/k3-am65-main.dtsi+1 -01 reply
37/40arm64: dts: k3-am6: Add Main System Control Module nodearch/arm64/boot/dts/ti/k3-am65-main.dtsi+5 -00 replies
38/40arm64: dts: k3-am6: Add mux-controller dt node required for muxing SERDESarch/arm64/boot/dts/ti/k3-am65-main.dtsi+8 -10 replies
39/40arm64: dts: k3-am6: Add SERDES DT nodearch/arm64/boot/dts/ti/k3-am65-main.dtsi+46 -00 replies
40/40arm64: dts: k3-am6: Add Root Complex PCIe dt nodearch/arm64/boot/dts/ti/k3-am65-main.dtsi arch/arm64/boot/dts/ti/k3-am65.dtsi+84 -00 replies

Reviews trailers per patch

1 of 40 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/40
2/40
3/40
4/40
5/40
6/40
7/40
8/40
9/40
10/40
11/40R-b
12/40
13/40
14/40
15/40
16/40
17/40
18/40
19/40
20/40
21/40
22/40
23/40
24/40
25/40
26/40
27/40
28/40
29/40
30/40
31/40
32/40
33/40
34/40
35/40
36/40
37/40
38/40
39/40
40/40

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 00/40] Cleanup pci-keystone.c and Add AM654 PCIe Support

Add PCIe RC support for TI's AM654 SoC. The PCIe controller in AM654 uses Synopsys core revision 4.90a and uses the same TI wrapper as used in keystone2 with certain modification. Hence AM654 will use the same pci wrapper driver pci-keystone.c

The initial support for AM654 was merged recently [1]

[1] -> https://lore.kernel.org/lkml/20180626162615.19194-1-nm at ti.com/

Patch series includes the following
*) Merge pci-keystone-dw.c into pci-keystone.c so that we have single
file for PCIe keystone driver.
*) Cleanup the pci-keystone driver. In certain cases the DT binding is
also modified since PCIe in keystone has never worked in mainline due to lack of PHY support.
*) Included the PHY driver here for completeness (though the driver
might go via linux-phy tree)
*) Included the device tree patches here. Once this series is reviewed
it'll be sent to be merged via Tony's tree.
*) Patch to fix ATU identification for designware version >= 4.80 in
designware core is also included here.

TODO:
*) Add Endpoint Support for AM654
*) Send a patch to fix the MRRS after the correct value is identified.

Once this series is reviewed I'll split the series and send to corresponding subsytem Maintainers after removing RFC in subject.

Thanks
Kishon

Benoit Parrot (1):
arm64: dts: k3-am6: Add Main System Control Module node

Kishon Vijay Abraham I (39):
PCI: keystone: Use quirk to limit MRRS for K2G
PCI: keystone: Use quirk to set MRRS for PCI host bridge
PCI: keystone: Move dw_pcie_setup_rc out of ks_pcie_establish_link()
PCI: keystone: Do not initiate link training multiple times
PCI: keystone: Remove unused argument from ks_dw_pcie_host_init()
PCI: keystone: Add start_link/stop_link dw_pcie_ops
PCI: keystone: Merge pci-keystone-dw.c and pci-keystone.c
PCI: keystone: Cleanup MSI/legacy interrupt configuration and handling
PCI: keystone: Remove redundant platform_set_drvdata
PCI: keystone: Use uniform function naming convention
dt-bindings: PCI: keystone: Add bindings to get device control module
PCI: keystone: Use syscon APIs to get device id from control module
dt-bindings: PCI: keystone: Add "reg-names" binding information
PCI: keystone: Use platform_get_resource_byname to get memory
resources
PCI: keystone: Cleanup PHY handling
PCI: keystone: Invoke pm_runtime APIs to enable clock
PCI: keystone: Cleanup configuration space access
PCI: keystone: Get number of OB windows from DT and cleanup MEM space
configuration
PCI: keystone: Cleanup set_dbi_mode and get_dbi_mode
PCI: keystone: Cleanup ks_pcie_link_up()
PCI: keystone: Add debug error message for all errors
PCI: keystone: Reorder header file in alphabetical order
PCI: keystone: Cleanup macros defined in pci-keystone.c
PCI: keystone: Move initializations to appropriate places
dt-bindings: PCI: Add dt-binding to configure PCIe mode
PCI: keystone: Explicitly set the PCIe mode
dt-bindings: PCI: Document "atu" reg-names
PCI: dwc: Fix ATU identification for designware version >= 4.80
PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64
dt-bindings: PCI: Add PCI RC dt binding documentation for AM654
PCI: keystone: Add support for PCIe in AM654x Platforms
phy: core: Invoke pm_runtime_get_*/pm_runtime_put_* before invoking
reset callback
dt-bindings: phy: ti: Add dt binding documentation for SERDES in

    AM654x SoC
  phy: ti: Add a new SERDES driver for TI's AM654x SoC
  ARM: dts: keystone-k2e: Use the updated binding to describe PCIe in
    k2e

arm64: dts: k3-am6: Add "socionext,synquacer-pre-its" property to
gic_its
arm64: dts: k3-am6: Add mux-controller dt node required for muxing
SERDES
arm64: dts: k3-am6: Add SERDES DT node
arm64: dts: k3-am6: Add Root Complex PCIe dt node

 .../bindings/pci/designware-pcie.txt          |    7 +-
 .../devicetree/bindings/pci/pci-keystone.txt  |   17 +-
 .../devicetree/bindings/phy/ti-phy.txt        |   77 ++
 MAINTAINERS                                   |    2 +-
 arch/arm/boot/dts/keystone-k2e.dtsi           |   15 +-
 arch/arm/boot/dts/keystone.dtsi               |   18 +-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  142 +++
 arch/arm64/boot/dts/ti/k3-am65.dtsi           |    1 +
 drivers/pci/controller/dwc/Kconfig            |    2 +-
 drivers/pci/controller/dwc/Makefile           |    2 +-
 drivers/pci/controller/dwc/pci-keystone-dw.c  |  484 --------
 drivers/pci/controller/dwc/pci-keystone.c     | 1059 +++++++++++++----
 drivers/pci/controller/dwc/pci-keystone.h     |   57 -
 .../pci/controller/dwc/pcie-designware-host.c |   16 -
 drivers/pci/controller/dwc/pcie-designware.c  |   50 +-
 drivers/pci/controller/dwc/pcie-designware.h  |   13 +-
 drivers/phy/phy-core.c                        |    6 +
 drivers/phy/ti/Kconfig                        |   11 +
 drivers/phy/ti/Makefile                       |    1 +
 drivers/phy/ti/phy-am654-serdes.c             |  513 ++++++++
 include/dt-bindings/phy/phy-am654-serdes.h    |   13 +
 21 files changed, 1690 insertions(+), 816 deletions(-)
 delete mode 100644 drivers/pci/controller/dwc/pci-keystone-dw.c
 delete mode 100644 drivers/pci/controller/dwc/pci-keystone.h
 create mode 100644 drivers/phy/ti/phy-am654-serdes.c
 create mode 100644 include/dt-bindings/phy/phy-am654-serdes.h
Signature · 1 line
2.17.1