LCD_VSYNC (GPIO2_22) going low at "Starting kernel ..."

I have a custom board running as a BBB with the build from here:

I have commented out the whole ‘&am33xx_pinmux’, ‘&lcdc’, and ‘&i2c0’ sections in am335x-boneblack.dts to disable hdmi.

I have set LCD_VSYNC (GPIO2_22) to toggle in u-boot (board.c). I see the pin toggle, but as soon as I see “Starting kernel …” on the console, the pin goes low. I don’t know if it’s happening at the end of u-boot, or at the beginning of loading the kernel.

I need it to stay high. I tried adding an LED entry in the device tree to make it high, but that’s happening too late in the kernel boot.

This pin is connected to a USB 4G module’s reset line and it needs to be high so that Linux detects it on bootup and sets up the ethernet interface. I can set it up manually after, but I’d like it to ‘just come up’.



I’d start with gpio hog…


GPIO hog seems to work. I still see the pin go low, but then it goes high right away.

But, how do I now control this pin from userspace? I can’t ‘export’ that pin now because “write error: Device or resource busy”.