[BPI-R3] Best way to customize BPI-R3 device tree for custom pwm-fan

Hi there, I’m new to OpenWRT for BPI-R3 with the desire to correct configuration of the PWM fan I purchased for it (https://www.aliexpress.com/item/1005006397891164.html). I made all the necessary measurements by forcing fan on with /sys/class/thermal/cooling_device0/cur_state and playing with fan speed using /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1. I’d like now configure my FW to have PWM values for each of the thresholds updated (i.e. customise /sys/firmware/devicetree/base/pwm-fan/cooling-levels). Looking at the source code I see device tree however I can’t find a way override the cooling-levels value to the one I need without compiling the image myself. Does anyone knows how to introduce such change at runtime ?

Write a user-space script that will change pwm1 manually.

Thanks josh9. That is exactly what I’d like to avoid give pwm-fan framework provides all necessary means to control the FAN. What I’m looking for is the way BPI-R3 target enables modifying the PWM values for each temperature range.