Part Number: AM3354
Other Parts Discussed in Thread: AM4372
Tool/software: Linux
Hello,
I'm running the 4.9.59 kernel on a custom AM3354 board.
I'm trying to change the clock source for my dmtimer-pwm output. By default it is using the 32768 Hz clock and the shortest period I can set on that is 45752 ns. I want to use the high-frequency system clock instead so I can get at least a 100 kHz PWM signal.
According to this documentation, I can change the clock source in the device tree:
elixir.bootlin.com/.../pwm-omap-dmtimer.txt
My device tree entry looks like this:
&am33xx_pinmux {
pwm6_pins: pinmux_pwm6_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (C15) xdma_event_intr0.timer4 */
>;
};
};
&timer4 {
status = "okay";
ti,timer-pwm;
};
/ {
pwm6: dmtimer-pwm@4 {
compatible = "ti,omap-dmtimer-pwm";
ti,timers = <&timer4>;
#pwm-cells = <3>;
pinctrl-names = "default";
pinctrl-0 = <&pwm6_pins>;
ti,clock-source = <0x0>;
};
};
But when I try to set a 10000 ns period, I get this error:
omap-dmtimer-pwm dmtimer-pwm@7: period 10000 ns too short for clock rate 32786 Hz
So it doesn't appear to actually change the clock source. When I run dtc -I fs /proc/device-tree, the nodes look like this:
dmtimer-pwm@4 {
compatible = "ti,omap-dmtimer-pwm";
ti,timers = <0x4c>;
pinctrl-0 = <0x4d>;
#pwm-cells = <0x3>;
pinctrl-names = "default";
};
timer@48044000 {
compatible = "ti,am335x-timer";
ti,timer-pwm;
ti,hwmods = "timer4";
status = "okay";
interrupts = <0x5c>;
phandle = <0x4c>;
reg = <0x48044000 0x400>;
linux,phandle = <0x4c>;
};
The ti,clock-source is missing from the dmtimer-pwm.
Is it possible to use the high frequency clock with a DMTimer PWM?
