Accessing PWM on CM3i

I have a CM3i with a CM3i IO board, I flashed Debian on it.
I need to test PWM on a pin. Pl_nLED_Activity (GPIO4 C6, gpiochip4 line 22) isn’t connected to the power button, I can use it as simple IO pin with gpioset. According to the wiki, I need to use python and enable the overlay.

With rsetup I’m supposed to use the overlay “rk3568-pwm13-m1.dts”. I loaded this as an external file. The status in gpioinfo doesn’t change. Running a python script, this errors with:

File “/usr/lib/python3/dist-packages/periphery/pwm.py”, line 60, in _open raise LookupError(“Opening PWM: PWM chip {} not found.”.format(chip))
LookupError: Opening PWM: PWM chip 4 not found.

Looking in the pwm.py script, it tries to access /sys/class/pwm/pwmchip/pwmchip4, but the address doesn’t exist. That folder only has pwmchip8 and pwmchip13 as subdirectories. Am I trying to access PWM the wrong way, or doing something unsupported?

cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins | grep -i pwm
pin 105 (gpio3-9): fe6f0000.pwm (GPIO UNCLAIMED) function pwm8 group pwm8m0-pins

the pinmux file says the PWM to the fan header is claimed, while rsetup was NOT configured for it.

I’ve installed libmraa:

mraa-gpio list
No Pins

what works for the power button LED (PWM13_M1, pin 21, GPIO Pl_nLED_Activity, GPIO4_C6_d, gpiochip4 line 22 , overlay rk3568-pwm13-m1.dts)

enable the kernel overlay with rsetup
you can see the used kernel overlays in in /boot/extlinux/extlinux.conf

cd /sys/class/pwm/pwmchip13
echo 0 > export
cd pwm0
echo 1000 > period
echo 600 > duty_cycle
echo 1 > enable

to disable PWM:
echo 0 > unexport

only one PWM can be used at the same time I think.
I haven’t figured out access to the fan PWM header yet. this is overlay rk3568-pwm8-m0.dts.
I tried “rmmod pwm_fan” to unclaim the pin but that doesn’t work.