The DevCtl MaxPayload is lower than DevCap

Hi!!

I understood that the DevCap represents the capability and the DevCtl represents the actual MaxPayload negotiated between the parts. The device is a Xilinx FPGA with 1024 bytes of maximum payload capability. However, I’m using a Jetson AGX Orin 64G and according to Orin Series System-on-Chip Technical Reference Manual (section 9.3.1.1, page 7356), the maximum payload size is 256 bytes. In this way, I expected the DevCtl would be 256 bytes at least, but the value was defined to 128.

  1. Can I set the actual MaxPayload to 256 or higher? It’s very important to my project.
  2. Can I configure this using setpci? I checked some forums about this, but I couldn’t replicate any solutions.

Hi,

If you are designing a custom base board, then it means some adaptation configurations are needed.
Otherwise, your board may not work fine.

For Orin AGX series, you could refer to below document
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?highlight=universal%20serial%20bus#jetson-agx-orin-platform-adaptation-and-bring-up
(please be aware that above link is for rel-36.3/jetpack6.0)

This document includes below configuration

  1. pinmux change & GPIO configuration
  2. EEPROM change as most custom boards do not have an EEPROM on it.
  3. Kernel porting
  4. PCIe configuration
  5. USB configuration
  6. MGBE configuration
  7. RGMII configuration

Thanks!

Some example for how to use setpci.

sudo setpci -s 0005:00:00.0 74.w (device capabilities register for x4)
sudo setpci -s 0005:00:00.0 78.w ( Device Control register for x4) and write value for bits 7:5 as (001b) for 256 Bytes MPS

You have to change 0005:00:00.0 to the device you are using here.

Hi! Thanks a lot! I can configure the Control Register now, It’s possible to check the new value in lspci. However, I can’t communicate in this maximum payload size yet. If a message with 256 bytes of payload is sent, the Jetson reports a MalfTLP.

Do I need to configure another parameter in the Jetson to be compatible with 256 bytes?

All devices available on ‘lspci’ are defined to 128 bytes, independently of the device capability. Here are the default (initialized) values for all connected pci devices.

DevCap: MaxPayload 256 bytes, PhantFunc 0
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevCap: MaxPayload 256 bytes, PhantFunc 0
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
MaxPayload 128 bytes, MaxReadReq 512 bytes