Tool/software:
Hello,
I'm trying to define a GPIO as an output.
I have added the following to my device tree file:
under &main_pmx0:
mygpio1_pins_default: mygpio1-default-pins {
pinctrl-single,pins = <
AM64X_IOPAD(0x0150, PIN_OUTPUT, 7) /* (Y13) PRG1_PRU1_GPO18.GPIO0_20 */
>;
};
Theses lines define my GPIO0_20 pin. Is that correct?
at the end of file:
&main_gpio0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mygpio1_pins_default>;
gpio-line-names = "", "", "", "", "", "", "", "", "", "", /* 10 */
"", "", "", "", "", "", "", "", "", "GPIO0_20"; /* 20 */
};
main_gpio0 (gpio@600000) is defined as gpiochip3:
root@am64xx-evm:~# cat /sys/kernel/debug/gpio
[...]
gpiochip3: GPIOs 546-632, parent: platform/600000.gpio, 600000.gpio:
gpio-558 ( |regulator-5 ) out lo
gpio-565 (GPIO0_20 )
gpiochip4: GPIOs 633-720, parent: platform/601000.gpio, 601000.gpio:
Under the evaluation board terminal, I use the gpioinfo command on /dev/gpiochip3:
root@am64xx-evm:~# gpioinfo -c 3
gpiochip3 - 87 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed output consumer=regulator-5
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: "GPIO0_20" input
line 20: unnamed input
[...]
line 86: unnamed input
Why is not "line 20" defined as an output?
Using gpioget:
root@am64xx-evm:~# gpioget -c 3 20
"20"=inactive
With a voltmeter, I get 0.6V on what is supposed to be the GPIO0_20. Is this because the pin is not well defined?
gpioset doesn't seem to work. Any inputs would be great!
Regards,
Julien