Mailing List Archive

Additional informations about the clock drifting problem on the Arietta G25
Hi,

when dmesg is called right after logging into an Arietta G25,
which was freshly rebooted you will find either this line
lines:


[ 0.054687] Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)

or these lines:


[ 0.000000] Main crystal frequency not set, using approximate value
[ 0.000000] master clk is overclocked


If you experience heavy clock drifts AND you find the second group of
lines in dmesgs output...then the clocks are not defined properly in
the dts file for your Arietta.

Up to kernel 3.16.1, which is used by Acmesystem another clock setting
mechanism was valid and choosen while compiling the kernel. So the dts
file provided by Acmesystems for the Arietta dont need to define all
clock settings and works well with that kernel.

For kernels after that (dont know, when the switch happened exactly),
you need to define all clock settings in the dts file.

A posting in the google groups for the Arietta board by dpvgi shows
the correct settings.

The settings in the original dts file by Acmesystems for the clock
settings are:

clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;

main_clock: clock@0 {
compatible = "atmel,osc", "fixed-clock";
clock-frequency = <12000000>;
};
};

and should be replaced by

clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;

main_clock: clock@0 {
compatible = "atmel,osc", "fixed-clock";
clock-frequency = <12000000>;
};

slow_xtal {
clock-frequency = <32768>;
};

main_xtal {
clock-frequency = <12000000>;
};

};



for kernel newer than version 3.16.1

The file to patch is located here

<root of your kernel source tree>/arch/arm/boot/dts/acme-arietta.dts

in the kernel tree (linux 3.18.rc7 as mentioned in my previous post)

Dont rename that file, since otherwise the kernel compilation process
will not find and or create the correct dtb.

You dont need to recompile the whole kernel to create a new dtb file.

Just setup your cross compiling prefix. For that I choose (using zsh,
any other ksh like shell will do):

export CCC=<insert path to your toolchain here>/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-

and then (after changing the above lines) call

make ARCH=arm CROSS_COMPILE=${CCC} acme-arietta.dtb

. scp the resulting dtb file (same place as the according dts file) to
the /boot/. directory of your Arietta and reboot.

A dmesg should show the above Bogomips output and the clock
does not drift anymore (that much...RTCs of that kind are no
chronometers...)

HTH!

Best regards
Meino