I have modified the dtb (the dts), currently used in a jetson tk1 (21.5) so that a specific GPIO pin is pulled high. I can measure the pin voltage going high when the device tree gets loaded but just before the boot process is complete, the state of the pin is set to low. I have tried several GPIOs and I get the same behavior. My last attempt was on pin 48 (gpio58). In the device tree file this pin is referred to as ph2. The pin state in the original dtb was low. Any ideas why this happens? Thanks in advance.
Please check the kernel code and that pin may be used by some driver.
gpio-58 is used by vdd-lcd-bl-en in the release BSP in my mind. Please confirm that in your kernel code.
thanks for the response. I believe you are right it is the vdd-lcd-bl-en. Lets reverse the question. What I want is to control an external multiplexer IC. For this to happen I need a gpio pin that can function as an output. Any suggestions which one is not used by anything else within the code. Thanks
There are a lot of gpio-related code in kernel package. You can search gpio_request/gpio_direction_output/gpio_set_value/etc. for reference.