I’m trying to follow the overlay explanations on https://wiki.radxa.com/Zero/Debian and added meson-g12a-pwm-c-on-gpiox-8 and meson-g12a-pwmao-a-on-gpioao-11 to my overlays line:
Ok, to follow up. I managed to get PWM from PWM_C (pin18) by exporting 0 on pwmchip4. But I still can’t get any signal from PWMAO_A (pin40) on pwmchip0 or 2? Tried many combinations of export (0 and 1)?
update: It’s fixed. For those trying to find out what’s going on:
overlays need to be space separated, not comma!
Default there are two pwmchips in /sys/class/pwm, but with the overlays added, 2 new appear, resulting in 4 pwmchips in total.
pwmchip2/pwm0 is PWMAO_A on pin 40 (device ff807000)
pwmchip0 and pwmchip2 seems to refer to CPU (voltage) and WiFi.
After adding meson-g12a-bo-c-on-gpiox-8 to overlays in /boot/uEnv.txt I can see a new device /sys/class/pwm/pwmchip4. The device have the address of PWM_C.
If I configure it with