How do you enable the hardware PWM on the Banana pi M2 Zero? I’m running the “M2Z & P2Zero Ubuntu Server 16.04” image.
I have updated the script.bin with the following: [pwm0_para] pwm_used = 1 pwm_positive = port:PA06<3><0>
And then i have loaded the pwm-sunxi module with "modprobe pwm-sunxi"
But when i check the /sys/class/sunxi_pwm there is no pwm0 that i expect to see there.
root@bpi-iot-ros-ai:/sys/class/sunxi_pwm# ls -la
total 0
drwxr-xr-x 2 root root 0 Jul 16 07:07 .
drwxr-xr-x 53 root root 0 Jan 1 1970 ..
lrwxrwxrwx 1 root root 0 Jul 16 07:07 sunxi_pwm -> ../../devices/virtual/sunxi_pwm/sunxi_pwm
I have also looked in the Allwinner H2+ Datasheet. From what i can gather PWM0 is connected to PA5 but when i look at the schematics of the BPI-M2Z (https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view) it looks like PWM0 is connected to PA6. There is nothing in the datasheet about any PWMs connected to PA5. Whats going on here? Am i reading the datasheet wrong or is the hardware PWM incorrectly labeled on the schematics and GPIO Pinput definition (http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define) ?
I have also tried to change pwm_positive to “port:PA05<3><0>” but that did not help.