[U-Boot] SAMA5D3 external clock source on XIN and XIN32

Stuart Ralston stuart at sgraudio.com.au
Tue Jul 11 00:55:37 UTC 2017


Hi All,

I am hoping someone can help with a software issue, forgive me if I use the
wrong terms, I'm more of a hardware guy!

I have made a custom SAMA5D31 board that uses 12Mhz and 32Khz oscillators
instead of crystals. Both oscillators are fed into the XIN and XIN32 pins,
and the XOUT/XOUT32 pins are unconnected.

My understanding is that the processor initially boots from the internal RC
clock source and then the bootloader switches over to an external clock
source. But without a crystal connected, we need to set the configuration
registers into bypass mode to accept an external clock source.

I have managed to do this with the AT91 initial bootloader, and have this
booting. This was fairly trivial, as AT91 has a CONFIG option to put the
slow clock into bypass mode and I found the code which sets the CKGR_MOR
register and changed the following:

MOSCXTEN: 0
MOSCXTBY: 1
MOSCRCEN: 0
MOSCEL: 1

But, I cannot work out how to do the same for U-boot. I can't seem to find
any clock source CONFIG options for U-boot and I can't find the code which
sets the slow clock controller register SCKC_CR. I think I have found the
code which sets the CKGR_MOR, but I'm not 100% sure.

At the moment, I cannot get U-boot to boot at all.

I'm using the SAMA5D3 Xplained code base as a starting point and using
AT91Bootstrap 3.8.8 with U-boot 2017.03.

Any help much appreciated!!!

Cheers,

Stuart


More information about the U-Boot mailing list