Hi,

I'm trying to make the pwmsp driver work on my board. The driver is 
compiled as a module on the kernel 4.14 by default

https://github.com/beagleboard/linux/tree/4.14/sound/drivers/pwmsp

I managed to make the driver work when I remove cape universal from 
uEnv.txt (commenting the line #enable_uboot_cape_universal=1), the sound is 
very noisy even with an RC low pass filter, but somehow it works. The sound 
can be collected from pin P9.28, and it is recognized in ALSA as a sound 
card.

I have a LCD cape that I want to use, but when I connect my LCD to the 
board the pwmsp driver doesn't load anymore. My LCD cape uses the same pin 
P9.28 to control the brightness.

I tried to recompile the dtbo used in my LCD removing the brightness option 
leaving the pin completely free, but the pwmsp driver still not loading, 
even when I force u-boot to not load the dtbo of the lcd (with 
disable_uboot_overlay_addr0=1). I also tried to make my own dtbo file to 
load the pwmsp driver but it also doesn't work, and the system crashes when 
I try to play a sound.

My question is how I change the PWM pin used by *pwmsp* to use as audio 
output.

My lcd module uses this dts:

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-CAPE-DISP-CT4-00A0.dts

The dts that I tried to make to change the pwm port for pwmsp:

/dts-v1/;
/plugin/;

/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        /* identification */
        part-number = "BB-SND-PWM1";
        version = "00A0";

        /* state the resources this cape uses */
        exclusive-use =
                "P9.14",
                "P9.16";

        /*
         * Free up the pins used by the cape from the pinmux helpers.
         */
        fragment@0 {
                target = <&ocp>;
                __overlay__ {
                        P9_14_pinmux { status = "disabled"; };  /* (U14) 
gpmc_a2.ehrpwm1A */
                        P9_16_pinmux { status = "disabled"; };  /* (T14) 
gpmc_a3.ehrpwm1B */
                };
        };

        fragment@1 {
                target = <&am33xx_pinmux>;
                __overlay__ {
                        bb_pwm1_pin: pinmux-pwm1-pin {
                                pinctrl-single,pins = <
                                        0x48 0x06 /* (U14) gpmc_a2.ehrpwm1A 
*/
                                        0x4c 0x06 /* (B17) gpmc_a3.ehrpwm1B 
*/
                                >;
                        };
                };
        };

        fragment@2 {
                target = <&ocp>;
                __overlay__ {
                        bb_pwm1_test_helper: bb_snd-pwm1 {
                                compatible = "bone-pinmux-helper";
                                pinctrl-names = "default";
                                pinctrl-0 = <&bb_pwm1_pin>;
                                status = "okay";
                        };
                };
        };

        fragment@3 {
                target = <&epwmss1>;
                __overlay__ {
                        status = "okay";
                };
        };


        fragment@4 {
                target = <&ehrpwm1>;
                __overlay__ {
                        status = "okay";
                };
        };

        /*
         * Load ALSA driver for piezo
         */
        fragment@5 {
                target-path="/";
                __overlay__ {
                        sndpwm {
                                compatible = "snd-pwmsp";
                                pwms = <&ehrpwm1 1 0 0>;
                                status = "okay";
                        };
                };
        };
};

I couldn't find any documentation about this driver, and how to operate it.

I'm using the kernel:

Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 
armv7l GNU/Linux

Thanks a lot if someone can help me ;)

Best regards,




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e0dbc9f5-9637-4c67-89e2-13f032610c9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to