HI,
I'm trying to figure out how to use one of the TIMER pins to provide a
clocking signal to an external device and I'm having some trouble. The
default 24khz will do just fine for now, but eventually I may want to be
able to change the frequency in the future.
I'm using an image build from the Yocto Dora repo, with the meta-ti layer
providing the kernel (3.12). I've successfully customized the devicetree
for some other devices I'm using, and feel decent about (if not totally
comfortable with) my devicetree-fu.
I've added the following bits to the am335x-boneblack.dts to try and enable
TIMER4:
In the "am33xx_pinmux" section:
timer4_pins: pinmux_timer4_pins {
pinctrl-single,pins = <
0x90 0x12 /* gpmc_advn_ale as TIMER4, OUTPUT_PULLUP | MODE2 */
>;
};
And below (not certain this is necessary or right, it was quite frankly, a
shot in the dark):
&timer4_fck {
pinctrl-names = "default";
pinctrl-0 = <&timer4_pins>;
status = "okay";
};
I (sadly) don't have a scope to put on the pin to verify that it's not
working, but when I look at the output from
/sys/kernel/debug/clk/clk_summary I see the following (Note: I've trimmed
unneccasry bits from after we hit TIMER4 in the tree):
root@beaglebone:/sys/kernel/debug/clk# more clk_summary
clock enable_cnt prepare_cnt rate
---------------------------------------------------------------------
tclkin_ck 0 0 12000000
virt_26000000_ck 0 0 26000000
virt_25000000_ck 0 0 25000000
virt_24000000_ck 1 1 24000000
sys_clkin_ck 9 23 24000000
dpll_mpu_ck 1 1 300000000
dpll_mpu_m2_ck 4 4 300000000
timer6_fck 0 1 24000000
timer3_fck 0 1 24000000
dbg_sysclk_ck 0 1 24000000
timer7_fck 0 1 24000000
timer5_fck 0 1 24000000
timer4_fck 0 1 24000000
timer2_fck 1 1 24000000
timer1_fck 1 1 24000000
So, it seems that timer4_fck is extant and prepared, but not enabled. I
have had no luck in figuring out how to enable it and I'm hoping somebody
here can help. I've made an attempt at understanding this in the AM335x
TRM, but I'm not an EE and got a bit lost. I'm also not seeing the part to
be clocked initializing properly, and I'm guessing it's the lack of clock
output.
Any help or pointers are appreciated. I've spent a good bit of time digging
around and have found some references to using the DMTIMER pins for input,
but I haven't been able to find a good example of just using one to clock
an external device.
--
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].
For more options, visit https://groups.google.com/d/optout.