I am missing something I create pwm-gpio12.dtbo in /boot/overlays and added dtoverlay=pwm-gpio12 to /boot/config.txt from. This on Pi5 running 6.1.0-rpi6-rpi-2712.This needs to go into your overlay.Code:
compatible = "brcm,bcm2835"; /* PWM0 function */ fragment@0 { target = <&gpio>; __overlay__ { pwm_pins: pwm_pins { brcm,pins = <12>; brcm,function = <4>; brcm,pull = <0>; }; }; }; fragment@1 { target = <&pwm>; frag1: __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; assigned-clock-rates = <100000000>; status = "okay"; }; };
As PWM on GPIO12 is PWM0_0 below is still valid
Code:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2835"; /* PWM0 function */ fragment@0 { target = <&gpio>; __overlay__ { pwm_pins: pwm_pins { brcm,pins = <12>; brcm,function = <4>; brcm,pull = <0>; }; }; }; fragment@1 { target = <&pwm>; frag1: __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; assigned-clock-rates = <100000000>; status = "okay"; }; };};neither my driver/program or the sysfs interface seem to work on gpio12. Let me know if you see what I a doing wrong.
Thanks
Statistics: Posted by wkeeling — Sun Mar 03, 2024 7:41 pm