Old thread but I moved into same problem while updating Rock 4C with Penta-SATA-HAT from legacy Debian 10 image to community maintained Debian 12 minimal image (Bookworm). I lost working OLED and fan did not work anymore.
On boot.log I found:
18:45:23+0100 rock4c systemd: Started rockpi-penta.service - Rockpi SATA Hat.
18:45:25+0100 rock4c python3: File "/usr/bin/rockpi-penta/fan.py", line 24, in __init__
18:45:25+0100 rock4c python3: File "/usr/bin/rockpi-penta/fan.py", line 98, in running
18:45:25+0100 rock4c python3: File "/usr/bin/rockpi-penta/fan.py", line 36, in period_us
18:45:25+0100 rock4c python3: File "/usr/bin/rockpi-penta/fan.py", line 32, in period
18:45:25+0100 rock4c python3: FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/pwm/pwmchip0/pwm0/period'
18:45:25+0100 rock4c python3: Waring: init pwm error
18:45:25+0100 rock4c systemd: rockpi-penta.service: Deactivated successfully.
Those py-lines are pointing to some files which seems to be missing. It turned out that directory /sys/class/pwm/pwmchip0/pwm0 is missing at all.
Based on thread information here and long search I found rock 4C pwm overlay rk3399-pwm1.dtbo at GitHub wich I copied as rockchip-rk3399-pwm1.dtbo to /boot/dtb/rockchip/overlay directory.
I updated /boot/armbianEnv.txt by editing line containing overlays= rk3399-i2c7 rk3399-pwm1-by-rockpi-penta to overlays= rk3399-i2c7 rk3399-pwm1.
I just rebooted machine and OLED as well as fan return back into working state. Missing directory pwm0 is back on it's place without any additional work. Now I'm able to continue OMV7 installation without further struggles.