I'm working with the imx6 GPIO driver on Wandboard Quad, using the gpio_led run file as a smoke test. Unfortunately, I've had only limited success controlling the GPIO pins exported to the Wandboard's JP-4. It is unclear where these pins map in the Genode imx6 driver (18.05, nova). In Linux, I can successfully toggle them all via /sys/class/gpio.
The imx6 driver allows for 32 pins to be set to high or low and I have modified the run file and the main.cc file to blink sets of pins rather than just a single pin. If I set all 32 pins as output with an initial value of "0" in the run file and then blink the following sets of pins I see these results:
0-31: I read 3 pins blinking with a voltage meter 0-15: I read 2 pins blinking 0-6: I read no pins blinking 7-15: I read no pins blinking
It seems as though it takes combinations of pins set to high and low at the same time to get a reading of high or low off of a particular pin, but I cannot divine the pattern. This leads me to think that there is a step missing in the initial configuration.
Does anyone have a suggestion of what step I am missing to get predictable results?
Hi Edward,
On Wed, Aug 22, 2018 at 12:24:57PM -0500, Edward Sandberg wrote:
I'm working with the imx6 GPIO driver on Wandboard Quad, using the gpio_led run file as a smoke test. Unfortunately, I've had only limited success controlling the GPIO pins exported to the Wandboard's JP-4. It is unclear where these pins map in the Genode imx6 driver (18.05, nova). In Linux, I can successfully toggle them all via /sys/class/gpio.
You are writing that you use Genode 18.05 nova? The nova kernel does not run on ARM platforms. Certainly, you are using the base-hw kernel?
The imx6 driver allows for 32 pins to be set to high or low and I have
The imx6 gpio driver allows to set 7*32=224 pins to be set. It controls 7 dedicated GPIO controllers with 32 pins for each. When you want to address a pin of a controller > 0, you have to add an offset accordingly.
modified the run file and the main.cc file to blink sets of pins rather than just a single pin. If I set all 32 pins as output with an initial value of "0" in the run file and then blink the following sets of pins I see these results:
0-31: I read 3 pins blinking with a voltage meter 0-15: I read 2 pins blinking 0-6: I read no pins blinking 7-15: I read no pins blinking
It seems as though it takes combinations of pins set to high and low at the same time to get a reading of high or low off of a particular pin, but I cannot divine the pattern. This leads me to think that there is a step missing in the initial configuration.
The pins that are led through the board are not pins 0-31 of controller 0, but different pins from different controllers, please have a look here:
http://wiki.wandboard.org/External_gpios
According to the wiki there are not 32 external GPIO pins available. Instead it is stated that: "The Wandboard has 10 external GPIOs, of which 8 are exported to the external pinheader". The number in Linux sysfs pin name within the table should correspond to Genode GPIO driver's pin number.
I'm not sure what you have measured by using those 32 pins. According to the wiki you should observe pins 4,6,8,10,12,14,16,18 of JP-4 only.
We never tried to handle the GPIO pins led through the board, but we needed the GPIO pins used internally, e.g., used for device interrupts like ethernet PHY. Therefore, I cannot claim that all 224 GPIO pins will work out of the box. One reason for non-working GPIO pins is an insufficient IOMUXC configuration, because that IOMUX controller is used to configure which SoC pin is used by which SoC internal IP core, e.g., whether the GPIO controllers can use the correct SoC pins. We configured the IOMUXC to support devices we support in Genode on IMX6, like USB, SD-Card, Ethernet. Anyway, even if the IOMUXC configuration would be insufficient, you should measure always the same result. I assume you are measuring the wrong pins, e.g., if you take something that has jitter on its line like UART.
Best regards Stefan
Does anyone have a suggestion of what step I am missing to get predictable results?
-- Edward Sandberg Adventium Labs 111 3rd Avenue S. Suite #100 Minneapolis, MN 55401 ed.sandberg@adventiumlabs.com
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users