Skip to content

Commit b43cdb3

Browse files
committed
Merge branch 'pci/controller/dwc-tegra194'
- Poll less aggressively and non-atomically for PME_TO_Ack during transition to L2 (Vidya Sagar) - Increase LTSSM poll time on surprise link down (Manikanta Maddireddy) - Disable LTSSM after transition to Detect on surprise link down to stop toggling between Polling and Detect (Manikanta Maddireddy) - Don't force the device into the D0 state before L2 when suspending or shutting down the controller (Vidya Sagar) - Disable PERST# IRQ only in Endpoint mode because it's not registered in Root Port mode (Manikanta Maddireddy) - Handle 'nvidia,refclk-select' as optional (Vidya Sagar) - Disable direct speed change in Endpoint mode so link speed change is controlled by the host (Vidya Sagar) - Set LTR values before link up to avoid bogus LTR messages with 0 latency (Vidya Sagar) - Allow system suspend when the Endpoint link is down (Vidya Sagar) - During remove, free resources allocated during Endpoint .probe() (Vidya Sagar) - Use DWC IP core version, not Tegra custom values, to avoid DWC core version check warnings (Manikanta Maddireddy) - Apply ECRC workaround to devices based on DesignWare 5.00a as well as 4.90a (Manikanta Maddireddy) - Disable PM Substate L1.2 in Endpoint mode to work around Tegra234 erratum (Vidya Sagar) - Delay post-PERST# cleanup until core is powered on to avoid CBB timeout (Manikanta Maddireddy) - Assert CLKREQ# so switches that forward it to their downstream side can bring up those links successfully (Vidya Sagar) - Calibrate pipe to UPHY for Endpoint mode to reset stale PLL state from any previous bad link state (Vidya Sagar) - Remove IRQF_ONESHOT flag from Endpoint interrupt registration so DMA driver and Endpoint controller driver can share the interrupt line (Vidya Sagar) - Enable DMA interrupt to support DMA in both Root Port and Endpoint modes (Vidya Sagar) - Enable hardware link retraining after link goes down in Endpoint mode (Vidya Sagar) - Add DT binding and driver support for core clock monitoring (Vidya Sagar) * pci/controller/dwc-tegra194: PCI: tegra194: Add core monitor clock support dt-bindings: PCI: tegra194: Add monitor clock support PCI: tegra194: Enable hardware hot reset mode in Endpoint mode PCI: tegra194: Enable DMA interrupt PCI: tegra194: Remove IRQF_ONESHOT flag during Endpoint interrupt registration PCI: tegra194: Calibrate pipe to UPHY for Endpoint mode PCI: tegra194: Assert CLKREQ# explicitly by default PCI: tegra194: Fix CBB timeout caused by DBI access before core power-on PCI: tegra194: Disable L1.2 capability of Tegra234 EP PCI: dwc: Apply ECRC workaround to DesignWare 5.00a as well PCI: tegra194: Use DWC IP core version PCI: tegra194: Free up Endpoint resources during remove() PCI: tegra194: Allow system suspend when the Endpoint link is not up PCI: tegra194: Set LTR message request before PCIe link up in Endpoint mode PCI: tegra194: Disable direct speed change for Endpoint mode PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select" PCI: tegra194: Disable PERST# IRQ only in Endpoint mode PCI: tegra194: Don't force the device into the D0 state before L2 PCI: tegra194: Disable LTSSM after transition to Detect on surprise link down PCI: tegra194: Increase LTSSM poll time on surprise link down PCI: tegra194: Fix polling delay for L2 state
2 parents bc55afb + a86ca86 commit b43cdb3

5 files changed

Lines changed: 168 additions & 105 deletions

File tree

Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie-ep.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ properties:
5555
- const: intr
5656

5757
clocks:
58+
minItems: 1
5859
items:
59-
- description: module clock
60+
- description: core clock
61+
- description: monitor clock
6062

6163
clock-names:
64+
minItems: 1
6265
items:
6366
- const: core
67+
- const: core_m
6468

6569
resets:
6670
items:

Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ properties:
5858
- const: msi
5959

6060
clocks:
61+
minItems: 1
6162
items:
62-
- description: module clock
63+
- description: core clock
64+
- description: monitor clock
6365

6466
clock-names:
67+
minItems: 1
6568
items:
6669
- const: core
70+
- const: core_m
6771

6872
resets:
6973
items:

drivers/pci/controller/dwc/pcie-designware.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,13 @@ static inline void dw_pcie_writel_atu_ob(struct dw_pcie *pci, u32 index, u32 reg
487487
static inline u32 dw_pcie_enable_ecrc(u32 val)
488488
{
489489
/*
490-
* DesignWare core version 4.90A has a design issue where the 'TD'
491-
* bit in the Control register-1 of the ATU outbound region acts
492-
* like an override for the ECRC setting, i.e., the presence of TLP
493-
* Digest (ECRC) in the outgoing TLPs is solely determined by this
494-
* bit. This is contrary to the PCIe spec which says that the
495-
* enablement of the ECRC is solely determined by the AER
496-
* registers.
490+
* DWC versions 0x3530302a and 0x3536322a have a design issue where
491+
* the 'TD' bit in the Control register-1 of the ATU outbound
492+
* region acts like an override for the ECRC setting, i.e., the
493+
* presence of TLP Digest (ECRC) in the outgoing TLPs is solely
494+
* determined by this bit. This is contrary to the PCIe spec which
495+
* says that the enablement of the ECRC is solely determined by the
496+
* AER registers.
497497
*
498498
* Because of this, even when the ECRC is enabled through AER
499499
* registers, the transactions going through ATU won't have TLP
@@ -563,7 +563,7 @@ int dw_pcie_prog_outbound_atu(struct dw_pcie *pci,
563563
if (upper_32_bits(limit_addr) > upper_32_bits(parent_bus_addr) &&
564564
dw_pcie_ver_is_ge(pci, 460A))
565565
val |= PCIE_ATU_INCREASE_REGION_SIZE;
566-
if (dw_pcie_ver_is(pci, 490A))
566+
if (dw_pcie_ver_is(pci, 490A) || dw_pcie_ver_is(pci, 500A))
567567
val = dw_pcie_enable_ecrc(val);
568568
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL1, val);
569569

drivers/pci/controller/dwc/pcie-designware.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
#define DW_PCIE_VER_470A 0x3437302a
3535
#define DW_PCIE_VER_480A 0x3438302a
3636
#define DW_PCIE_VER_490A 0x3439302a
37+
#define DW_PCIE_VER_500A 0x3530302a
3738
#define DW_PCIE_VER_520A 0x3532302a
3839
#define DW_PCIE_VER_540A 0x3534302a
40+
#define DW_PCIE_VER_562A 0x3536322a
3941

4042
#define __dw_pcie_ver_cmp(_pci, _ver, _op) \
4143
((_pci)->version _op DW_PCIE_VER_ ## _ver)

0 commit comments

Comments
 (0)