On Tue, Aug 11, 2020 at 4:14 PM Brendan Dolan-Gavitt <[email protected]> wrote: > > Hi, > > I've been trying to get JTAG working on the Beaglebone classic. It works > using the 2012 Angstrom distribution [1], but not on the newer Debian-based > distributions. I eventually managed to track this down to the fact the kernel > sets the lowest two bits of the CM_WKUP_DEBUGSS_CLKCTRL [2] register (located > at 0x44e00414) to 0, which powers off the debug hardware on the AM335x. > > I was able to get JTAG working again by writing a small kernel module that > sets the register to the value it has when the board is reset (though I > *think* it would be sufficient to just set the last two bits to 0b10): > > void __iomem *io = ioremap(0x44e00000, SZ_4K); > iowrite32(0x52580002, io + 0x414); > iounmap(io); > > My question is: is there any way to stop the Linux kernel from disabling JTAG > automatically on startup? I know it happens sometime during the boot process > (if I stop during U-Boot, JTAG works and the CM_WKUP_DEBUGSS_CLKCTRL has its > default value), but I can't figure out what to change in the DTB or the > kernel source to prevent this.
Jtag is disabled by default, just un-comment: https://github.com/beagleboard/BeagleBoard-DeviceTrees/blob/v4.19.x-ti/src/arm/am335x-bone.dts#L9 you'll find your matching device-tree's under /opt/source/dtb* Regards, -- Robert Nelson https://rcn-ee.com/ -- 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/CAOCHtYiUqazo7ubPE_Wy5v2jbO96_s5GuKHZYgmuwFt2GsFTSw%40mail.gmail.com.
