AnsweredAssumed Answered

imx6ul Repurpose TAMPERx as GPIO

Question asked by Ryan Shuttleworth on May 5, 2016
Latest reply on Jun 23, 2016 by Isaac Hermida

Hello all.


I have been trying to reuse the imx6ul TAMPERx lines as GPIO but have been unsuccessful.  I am able to reconfigure other pads as GPIOs and leds without issue.  I am new to this so I am likely missing something...


For example I can do the following crude experiment:


pinctrl_hog_1: hoggrp-1 {

      fsl,pins = <

        MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY    0x30b0

        MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */

        MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT  0x17059 /* SD1 VSELECT */

        MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */

        MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00      0x17059

        MX6UL_PAD_LCD_DATA00__GPIO3_IO05        0x17059




After the above device tree entry I can then manipulate GPIO3_IO5 via the file system with 'echo "1|0" > /sys/class/gpio/gpio69/value' but not 'echo "1|0" > /sys/class/gpio/gpio128/value' etc.  I have tried this will the other TAMPER lines as well.


I have also tried leds:


pinctrl_gpio_leds: gpio_leds {

    fsl,pins = <

        MX6UL_PAD_LCD_DATA01__GPIO3_IO06        0x17059

        MX6UL_PAD_LCD_DATA02__GPIO3_IO07        0x17059

        MX6UL_PAD_LCD_DATA03__GPIO3_IO08        0x17059




leds {

    compatible = "gpio-leds";

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_gpio_leds>;


    led0: led0 {

        label = "myled0";

        gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;

        default-state = "off";



    led1: led1 {

        label = "myled1";

        gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;

        default-state = "off";



    led2: led2 {

        label = "myled2";

        gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;

        default-state = "off";




The above device tree entry works, but replacing the gpios with appropriate TAMPER entries fails.


I have examined the TAMPER_PIN_DISABLE fuses via u-boot and it appears that the TAMPER lines should be usable as GPIOs:


=> fuse read 0 3

Reading bank 0:


Word 0x00000003: 7031000c

0x7031000c => '0b111 0000 0011 0001 0000 0000 0000 1100"


From another forum comment:


"Definition of TAMPER_PIN_DISABLE[1:0] are as following :

        00 - enabled, TAMPER0-9 used as TAMPER detection pins.

        01 - disabled TAMPER2-4 and TAMPER7-9 used as GPIO.

        10 - disabled TAMPER0-1 and TAMPER5-6 used as GPIO.

        11 - disabled TAMPER0-9 used as GPIO.


   So, for the mentioned U-boot command, If bit [21:20] is 11, then all the ten tamper pins are programmed to GPIO mode."



Any suggestions as to what I am doing wrong?