Config-pin utility - To change the pinmux settings for a pin does not
need device tree overlays now (4.4+ kernel), you can simply use
‘config-pin’ utility. To configure the pin you just need to know its
position on the board, so to change mux settings of pin at , for
example , P8_46
$ config-pin -l P8_46
The output shows space separated list of available pin-modes and will
look like :
$ default gpio gpio_pu gpio_pd pruout pruin pwm
Now to change pinmode, to, for example, pruout
$ config-pin P8_46 pruout
This will configure pin at P8_46 to pru_output mode. Further status of
the pin can be known using ‘config-pin -i’, which will give detailed
output.
$ config-pin -i P8_46
Pin name: P8_46
Function if no cape loaded: hdmi
Function if cape loaded: default gpio gpio_pu gpio_pd pruout pruin pwm
Function information: lcd_data1 default gpio2_7 gpio2_7 gpio2_7 pr1_pru1_pru_r30_1 pr1_pru1_pru_r31_1 ehrpwm2B
Cape: cape-universala cape-univ-hdmi
Kernel GPIO id: 71
PRU GPIO id: 103