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.

Linux/AM3358: DMTimer PWM

Part Number: AM3358


Tool/software: Linux

I am trying to make a PPS synchronized to CPTS with a Beaglebone Black running 4.14.49-ti-rt-r53

In order to make the PPS i set up a PWM with a 1 second period that will generate time stamps in the CPTS. I will use the time stamps to steer the PWM timer to synchronize it to the CPTS clock.

The method is based on ideas found here:

sourceforge.net/.../

processors.wiki.ti.com/.../Linux_Core_CPSW_User's_Guide

e2e.ti.com/.../2103534

The first step is to make a PWM using omap-dmtimer-pwm. I am using dtb-rebuilder to build the device tree.

I have modified am3356x-boneblack.dts:

/ { 
        model = "TI AM335x BeagleBone Black"; 
        compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

        pwm7: dmtimer-pwm@7 {
                compatible = "ti,omap-dmtimer-pwm";
                ti,timers = <&timer7>;
                #pwm-cells = <3>;
        };
};

I have also modified am33xx.dtsi:

 mac: ethernet@4a100000 {
	...
	cpts-ext-ts-inputs = <4>;

When using the modified device tree I expected to find an entry in /sys/class/pwm but there is nothing there.

When booting linux the following to messages regarding omap-dmtimer-pwm is shown:

[ 1.029071] omap-dmtimer-pwm dmtimer-pwm@7: dmtimer pdata structure NULL
[ 1.029110] omap-dmtimer-pwm: probe of dmtimer-pwm@7 failed with error -22

I have very little experience with embedded Linux, having started out only a few weeks ago. Misconceptions on my behalf might explain the problems i am having, but i believe i have followed the procedure explained in the links above. At the moment i do not have any ideas on how to proceed so I would be gratefull for any ideas.

All the best,
Mikkel Pihl