GPIO Pin Assignment
To configure GPIO in the DTS an entry such as the following can be used, which consists of the GPIO bank, the GPIO Number, and the GPIO Options. More information on the possible GPIO options can be found here.
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
The above example defines a node label gpios using bank gpio1 with GPIO number 5 that would map to Pin Number P21 on ATM33/ATM34/ATM5 platforms, with GPIO Options GPIO_ACTIVE_HIGH.
Below are tables containing mappings of the GPIO banks and their GPIO number to the physical pin number:
Note
Not all packages will have all of the GPIOs available to them. Please check the Pinmux Tool to see the available GPIO for a given package.
ATM33:
GPIO Bank |
GPIO Number |
Pin Number |
|---|---|---|
gpio0 |
0-15 |
P0-P15 |
gpio1 |
0-14 |
P16-P30 |
ATM34:
GPIO Bank |
GPIO Number |
Pin Number |
|---|---|---|
gpio0 |
0-15 |
P0-P15 |
gpio1 |
0-14 |
P16-P30 |
gpio2 |
3-15 |
P35-P47 |
gpio3 |
0-3 |
P48-P51 |
ATM5/e:
GPIO Bank |
GPIO Number |
Pin Number |
|---|---|---|
gpio0 |
0-15 |
P0-P15 |
gpio1 |
0-15 |
P16-P31 |
gpio2 |
0-15 |
P32-P47 |