Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] PCI: cortina: Add CS7542 PCIe host and PHY support
@ 2026-12-04 22:22 Fil Dunsky via B4 Relay
  2026-12-04 22:22 ` [PATCH v4 1/6] PCI: dwc: Export the multiplexed MSI interrupt handler Fil Dunsky via B4 Relay
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-12-04 22:22 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Fil Dunsky
  Cc: Jingoo Han, Lorenzo Pieralisi, Krzysztof Wilczynski,
	Bjorn Helgaas, Neil Armstrong, Stephen Boyd, Philipp Zabel,
	linux-pci, linux-phy, devicetree, linux-arm-kernel, linux-kernel

Add a Snow Bush PCIe SerDes PHY and DesignWare host glue for CS7542.
The clock/reset/pinctrl series provides the PCIe clocks and resets:
https://lore.kernel.org/all/20261129-cs7542-syscon-v6-0-553dc4c01460@gmail.com/
Board DTS enablement is separate.

CS7542 root configuration space must not be accessed beyond 512 bytes.
The host driver handles the combined INTx/MSI interrupt and obtains link
status from the application wrapper. A secondary bus reset can make the
DesignWare DBI aperture inaccessible even after the wrapper reports an
active link. Recover it by resetting the affected controller and restoring
Root Port and MSI programming while PCI configuration access is blocked.
Save the current bridge configuration for PCI core restore after reset.

Earlier Almond+ tests enumerated all three PCIe ports and exercised MSI-X
and legacy INTx on xHCI. The v4 reset callback was also exercised on the
ASM1042A USB port using a Linux 6.18 RAM backport. Two different values
written to the software Interrupt Line field survived consecutive bus
resets. Concurrent Root Port and endpoint configuration reads were
blocked during reset and completed normally afterwards. MSI interrupts
were delivered after xHCI rebind and a direct USB read returned the same
16 KiB as before reset. The board returned automatically to its original
USB Debian. The native driver built for ARM with W=1 and -Werror.

The two Wi-Fi ports share a PERST# GPIO. The v4 reset test used the USB
port.

Changes in v4:
- Reinitialize the affected controller after secondary bus reset and
  serialize PCI configuration, DBI and interrupt access across reset.
- Save the active bridge configuration before reset and restore MSI
  receiver and INTx mask state before re-enabling interrupts.
- Use the published clock/reset/pinctrl v6 dependency.
- Link to v3: https://patch.msgid.link/20261127-b4-cs7542-pcie-v3-0-b067875c56da@gmail.com

Changes in v3:
- Hold the host reset through PHY preparation. Wait 10 ms before
  deasserting it and 10 ms afterwards before accessing the host.
- Drop the PCIe consumer's Kconfig select of RESET_CONTROLLER.
- Balance the PHY reference clock if power-on and its cleanup both fail.
- Put PERST# on the Root Port child; retain three independent hosts and
  acquire the board's shared Wi-Fi reset GPIO only once.
- Assert the core before clock/PHY setup and release endpoint PERST#
  after Root Port setup, using the standard reset configuration wait.
- Describe MSI addresses as internal PCI bus match tokens, preserve their
  tested values and reject overlap with translated PCI memory windows.
- Keep v2 config/DBI/IRQ serialization; describe the no-retrain latch as
  conservative software policy, with no physical link-loss race claim.
- Preserve pci=nomsi in post-enumeration setup; an uninitialized receiver
  must not be enabled. Skip the optional PERST# lookup when the Root Port
  has no reset-gpios, including builds with GPIOLIB disabled.
- Address Kconfig/include ordering, bounded polling constants, error
  response helper, block comments, formatting and cleanup labels.
- Move the global binding, clock gates and reset provider into the
  independent shared-controls prerequisite; drop former patches 2 and 3.
- Keep only DWC export, PHY, host and their ownership in this series.
- Preserve existing PCIe reset IDs 0..2 and clock IDs 3..5.
- Link to v2: https://patch.msgid.link/20261123-b4-cs7542-pcie-v2-0-f589a9cd0bef@gmail.com

---
Fil Dunsky (6):
      PCI: dwc: Export the multiplexed MSI interrupt handler
      dt-bindings: phy: Describe CS7542 PCIe SerDes
      phy: Add CS7542 PCIe SerDes support
      dt-bindings: PCI: Describe the CS7542 host controller
      PCI: cs7542: Add CS7542 PCIe host support
      MAINTAINERS: Add CS7542 PCIe support

 .../bindings/pci/cortina,cs7542-pcie.yaml          | 157 ++++
 .../bindings/phy/cortina,cs7542-pcie-phy.yaml      |  67 ++
 MAINTAINERS                                        |   6 +-
 drivers/pci/controller/dwc/Kconfig                 |  12 +
 drivers/pci/controller/dwc/Makefile                |   1 +
 drivers/pci/controller/dwc/pcie-cs7542.c           | 803 +++++++++++++++++++++
 drivers/pci/controller/dwc/pcie-designware-host.c  |   1 +
 drivers/phy/Kconfig                                |  11 +
 drivers/phy/Makefile                               |   2 +
 drivers/phy/phy-cs7542-pcie.c                      | 236 ++++++
 10 files changed, 1295 insertions(+), 1 deletion(-)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-b4-cs7542-pcie-224e359c8698
prerequisite-change-id: 20261123-cs7542-syscon-273d545c7af2:v6
prerequisite-patch-id: 27fe25055bcadb3c3fbc8b6788f31c2fb791df38
prerequisite-patch-id: ae69b5cca6f4604972300a89411bdca0ea19ab57
prerequisite-patch-id: 55dc4f1e91fc85340c4422438225f50fdf636799
prerequisite-patch-id: 66fccae72a8f951ac0ee182490e98543af29bd89
prerequisite-patch-id: 7fbe9405265ef3d1ec62811415a46c0061afd7c8
prerequisite-patch-id: 01ece2c91e080d5cae6af81944159373776484ca

Best regards,
-- 
Fil Dunsky <filipp.dunsky@gmail.com>



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-12-04 22:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 22:22 [PATCH v4 0/6] PCI: cortina: Add CS7542 PCIe host and PHY support Fil Dunsky via B4 Relay
2026-12-04 22:22 ` [PATCH v4 1/6] PCI: dwc: Export the multiplexed MSI interrupt handler Fil Dunsky via B4 Relay
2026-12-04 22:22 ` [PATCH v4 2/6] dt-bindings: phy: Describe CS7542 PCIe SerDes Fil Dunsky via B4 Relay
2026-12-04 22:33   ` sashiko-bot
2026-12-04 22:22 ` [PATCH v4 3/6] phy: Add CS7542 PCIe SerDes support Fil Dunsky via B4 Relay
2026-12-04 22:22 ` [PATCH v4 4/6] dt-bindings: PCI: Describe the CS7542 host controller Fil Dunsky via B4 Relay
2026-12-04 22:33   ` sashiko-bot
2026-12-04 22:22 ` [PATCH v4 5/6] PCI: cs7542: Add CS7542 PCIe host support Fil Dunsky via B4 Relay
2026-12-04 22:51   ` sashiko-bot
2026-12-04 22:22 ` [PATCH v4 6/6] MAINTAINERS: Add CS7542 PCIe support Fil Dunsky via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox