M.2 E-key wifi and M-Key co-exist on Jetson NX custom board

We have a custom board designed for compatible with Nvidia Xavier NX and Nvidia Nano. The carrier board has the 1 M.2 E -Key (for WiFi Card) and 1 M.2 M-Key (for NVMe Card).

Here’s the connection from module between carrier board.

Pin# / Module Pin Name
162 | PCIE0_CLK_P => E-Key
160 | PCIE0_CLK_N => E-Key
136 | PCIE0_TX0_P => E-Key
134 | PCIE0_TX0_N => E-Key
133 | PCIE0_RX0_P => E-Key
131 | PCIE0_RX0_N => E-Key

175 | PCIE1_CLK_P => M-Key
173 | PCIE1_CLK_N => M-Key
174 | PCIE1_TX0_P => M-Key
172 | PCIE_TX0_N => M-Key
169 | PCIE_RX0_P => M-Key
167 | PCIE_RX0_N => M-Key

Then the following pin are shared with E-Key and M-Key.

179 | PCIE_WAKE
181 | PCIE0_RST
180 | PCIE0_CLKREQ
210 | CLK_32K_OUT

First I tried on NX platform, without modifying and kernel, dts and odmdata, I got

  1. E-Key WiFi card can be enumerated
  2. M-Key NVMe can not be enumerated.

And also M-Key clock is not active.

But after doing a trick, change ODMDATA=0xB8190000; (change bit 12 => PCIe C5 to endpoint mode), I got the following:

  1. M-Key NVMe can be enumerated
  2. E-Key WiFi can not be enumerated.

My question is

  1. Is under such hardware connection, NVMe and WiFi can co-exist at the same time ? How to modify DTS file ?
  2. All these PCIe controllers should be in RC mode, but why set C5 controller to endpoint mode make M-Key NVMe workable but diable E-Key WiFi card.

CLKREQ and PERST can not be shared signals. Please get them routed to M.2 Key-E and M.2 Key-M slot from their respective controllers.
Going by the naming convention used in the post, seems like PERST# to M.2 Key-M slot comes from the controllers that actually owns M.2 Key-E slot. So, it is not surprised that card gets enumerated in M.2 Key-E slot and not in M.2 Key-M slot.

The trick that is done here to operate C5 controller has nothing to do with the functionality / operation of M.2 Key -E / M.2 Key-M slots as they are owned by different controllers altogether. I’m not sure how card connected to M.2 Key-M slot got enumerated with this.

In anycase, there is a fundamental issue with the design here as PERST# and CLKREQ# can’t be shared across slots. Please fix that issue.