Home/Support/Support Forum/How to use SPI1_IRQ_N as GPIO output?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to use SPI1_IRQ_N as GPIO output?

0 votes
The "ConnectCore 6UL SBC Pro" has an interrupt line "SPI1_IRQ_N", connected to "GPIO5_08" on the SPI expansion connector. How can I use this GPIO as output?
I tried to do the following:
# echo 136 > export
# echo out > gpio136/direction
# echo 1 > gpio136/value
# cat gpio136/value
0
# echo 0 > gpio136/value
# cat gpio136/value
0

The fuses are set that the TAMPTER PINS are disabled. (Tamper 0-9 used as GPIO)

Any suggestions?

Best regards
Mario
asked Mar 6, 2018 in Linux by mruetti New to the Community (2 points)
edited Mar 7, 2018 by mruetti

Please log in or register to answer this question.

2 Answers

0 votes
set it explicitly in device tree as GPIO, making sure it is not set as anything else there.
https://community.nxp.com/thread/462559
answered Mar 7, 2018 by LeonidM Veteran of the Digi Community (2,891 points)
Sorry, I only have minimal experience with the device tree. Therefore can you please show me some details how to do do it?

I tried to add:

&iomuxc_snvs {
    pinctrl-names = "default_snvs";
    pinctrl-0 = <&pinctrl_hog_2>;
    imx6ul-evk {
        pinctrl_hog_2: hoggrp-2 {
            fsl,pins = <
                MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00      0x80000000
                MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08      0x80000000
            >;
        };
    };
};

and

    soc {
        ...
        aips1: aips-bus@02000000 {
            ...
            iomuxc_snvs: iomuxc-snvs@02290000 {
                compatible = "fsl,imx6ull-iomuxc-snvs";
                reg = <0x02290000 0x10000>;
            };


but without any success...
0 votes
I did it this way (http://jingyan.eeboard.com/article/74563) and I was able to set the output. But I still do not understand why it doesn't work from sysfs...
answered Mar 12, 2018 by mruetti New to the Community (2 points)
...