The config-pin command used to accept (for example) P8-5, P8-05 or P8_05 but now it only accepts the P8_05 format, this had me confused for a while! It also now fails on non-modifiable pins whereas it used to output something useful like “Pin is not modifyable: P8_01 GND”.
However, ignoring that, can anyone explain what the output means, for example:-
chris@odinfb$ config-pin -l P8_04
Available modes for P8_04 are: default gpio gpio_pu gpio_pd
So the original config-pin was a bash script with a large amount of assumptions, the newer sorta-sorta-not replacment is based on c and dynamicly generates the options…
Most of the default's are the normal default state of the pin at reset (pulled from TI’s datasheet), they will vary… For P8_04, default just happen to be the same as gpio_pd…
Our original goal with config-pin, was to make it work on all future boards… While this worked great on am335x, the am57xx has some nasty bugs where it’s preferred to do it in u-boot… Then while bringing up the arm64 devices, mainline libgpiod actually has some normal gpio state options. and then with riscv64…
Yeah, i think we’d really just like to help push libgpiod to get a generic pin thing working for all boards going forward…
Whatever, I still want to know what default means.
What I actually want to know is which gpio pins I can use without hassle from a default system boot. I.e. I want to be able to turn it on and, programmatically, use GPIO pins without risking stopping things working.
I know (I think) that I can’t use the GPIO pins that do things with the EMMC, on the other hand I think I can use the ones used for UART and LCD (as long as I don’t wan to use UART or LCD, obviously). But it’s incredibly difficult to find information which provides this information.