Enabling TIMER4 output


I’m trying to get things set up to use TIMER4 (or 5, 6, or 7) to provide an external clock source to another component and I’m having some trouble. For now I’m happy with just getting the standard 24khz clock, though I may want to be able to modify the frequency in the future.

I’m using the Yocto Project (Dora) to build my images and the straight TI kernels from the meta-ti layer (linux-ti-staging_3.12) with a static devicetree. I’ve customized my devicetree enough that I’m somewhat comfortable with devicetree configs, but I know I’m a long way from having real devicetree-fu. That said, I’ve added the following in an attempt to get TIMER4 to come up:

In the am33xx_pinmux section:

timer4_pins: pinmux_timer4_pins {
pinctrl-single,pins = <
0x90 0x12 /* gpmc_advn_ale as TIMER4, OUTPUT_PULLUP | MODE2 */


And further down (note: I’m not certain this is necessary or correct, but it was a shot in the dark):

&timer4_fck {
pinctrl-names = “default”;
pinctrl-0 = <&timer4_pins>;
status = “okay”;

I sadly don’t have a scope to verify clock on the TIMER4 pin, but my guess is that something’s not qorking right from the following reported in /sys/kernel/debug/clk/clk_summary (note: I clipped bit after the relevant part):

root@beaglebone:/sys/kernel/debug/clk# more clk_summary
clock enable_cnt prepare_cnt rate