Hello everyone!

I've got a ZYBO devboard, and I've loaded an SD card with MainLine Linux 4.9.51 kernel with Xenomai patch, uBoot(with SPL), an FPGA bit file which contains some AXI Slave GPIOs, and a custom PWM driver with AXI Slave interface. I've modified the generated device tree to use the GPIOs and the PWM module with the generic uio driver. On a second partition I have Ubuntu 16.04 file system with python jupyter notebook installed.

I tried to control the GPIOs (both inputs and outputs) with /dev/mem in C, which worked as intended. Next I wrote a python script with mmap and uio usage and the GPIOs worked flawlessly. When I tried to do the same with the PWM module, I don't know how to manage 4 32bit registers. mmap only lets me write 8bit values, but the pwm module has 4 registers: 0 - duty cycle, 1 - min threshold, 2 - max threshold, 3 - enable output, each being a 32 bit register.

I attach my device tree, gpio python script which worked, and the PWM script which doesn't work.

Any ideas what should I do differently? should I decompose the 32b registers into 4 x 8b ones?
Any advice would be really appreciated!

Thanks in advance,
Áron.