How to configure JTAG pins as GPIO?

Dear all,
We would like to use JTAG/GPIO pins in 40-pin header of CCUL SBC Express board as GPIO.

The referred pins are:
pin12: JTAG_TDI/GPIO1_13
pin15: JTAG_MOD/GPIO1_10
pin16: JTAG_TMS/GPIO1_11
pin35: JTAG_TDO/GPIO1_12
pin12: JTAG_nTRST/GPIO1_15
pin12: JTAG_TCK/GPIO1_14

What do we have to modify in the device tree to use them as GPIO?
Thank you very much for your collaboration.
BR,
alvaro

looks like you can’t use pin15: JTAG_MOD/GPIO1_10 as GPIO:
https://community.nxp.com/thread/464045

Most of the CPU pads can be muxed to work as GPIO, and most of them default to work as GPIO from reset. The JTAG pads, however, default to work as JTAG pads from reset:

The reason is that they need to work as such immediately if you want to be able to stop and debug the CPU before it runs any code.

To use them as GPIOs on youр device tree you must specifically change their IOMUX to work as GPIO. For example:

    pinctrl_whatever {
        fsl,pins = <
            MX6UL_PAD_JTAG_TRST_B__GPIO1_IO15     0x3000
            MX6UL_PAD_JTAG_TCK__GPIO1_IO14        0x3000
            MX6UL_PAD_JTAG_TMS__GPIO1_IO11        0x3000
            MX6UL_PAD_JTAG_TDO__GPIO1_IO12        0x3000
        >;
    };

Anyway, in general, if you are going to use a pad as GPIO on your board, you’d better define a pinctrl where the pad is set to work as GPIO. Relying on the reset-default functionality of the pad is a bad idea because the boot loader might reconfigure a pad for a different functionality than the reset-default.