Project

General

Profile

BHA5E dev kit: J10 M.2 devices stuck in Polling.Active (no link)

Added by Brady Heater 17 days ago

Hello,

We’re bringing up PCIe devices on the M.2 slot (J10) of our MitySOM-A5E dev kit (A5ED-B64-144-SRC-X, R0 silicon), using the GTS PCIe root port in the FPGA. The Broadcom 9660-16i HBA previously trained and enumerated on J10 through an M.2-to-PCIe adapter. Now neither an x4 NVMe SSD plugged directly into J10 nor a Renesas uPD720202 USB 3.0 card (SIIG JU-P20612-S1, on an externally powered adapter) will link up.

What we see in the root port’s ss_app_ltssmstate (via our status register):

Empty slot: LTSSM 0x00 (Detect.Quiet).
With the NVMe or the USB card: stuck at 0x02 (Polling.Active), with no link-up and no data-link-up.
So the root port detects the device’s receivers, but the device never sends training sequences back. The Linux altera-pcie probe then fails with -110, because the HIP mailbox doesn’t respond while the link is down.

Already ruled out:

Our FPGA PERST# is released 100 ms after configuration (open-drain on BU109 with R77 pull-up). Driving it push-pull high made no difference.
The FPGA design matches the build where the HBA trained. The refclk input is AT120/AT115 (HCSL).
The PCIe subsystem clocks are back at stock values.
Questions:

What drives the J10 REFCLK pair? Is that clock gated by CLKREQ#, a GPIO or I²C setting, or a jumper that we need to enable?
Under what conditions does U13 hold the M.2 PERST# low?
Have you run a standard x4 NVMe SSD directly in J10 on this kit, and was anything needed to make it work?
Thanks,
Brady


Replies (4)

MW RE: A5E dev kit: J10 M.2 devices stuck in Polling.Active (no link) - Added by Michael Williamson 15 days ago

Hi Brady,

We have had some success bringing up NVMe drives on that J10 connector, but be aware there are some issues related to drives requiring host side memory buffering (HMB).

Can you provide the 80- and serial number of your devkit?

What drives the J10 REFCLK pair? Is that clock gated by CLKREQ#, a GPIO or I²C setting, or a jumper that we need to enable?

J10 pins 53/55 are wired directly to U68 OUT10 (pins 45/46), a Skyworks Si5332 set to 100 MHz HCSL. There is no buffer, switch or jumper in between. The clock is not gated by CLKREQ#: J10 pin 52 only has a 10k pull-up to 3.3V (R80). None of U68's hardware input pins controls an output.

Your FPGA refclk on AT120/AT115 is U68 OUT5. OUT5 and OUT10 come from the same internal VCO and divider, so the root port and the slot share one 100 MHz clock. U68 is set up at boot by the config_pll.scr u-boot script. Settings are here:
https://support.criticallink.com/redmine/projects/mitysom_a5/wiki/Programming_the_DevKit_Silicon_Labs_PLL

Please also double check that R173 (near U68) is installed. We had one carrier board in our initial prototypes that did not have this device fitted and if it's not fitted U68 may free run and generate a clock that is close enough to spec (91.8 MHz) that our initial board test checks may have missed it.

Under what conditions does U13 hold the M.2 PERST# low?
U13 is a TLV803S voltage supervisor (2.93 V threshold, open-drain, about 200 ms reset delay) monitoring +3.3V. It pulls PERST# low only while 3.3V is below the threshold, and for about 200 ms after 3.3V rises above it. In other words, only at power-up or brown-out. After that, R77 pulls PERST# high unless the FPGA (BU109, through R75 240 Ω) pulls it low. The same net also feeds the HIP's hard PERST input (dev kit errata 4.11).

Please drive BU109 open-drain only, as you do now, and not push-pull high, so the FPGA never fights U13. For which PERST# pads are valid on your silicon revision, see Altera's Agilex 5 errata 825514, Table 3.

Also be aware that with the R0 silicon you need to honor the Agilex 5 silicon errata and ensure the other PERST# pin on the HVIO bank is floating. It think that pin goes to the PCIe edge connector so you should be OK there.

Have you run a standard x4 NVMe SSD directly in J10 on this kit, and was anything needed to make it work?

Yes. We've run Samsung 960, 970 and 970 PRO and Intel 600P drives in J10 at Gen3 x4 with a MitySOM-A5E standard, with no board changes beyond the R173 point above. One working configuration, a port of Altera's agilex5-ed-pcie-rp example design, uses:
- HIP lanes on bank 1B: RX BD133/BD135, BB133/BB135, AY133/AY135, AV133/AV135; TX BE126/BE129, BC126/BC129, BA126/BA129, AW126/AW129
- Refclk on AT120/AT115, HCSL (U68 OUT5)
- PERST# on BU109, input only (U13 and R77 release it)
- The standard u-boot config_pll.scr

You can also feed the bank 1B refclk pins from U68 OUT3 (net m.2M_PCIe_REFCLK). That output is off in the stock settings and can be turned on with a small register change. We can send that change, and the reference project, if useful.

One you get the LTSSM link up, there may be some additional patches needed for some devices. We are working to pull together a reference project for these ports. For now, you may want to set the kernel option nvme.max_host_mem_size_mb=0.

With regards,
Mike

BH RE: A5E dev kit: J10 M.2 devices stuck in Polling.Active (no link) - Added by Brady Heater 11 days ago

Hi Mike,

Thanks for the detailed answers. Here’s where things stand.

Part and serial numbers

SOM: A5ED-B64-144-SRC-X

R173
I can’t find an R173 near U68 on the carrier.

U68 readback
Read in Linux (i2c bus 2, address 0x6a) after U-Boot runs config_pll.scr. Every register config_pll writes that I checked matches:

0x17=0x72, 0x18=0x30, 0x24=0x02, 0x25=0x50, 0x26=0x20, 0x36=0x08, 0x37=0x55, 0xB6=0xE5, 0xB7=0x0D, 0xBD=0x02

However, 0x06 reads 0x00 (config_pll’s last write is 0x02) and 0x05 reads 0xBF. Is that the expected state, or does it mean U68 isn’t locked or active, for example because R173 is missing?

PERST#
BU109 is driven open-drain only: the FPGA pulls it low for about 100 ms after configuration, then releases it, and R77 pulls it high. I had briefly tested driving it high push-pull; that’s been removed. On the second PERST# input, the hard IP’s pin_perst_n_i input is tied to ‘1’ inside the FPGA and not assigned to a pin. The 825514 §2.4.9 workaround asks for both ports to be assigned to their HVIO pins with weak pull-downs. Is our tie-off acceptable on R0 silicon, or should we assign it to its pin (CF132?)? If we do, where does that pin go on the carrier?

Design
Lanes, refclk and PERST# match your working configuration: RX/TX on bank 1B with the pins you listed, refclk on AT120/AT115 (HCSL), and PERST# on BU109. We use the standard config_pll.scr. I’ve added nvme.max_host_mem_size_mb=0 to the kernel boot arguments.

Current result
With an x4 NVMe directly in J10, and separately with a Renesas uPD720202 USB 3.0 card, the LTSSM stops at Polling.Active (HIP status 0x10). An empty slot reads Detect.Quiet (0x00). A Broadcom 9660-16i HBA did train in J10 on this same carrier earlier. I’m re-testing it now as a control.

Thanks,
Brady

MW RE: A5E dev kit: J10 M.2 devices stuck in Polling.Active (no link) - Added by Michael Williamson 11 days ago

Hi Brady,

What version of Quartus Pro are you currently using?

Mike

    (1-4/4)