I am using the Olimex A20 micro board and I want to setup the PE02 pin as an output with gpio function.
I tried to add it to the pio section of the dts in sun7i-a20-olinuxino-micro.dts and compile the openwrt image
&pio {
gmac_txerr: gmac-txerr-pin {
pins = "PA17";
function = "gmac";
};
led_pins_olinuxino: led-pins {
pins = "PH2";
function = "gpio_out";
drive-strength = <20>;
};
gsm_power: gsm-power-gpio {
pins = "PE2";
function = "gpio_out";
drive-strength = <20>;
};
but still it doesnt output any voltage on the output. trying to use sys/class/gpio
export and then echo 1 will still give 0V on output. Intrestingly when I set it as an input and connect a positive signal i can read the value as 1 sun4i-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
xport
root@O
What could be the issue and How can I solve it?
// UPDATE:
I noticed that when i Issue command echo 130 > /sys/class/gpio/export
the console prints `sun4i-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator xport`
Need to properly setup PE port power supply, as it was noticed. Olimex does it for us: https://github.com/OLIMEX/linux-olimex/commit/13d64c1e9994a7a22452958b5536dd944d8ba7ca#diff-e6b72e34b312d8c7a17bdb4185b44df18d7f44faa8b5b2b8bb7c759f74c4fd47