This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: DTS binding using pwm-beeper

Part Number: AM625

On my hardware i have a buzzer (beeper) connected on one of the pin (Ball no B21-Mode2)

I need to create binding on DTS to this buzzer and expectation is to have buzzer driven by PWM

beeper_amp: amplifier {
    compatible = "fixed-regulator";
    gpios = <&main_gpio1 44 GPIO_ACTIVE_HIGH>;
};
beeper {
     compatible = "pwm-beeper";
     pwms = <&epwm0>;
     amp-supply = <&beeper_amp>;
     beeper-hz = <1>; //in HZ
};

My question is on pwms =<&epwm0>

Documentation suggested to use pwm0 but that fails, for epwm0 i get error at compilation stating "/beeper:pwms: property size (4) too small for cell size 3"

I need to know how do I create this binding

Thanks

-maheshG

  • Hello Mahesh,

    Hmm, I have not seen this behavior before (but this is also the first beeper usecase I have looked at).

    1) which version of Linux SDK are you using?

    2) can you provide the full compilation error output?

    3) I assume you see the same error if you use an ecap instead of a PWM?

    Regards,

    Nick

  • 1) which version of Linux SDK are you using?

    Linux -5.10

    2) can you provide the full compilation error output?

    Find in image

    3) I assume you see the same error if you use an ecap instead of a PWM?

    Didnt try ecap yet

  • Hello Mahesh,

    The pwm-beeper bindings documentation seems to be out of date (at Documentation/bindings/devicetree/input/pwm-beeper.txt)

    Try searching for other device tree files that use pwm-beeper. It looks like they include 3-4 entries under the "pwms" variable instead of just pointing to the PWM node:
    cd grep -r 'pwm-beeper'

    None of these device tree files were written by TI, so I cannot vouch for a particular one.

    For more information about those additional entries, try looking at Documentation/devicetree/bindings/pwm/pwm.txt for more information about pwm-specifier. It looks like the epwm entries expect 3 entries (as per #pwm-cells = <3>; in arch/arm64/boot/dts/ti/k3-am62-main.dtsi)

    Regards,

    Nick