Thanks for this. I was able to get the GPIO (Pin 12 on J30 or dap2_sclk_ph7) working correctly (active low, output-high). However, I noticed that controlling the GPIO causes an issue.
If I unexport and export gpio351, I lose the initial state (Active low is 0 instead of 1) and modifying the value results in no voltage change on the pin.
I checked the dap2_sclk_ph7 register (Reg:0x02434018) and get a value of 0x00000005. However, after exporting and unexporting, I get a value of 0x000000405.
Not sure how to make it such that unexporting and exporting a gpio does not change its active low initial state.