Part Number: AM625
Hi
We are working oncustom board based am62xx-sk and buzzer connected on one of the pin (Ball no B21-Mode2).
We Need to control the buzzer output using PWM. i.e similar to controlling lcd backlight.
There is a dts binding available for same in am437x based custom board, which modified to support in am62xx custom board.
main_pwm2: dmtimer-main-pwm-2 {
compatible = "ti,omap-dmtimer-pwm";
pinctrl-names = "default";
pinctrl-0 = <&main_ecap1_capture_pins_default>;
ti,timers = <&main_timer2>;
#pwm-cells = <3>;
};
beeper: beeper {
compatible = "pwm-backlight";
/*compatible = "pwm-beeper";*/
/* 5000 here is the total T represented in micro-seconds */
pwms = <&main_pwm2 0 500000000 0>;
/* 0 to 255 represent the duty cycle, 255 being the max and 127.5 would be a perfect 50% duty cycle */
brightness-levels = <0 50 75 100 125 150 175 200 225 255>;
default-brightness-level = <4>;
post-pwm-on-delay-ms = <500>;
pwm-off-delay-ms = <100>;
status = "okay";
};
main_ecap1_capture_pins_default: main-ecap1-capture-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x022C, PIN_OUTPUT, 2) /* (B21) MMC1_DAT1 /ECAP1_IN_APWM_OUT/TIMER_IO2 */
>;
};
There is no change in buzzer output when change the brightness value for /sys/class/backlight/beeper.
I need support in debugging this issue and inputs.
I also tried using ecap_pwm dts node on the same pin.
&ecap1_pwm {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_ecap1_capture_pins_default>;
};
main_ecap1_capture_pins_default: main-ecap1-capture-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x022C, PIN_OUTPUT, 4) /* (B21) MMC1_DAT1 /ECAP1_IN_APWM_OUT/TIMER_IO2 */
>;
};
I am able to configure the duty cycle, Here i am getting square wave changing as per duty cycle. But there is no change in buzzer output.
https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_03_00_19/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/PWM.htm