Accessing RESET_OUT on iMX6

On of our external devices has its Reset Input Pin connected to RESET_OUT# of the Colibri Evaluation Board (Pin B32 on X3 interface of the Eva Board, SODIMM Pin Number 87).

  1. Question

Citing the Colibri iMX6 Datasheet, p. 28

On the Colibri iMX6 V1.0, the nRESET_OUT (pin 87) is a buffered output of the PMIC reset output (RESETBMCU). Since the PMIC reset output cannot be triggered by a software initiated reset cycle, the circuit has been updated on module version 1.1 (see also Colibri iMX6 errata document). An additional transistor circuit allows driving the external nRESET_OUT signal low by driving high the RGMII_RD1 pin of the SoC (GPIO6_IO27). The circuit is compatible with older software versions which leave the RGMII_RD1 pin unused.

Do I understand correctly that RESET_OUT can in no way be triggered by software on a Colibri iMX6 V1.0?

  1. Question

Citing iMX6 Solo/6DL Reference Manual / IMX6SDLRM.pdf, p.1067

RGMII_RD1 : Contains the Ethernet input data transferred from the PHY to the media-access controller when RX_EN is asserted

Does it mean that we would loose Ethernet functionality if we used RGMII_RD1 to drive nRESET_OUT?

  1. Question

I tested GPIO6_IO27 in the terminal:

root@colibri-imx6:~# echo 187 > /sys/class/gpio/export
root@colibri-imx6:~# echo "out" > /sys/class/gpio/gpio187/direction
root@colibri-imx6:~# cat /sys/class/gpio/gpio187/value
0
root@colibri-imx6:~# echo 1 > /sys/class/gpio/gpio187/value

And I saw Pin B32 on X3 interface of the Eva Board going low on the oscilloscope.

As a first step I would like to do this in C from a user space program. Later I would like to do this from within a kernel driver.

Do I have to change the device tree to do so? Where is it configured?

  1. Question

I just found: How to use GPIO as output on Colibri running Embedded Linux

Is this the right tutorial to start with to access the pin from userspace?

  1. Question

Can I use mmap to map the Pin into userspace? If so, what is the address?

Hi

Do I understand correctly that RESET_OUT can in no way be triggered by software on a Colibri iMX6 V1.0?

Yes.
Well, at least we did not find a way to do so.

Does it mean that we would loose Ethernet functionality if we used RGMII_RD1 to drive nRESET_OUT?

No.
The 100BaseT PHY is connected over RMII which does not use that pin. RGMII_RD1 pin is not connected in the V1.0 HW.

As a first step I would like to do this in C from a user space program. Later I would like to do this from within a kernel driver.
Do I have to change the device tree to do so? Where is it configured?

We currently configure the pin only in U-Boot. If you plan to use it in Linux, either from user space or a kernel driver I would recommend creating a group in the iomuxc node and add that to the pinmux-0 property of the iomuxc node (user space use) or your driver’s node (kernel driver use).

Note: (sorry for the shouting, but this has been asked one time to many)
‘root@colibri-imx6:~# cat /sys/class/gpio/gpio187/value’
ONE CAN NOT READ BACK THE VALUE OF A GPIO SET TO OUTPUT ON IMX UNLESS THE SION BIT IS SET!

Is this the right tutorial to start with to access the pin from userspace?

Yes. I would start with this page though. That page also has a link to the kernel documentation which is worth reading trough.

Can I use mmap to map the Pin into userspace? If so, what is the address?

Yes you can. I always caution against doing such a thing. The Kernel is the manager of the HW. If you touch stuff which the Kernel thinks it has total control over you may get unexpected results.

Get the i.MX 6DL Reference Manual which has the needed information.

Max