I do not understand how the device tree relates to the duty cycle - isn´t the pwm managed separately through commands such as
# echo 10000 > period
# echo 6000 > duty_cycle
# echo 1 > enable ?
I looked into the documentation you suggested and checked the Device Tree (DT). I do not understand how the pwmchip controls its properties.
For example, If I take the pwmchip4 which controls the pwm on GPIO 40-header pin 32 (/sys/devices/32f0000.pwm), in the DT it is defined as:
compatible = "nvidia,tegra194-pwm";
reg = <0x0 0x32f0000 0x0 0x10000>;
nvidia,hw-instance-id = <0x7>;
clocks = <0x4 0x70>;
clock-names = "pwm";
#pwm-cells = <0x2>;
resets = <0x5 0x4b>;
reset-names = "pwm";
status = "okay";
linux,phandle = <0xfd>;
phandle = <0xfd>;
Right now there is no pwm-regulator inside the DT.
- How do the pwmchips manage the pwm output without the regulator?
- Would creation of a pwm-regulator inside the DT solve this?