How to toggle/reset gpio from device tree imx7d

Hi @jaski.tx
I am using Colibri iMX7D 1GB eMMC SOM with Kernel 3.0.
I have connected one device’s reset pin to GPIO2_IO1, How can I toggle/reset (from low to high) device before booting linux from device tree.
Or any other suggestions on this.

Thank you

Could you please help

I’d recommend to toggle pin at U_Boot level. You can add it to the end of int board_init(void). Please check how back light pin get inited and toggled.

Hi @alex.tx,
Thank you for your suggestions.
Let me try below:

git clone -b toradex_2019.07 git://
Do required modifications
make colibri_imx7_defconfig
make colibri_imx7_emmc_defconfig
make u-boot.imx

Copy u-boot.imx image into Colibri-iMX7-eMMC_Console-Image-Tezi_3.0b4 and flash into eMMC using EasyInstaller?

Please suggest if i am missing anything.

Thank you

Please follow this article.

Adding solution to toggle GPIO from u-boot
int board_init(void)

gpio_request(33, “device-reset”);
gpio_direction_output(33, 1);

//set low
gpio_set_value(33, 0);
//set high
gpio_set_value(33, 1);


You need to do a pin muxing and request a GPIO and set direction first. Please check how back light pin get inited and toggled. colibri_imx7.c « colibri_imx7 « toradex « board - u-boot-toradex.git - U-Boot bootloader for Apalis and Colibri modules

hi @neeraj.verma

Is the issue solved?

Best regards,

Hi @jaski.tx ,
Thank you for following up on this.
Actually the question I asked is answered but not in a way what I was looking far, I am able to toggle gpio from u-boot not from device tree.

I plan to create a new thread.

Thank you

Thanks for update.