Roadrunner technical documentation Buy on-line

How to use special GPIOs

This article explais how to use as normal IO lines some special GPIOs

PD14...PD18

This pins are defined by default as JTAG pins. To use them as normal GPIO it is possible to change the fuse configuration using SAM-BA or force the SAMA5D27 CPU to set them as normal GPIO.

In this last case use the Dougg Gilbert GPIO utilities and add these line at Linux startup:

# mem2io -w -i fc0380c0,7c000
# mem2io -w -i fc0380c4,200

PA30

PA30 has by default an internal pull down resistor and is used as SDMMC1_CD signal.

To use it as normal GPIO use this command (Dougg Gilbert GPIO utilities):

mem2io -w -i fc038000,40000000 e mem2io -w -i fc038004,200

How to set pins as GPIO using the device tree

To set as normal GPIO some pins inside the device tree use a section like this adding the pins you need:

pinctrl_gpio: gpio_default {

    pinmux = <PIN_PA12__GPIO>, 
            <PIN_PD31__GPIO>,  
            <PIN_PB22__GPIO>,  
            <PIN_PC9__GPIO>,   
            <PIN_PB17__GPIO>,  
            <PIN_PB16__GPIO>,  
            <PIN_PD13__GPIO>,  
            <PIN_PD16__GPIO>,  
            <PIN_PD18__GPIO>;  

    bias-pull-down;
};

To compile the device tree follow this article:

Roadrunner technical documentation Buy on-line