We are in the process of making a custom board for a System On Module. The System On Module exposes 4 PCIe Gen 2 lanes on its SODIMM pinout. As per our requirement, we are planning on having a WiFi/BLE device and a PCIe SSD. WiFi/BLE chip requires only one PCIe lane. But PCIe SSDs on the other hand can use upto 4 lanes. The WiFi/BLE chipset can be surface mounted, while most SSDs require m.2 M-key.
Wikipedia page on m.2 says that the M-key provides PCIe x4: https://en.wikipedia.org/wiki/M.2#Form_factors_and_keying
Based on these requirements, I have a couple of questions.
Would it be possible to connect only 2 of the PCIe lanes from the SODIMM pinout to the m.2 M-key slot/connector on the board? This way we will be left with 2 lanes not connected. One of which can be used with the WiFi/BLE chip. Will this setup work? Or does the PCIe specification prohibit this?
From what I have read online, PCIe is forward compatible. And you can also connect a x4 card to a x2 slot. So will a Gen 3 PCIe x4 PCIe SSD work fine in a Gen 2 slot with only 2 lanes connected?
I would really appreciate some help here. Thanks.