There is a document. It is called a Datasheet. It shows all the electrical characteristics including default settings of every pin on power up. I would start there.
As the pins are not set any other way until the SW runs, you MUST use the default settings to determine the default state of the pins. Then you need to determine the state after the UBoot runs.
If both pass muster, then you should be OK, as long as you do not plug in a Cape that could override either of these.
If one pin is sHI and one pin is LOW then you should not tie them together.
If any pin is in any other state than mode 7, then they should not be tied together.
Maximum voltage on expansion pins is 3.3V except the AIN pins, which do not have any value to be tied together.
Now, based on what you want to do, IF you set things up right in SW, an output would be connected to an input based on the keyboard function. That is acceptable and will cause no issues, assuming the SW works right form the beginning and yo do not have to experiment with a bunch of boards until the SW works. You may need to add pullups to the inputs. Again, select pins that are not used for other functions on power up, like GPMC and LCD.
No, that is what you want. You will connect inputs to out puts, that is fine.You do not want two outputs driving, one lo and one hi for example. No protection needed.
Hummm… I think that you misunderstand my problem. I do not want to connect multiple outputs together but I know it will happen if multiple keys are pressed simultaneously.
I will connect each of the 3 column pins C1 … C3 to a different output GPIO and each of the 4 row pins R1 … R4 to a different input GPIO.
So
pressing the key ´1´ connects R1 to C1
pressing the key ´2´ connects R1 to C2
pressing the key ´3´ connects R1 to C3
pressing the key ´4´ connects R2 to C1
etc
Now, if a user presses both ´1´ and ´2´ then C1 and C2 will become connected to each others via R1.
You can use a common ground keyboard and make them all inputs with pulls ups. If multiple keys are onnected, then no issues.
In the scanned mode only one output would be active at a time. When not being driven, make the other pins mode 7 which is high impedance. Any input back in to them will not cause any issues as they are in essence disconnected.