On Iris X16 connector pins 13-20 are gpio pins. I can export and use all pins except pin 20.
As per the Iris datasheet Pin 20 on X16 is connected to SODIMM_45.
As shown in the attachment SODIMM_45 is mapped to GPIO2_IO22 which in user space is IO 54.
I get a device in use or resource busy error when exporting. What am I missing?
GPIO2_IO22 is used as a wake up pin to wake up from standby or suspend mode. See the corresponding node in device tree here. You may change this in your device tree as per your requirement. Also have a look at our Device Tree Customization article for reference.