How to remap the GPIOs from the 40 pins header

Do you have some sample code to allow us to follow as templates? what I see in the table below pins 36, 37 and 39 are regular GPIOs, what we need to do is be able to remap any unused gpio to a regular gpio.

For example, we don’t need the ADC pins 10 and 12. Can we remap them into regular gpios to drive them as outputs high or low?

thanks for your help!

These two pins do not contain GPIO multiplexing function.

Maybe my question wasn’t very clear. Are you saying that on the 40 pin header we can only have 3 generic gpios? It does not have to be the ADC I just need more than 3 gpios and I only see pins 36, 37 and 39. Can any other pin be remaped to generic gpios?

@gilmotta Are you asking about Android or unbutu?

I am using Ubuntu right now.

@Frank please help!!!

@gilmotta You need to modify the dts and recompile the firmware to delete the multiplexing functions you don’t need to use.

Follow this docs to rebuild

Ps: We will make an overlay repository next to solve this problem.

1 Like