Tool/software:
Hi,
I'm trying to use epwm1 in u-boot.
I've tried the following:
- Added this in my u-boot device tree:
&main_pmx0 { epwm1_pins_default: epwm1-pins-default { status = "okay"; pinctrl-single,pins = < AM62X_IOPAD(0x019c, PIN_OUTPUT, 6) >; }; }; &epwm1 { pinctrl-names = "default"; pinctrl-0 = <&epwm1_pins_default>; status = "okay"; }; &epwm_tbclk { status = "okay"; };
- Added CMD_PWM and other relevant PWM configs in defconfig
I then tried to use "pwm enable" in u-boot but I'm getting the following error:
ti_ehrpwm pwm@23010000: failed to get tbclk clock
pwm: '0' not found
Command 'pwm' failed: Error -19
In k3-am62-main.dtsi, I see that epwm_tbclk node uses this as the compatible string:
compatible = "ti,am62-epwm-tbclk", "syscon";
Since ti,am62-epwm-tbclk is not available, it actually uses the syscon driver from .../drivers/core/syscon-uclass.c
Could this be the reason why tbclk is not initialized properly, causing the earlier error when I try to use pwm?
If so, how do I ensure tbclk is properly configured and initialized in u-boot?
Regards,
Zi Bin