1 1
tkaiser

No cpufreq support in Cubietruck_Debian_3.9_wheezy_4.0.5?

Recommended Posts

Hi,

 

I just started to fiddle around with my Cubietruck (since I exchanged it with a Banana Pi for productive stuff). I had to realize that 

/sys/devices/system/cpu/cpu0/cpufreq/

is missing and that cpufreq-info outputs "no or unknown cpufreq driver is active on this CPU" correctly. Anyone else seeing this behaviour? Cpufreq support should be back with 4.0?

 

Based on a sysbench run ("sysbench --test=cpu --cpu-max-prime=5000 run --num-threads=2" -- takes 58 seconds) I would suppose it's running not even at 960 MHz (since 960 should finish in less than 54 seconds).

 

I did some iperf tests (not that promising, just 600/650 Mbits/sec) and iozone with my usual test SSD (writes below 40MB/s, reads max out at 130MB/s).

 

Am I'm right and the u-boot defaults [1] remain unpatched in this image? Does anyone have tested out other CONFIG_GMAC_TX_DELAY values?

 

Thx,

 

Thomas

 

 

[1] Cubietruck_defconfig:

CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
CONFIG_GMAC_TX_DELAY=1
CONFIG_VIDEO_VGA=y
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_MACH_SUN7I=y
CONFIG_DRAM_CLK=432
CONFIG_DRAM_ZQ=127
CONFIG_DRAM_EMR1=4

Share this post


Link to post
Share on other sites

I did an upgrade to 4.1 (using the tar archive Igor supplied a few days ago) but that didn't change anything (expect the funny temperature readouts):

 

root@cubietruck:~# uname -a
Linux cubietruck 4.1.0-bananapi #26 SMP Wed Jun 24 09:25:45 CEST 2015 armv7l GNU/Linux

root@cubietruck:~# zgrep CPUFREQ /proc/config.gz
CONFIG_CPUFREQ_DT=y 
# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set 
CONFIG_QORIQ_CPUFREQ=m 

root@cubietruck:~# zgrep CPU_THERMAL /proc/config.gz 
# CONFIG_CPU_THERMAL is not set

I still have no /sys/devices/system/cpu/cpu0/cpufreq/ dir. Maybe related to 'CPU_THERMAL'?

 

And installing to NAND also doesn't work  :( :

root@cubietruck:~# /root/nand-sata-install 
No targets avaliable!

Hmm... seems a lot of things to consider are waiting on the Cubietruck  :)

Share this post


Link to post
Share on other sites

The last build was done quickly so I made just boot test.

 

Since cpufrequency scaling is working on Banana with the same kernel the problem must be elsewhere. DTB?

 

Try boot with altered banana DTB.

 

 Am I'm right and the u-boot defaults [1] remain unpatched in this image? Does anyone have tested out other CONFIG_GMAC_TX_DELAY values?

 

Yes, it's possible that it's not needed.

 

And installing to NAND also doesn't work

 

I think it's already done but not stable yet.

Share this post


Link to post
Share on other sites

Since cpufrequency scaling is working on Banana with the same kernel the problem must be elsewhere. DTB?

 

Try boot with altered banana DTB.

 

Just made a diff between sun7i-a20-bananapi.dts and sun7i-a20-cubietruck.dts and found only one suspicious looking difference (since all the other stuff seems to be related to differing hardware and pin mappings):

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	status = "okay";

	axp209: pmic@34 {
		compatible = "x-powers,axp209";
		reg = <0x34>;
		interrupt-parent = <&nmi_intc>;
		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;

		interrupt-controller;
		#interrupt-cells = <1>;
	};
};

(only "compatible = "x-powers,axp209";" was missing in cubietruck's .dts but this should be unrelated to cpufreq stuff). I also searched the web but to no avail. I'll give up here for the moment and try to get Armbian into NAND using LiveSuite.

Share this post


Link to post
Share on other sites

Update: Still missing with Cubietruck_Debian_4.0_wheezy_4.1.1 -- I will try out replacing .dtb files later this weekend.

Share this post


Link to post
Share on other sites

I am having the same problem. Did you ever figure out how to get cpufreq to working on the Cubietruck?

 

Nope, didn't even tried it due to focus on other problems (strange network performance stuff I'm currently after).

Share this post


Link to post
Share on other sites

I am having the same problem. Did you ever figure out how to get cpufreq to working on the Cubietruck?

Seems to be related to CONFIG_REGULATOR_AXP20X -- compare with the thread mentioned above. In the cubietruck's device tree CPU voltage scaling is also enabled but Igor's kernel config reads 'CONFIG_REGULATOR_AXP20X not set' at the moment. So Igor pointed already in the right direction and I missed these obvious differences between both .dts completely :-\

 

You should try to build the kernel yourself using CONFIG_REGULATOR_AXP20X=y (or watch the aforementioned thread whether Leonardo provides informations what went wrong in his case -- the Debian kernel builds this stuff as a module and that seems to not load correctly -- so you might also be able to compile the module).

Share this post


Link to post
Share on other sites

Everything now works as expected:

root@cubietruck:~# uname -a
Linux cubietruck 4.1.2-cubietruck #16 SMP Fri Jul 24 18:43:14 CEST 2015 armv7l GNU/Linux

root@cubietruck:~# zgrep CONFIG_REGULATOR_AXP20X /proc/config.gz
CONFIG_REGULATOR_AXP20X=y

root@cubietruck:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
312000 528000 720000 864000 912000 960000 

I added a request for enhancement on Igor's github and provide the kernel dpkgs temporarely here: http://kaiser-edv.de/tmp/4.1.2-cubietruck-next.tar

Share this post


Link to post
Share on other sites

Thomas, thanks for assistance on this. :thumbup:

 

I am already building 4.1.3 with - I hope - all requests and changing u-boot to latest stable 2015.07 ... 

 

I'll do basic testings and double check to fix all known issues before releasing.

Share this post


Link to post
Share on other sites

Sure. In the mean time I am preparing deb repository so if everything went ok, next build will be apt-get update-able.

Share this post


Link to post
Share on other sites

Sure. In the mean time I am preparing deb repository so if everything went ok, next build will be apt-get update-able.

 

That sounds great. BTW: Testing with 4.2-rc3 I always ended up relinking /boot/zImage manually (no idea why).

 

BTW: The sunxi-mmc patch seems to work so I would propose an immediate inclusion: http://www.bananapi.com/index.php/forum/general-discussion-for-bpi-m2/995-working-wifi-on-modern-kernels-4-1-tested?start=30#3038

Share this post


Link to post
Share on other sites

That sounds great. BTW: Testing with 4.2-rc3 I always ended up relinking /boot/zImage manually (no idea why).

 

BTW: The sunxi-mmc patch seems to work so I would propose an immediate inclusion: http://www.bananapi.com/index.php/forum/general-discussion-for-bpi-m2/995-working-wifi-on-modern-kernels-4-1-tested?start=30#3038

 

No idea either :( . I'll take a look. I am fixing the whole build structure. BTW: apt-get update works now :rolleyes: . Need some more testing to make sure.

 

sunx-mmc patch caused an build error on 4.1.3 .. huh

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
1 1