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).
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?
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?
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?
Is this the right tutorial to start with to access the pin from userspace?
Can I use mmap to map the Pin into userspace? If so, what is the address?