.. _gpio_pin_assign: 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 `_. .. code-block:: dts gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; * For ATM2/ATM3 ``gpio1`` with GPIO number ``5`` would map to ``P25``. * For ATM33/ATM34 ``gpio1`` with GPIO number ``5`` would map to ``P21``. 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. **ATM2/ATM3:** +-----------+-------------+------------+ | GPIO Bank | GPIO Number | Pin Number | +===========+=============+============+ | gpio0 | 0-13 | P0-P13 | | | | | | | 14-15 | P18-P19 | +-----------+-------------+------------+ | gpio1 | 0-13 | P20-P33 | +-----------+-------------+------------+ **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 | +-----------+-------------+------------+