Trying to understand the IO Pin Modes in the manual

I'm trying to understand how to *use* the tables in the BBB manual
that how the GPIO (and other) pin modes.

I understand the principal in that given the mode and the physical pin
number you can see what IO from the processor drives the pin.

What isn't clear (and I've done some Google searching that didn't help
much) is how to set the mode. Can it only be done on a pin by pin
basis and, more importantly, does the system boot with all the pins in
a specific mode?

If the system doesn't power up with all the pins in the same mode is
there anywhere that actually tells me what mode each pin is in after
booting?

I realise this may be different with different Linux distributions (or
even non-Linux OS) but some sort of default that one can expect at
start up would be very useful.

From a HW standpoint, all this information is found in the Technical Reference Manual for the AM3358 processor.

http://www.ti.com/product/am3358

Gerald

OK thank you, yes, it does answer much of what I asked.

However it doesn't say what one has, by default, after booting the
system. Does everything in general stay in mode 0?

That is taken care of by the device tree file.

Gerald

Ah, yes, makes sense now. That gets 'written' at boot time and sets
all of the modes etc. Thank you.

Now. You also need to look at the datasheet. That tells you the state of the pins on power up and after reset. If the DT file does not set certain pins, then they will stay at the default power up mode. It also indicates the state of the pin before the DT file is used to set the pins.

Gerald