nRF52820 PWM Device Tree / API

I am new to Zephyr/nRF environemnt and using the nRF52833-DK to emulate nRF52820 which does not have any dedicated PWM hardware

From my understanding I am limited to the software PWM API from nRF Connect SDK (using v2.3.0) - nordic,nrf-sw-pwm
I am trying to work out the preprocessor macro API available to control the 'sw_pwm' node and its channels
So far I am able to build the following:
printf("DTS sw-pwm driver name: %s\n", (DEVICE_DT_GET(DT_NODELABEL(sw_pwm)))->name);

uint64_t cycles;
pwm_get_cycles_per_sec((DEVICE_DT_GET(DT_NODELABEL(sw_pwm))), 0, &cycles);
printf("pwm cycles per sec: %lld\n", cycles);

Giving:
DTS sw-pwm driver name: sw-pwm
pwm cycles per sec: 16000000       // not validated this value but seems consistent & code compiles so...
Does this API set/get duty/freq/period (whatever it uses)?
Is there any documentation or another project I can reference as I can only find code that uses pwm-leds. Ideally I am looking to bypass modules like pwm-leds and control the sw-pwm channels from application code


nrf52820.dtsi
    sw_pwm: sw-pwm {
        compatible = "nordic,nrf-sw-pwm";
        status = "disabled";
        generator = <&timer2>;
        clock-prescaler = <0>;
        #pwm-cells = <3>;
    };

app device tree (.dts)
&sw_pwm {
	status ="okay";
	channel-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>,
					<&gpio0 16 GPIO_ACTIVE_LOW>;
	clock-prescaler = <0>;
};
.config (\build Kconfig)
CONFIG_PWM=y
CONFIG_DT_HAS_NORDIC_NRF_SW_PWM_ENABLED=y
snippet from devicetree_generated.h (\build device tree source)
Related