@@ -386,6 +386,13 @@ static const struct j721e_pcie_data j784s4_pcie_ep_data = {
386
386
.max_lanes = 4 ,
387
387
};
388
388
389
+ static const struct j721e_pcie_data j722s_pcie_rc_data = {
390
+ .mode = PCI_MODE_RC ,
391
+ .linkdown_irq_regfield = J7200_LINK_DOWN ,
392
+ .byte_access_allowed = true,
393
+ .max_lanes = 1 ,
394
+ };
395
+
389
396
static const struct of_device_id of_j721e_pcie_match [] = {
390
397
{
391
398
.compatible = "ti,j721e-pcie-host" ,
@@ -419,6 +426,10 @@ static const struct of_device_id of_j721e_pcie_match[] = {
419
426
.compatible = "ti,j784s4-pcie-ep" ,
420
427
.data = & j784s4_pcie_ep_data ,
421
428
},
429
+ {
430
+ .compatible = "ti,j722s-pcie-host" ,
431
+ .data = & j722s_pcie_rc_data ,
432
+ },
422
433
{},
423
434
};
424
435
@@ -572,15 +583,14 @@ static int j721e_pcie_probe(struct platform_device *pdev)
572
583
pcie -> refclk = clk ;
573
584
574
585
/*
575
- * The "Power Sequencing and Reset Signal Timings" table of the
576
- * PCI Express Card Electromechanical Specification, Revision
577
- * 5.1, Section 2.9.2, Symbol "T_PERST-CLK", indicates PERST#
578
- * should be deasserted after minimum of 100us once REFCLK is
579
- * stable. The REFCLK to the connector in RC mode is selected
580
- * while enabling the PHY. So deassert PERST# after 100 us.
586
+ * Section 2.2 of the PCI Express Card Electromechanical
587
+ * Specification (Revision 5.1) mandates that the deassertion
588
+ * of the PERST# signal should be delayed by 100 ms (TPVPERL).
589
+ * This shall ensure that the power and the reference clock
590
+ * are stable.
581
591
*/
582
592
if (gpiod ) {
583
- fsleep ( PCIE_T_PERST_CLK_US );
593
+ msleep ( PCIE_T_PVPERL_MS );
584
594
gpiod_set_value_cansleep (gpiod , 1 );
585
595
}
586
596
@@ -671,15 +681,14 @@ static int j721e_pcie_resume_noirq(struct device *dev)
671
681
return ret ;
672
682
673
683
/*
674
- * The "Power Sequencing and Reset Signal Timings" table of the
675
- * PCI Express Card Electromechanical Specification, Revision
676
- * 5.1, Section 2.9.2, Symbol "T_PERST-CLK", indicates PERST#
677
- * should be deasserted after minimum of 100us once REFCLK is
678
- * stable. The REFCLK to the connector in RC mode is selected
679
- * while enabling the PHY. So deassert PERST# after 100 us.
684
+ * Section 2.2 of the PCI Express Card Electromechanical
685
+ * Specification (Revision 5.1) mandates that the deassertion
686
+ * of the PERST# signal should be delayed by 100 ms (TPVPERL).
687
+ * This shall ensure that the power and the reference clock
688
+ * are stable.
680
689
*/
681
690
if (pcie -> reset_gpio ) {
682
- fsleep ( PCIE_T_PERST_CLK_US );
691
+ msleep ( PCIE_T_PVPERL_MS );
683
692
gpiod_set_value_cansleep (pcie -> reset_gpio , 1 );
684
693
}
685
694
0 commit comments