Jump to content

OrangePI 2 cpufreq issue in mainline dev (4.10)


rufik

Recommended Posts

Mainline dev image as here: https://forum.armbian.com/index.php/topic/3574-orangepi-2-wifi-driver-issue-in-mainline-dev-410/

When I try to run armbianmonitor:

rufik@opi2:~$ sudo armbianmonitor -m
Stop monitoring using [ctrl]-[c]
Time        CPU    load %cpu %sys %usr %nice %io %irq   CPU/usr/bin/armbianmonitor: line 271: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: No such file or directory

12:57:09:     MHz  0.02   1%   0%   0%   0%   0%   0% 38.5°C^C

So it looks like cpufreq not working. Dmesg says:

rufik@opi2:~$ dmesg -T | grep -i cpu
[Wed Feb 15 21:40:37 2017] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
[Wed Feb 15 21:40:37 2017] CPU: div instructions available: patching division code
[Wed Feb 15 21:40:37 2017] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[Wed Feb 15 21:40:37 2017] percpu: Embedded 14 pages/cpu @ef6a8000 s26316 r8192 d22836 u57344
[Wed Feb 15 21:40:37 2017] pcpu-alloc: s26316 r8192 d22836 u57344 alloc=14*4096
[Wed Feb 15 21:40:37 2017] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[Wed Feb 15 21:40:37 2017] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[Wed Feb 15 21:40:37 2017] CPU: Testing write buffer coherency: ok
[Wed Feb 15 21:40:37 2017] CPU0: update cpu_capacity 1024
[Wed Feb 15 21:40:37 2017] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[Wed Feb 15 21:40:37 2017] smp: Bringing up secondary CPUs ...
[Wed Feb 15 21:40:37 2017] CPU1: update cpu_capacity 1024
[Wed Feb 15 21:40:37 2017] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[Wed Feb 15 21:40:37 2017] CPU2: update cpu_capacity 1024
[Wed Feb 15 21:40:37 2017] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[Wed Feb 15 21:40:37 2017] CPU3: update cpu_capacity 1024
[Wed Feb 15 21:40:37 2017] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[Wed Feb 15 21:40:37 2017] smp: Brought up 1 node, 4 CPUs
[Wed Feb 15 21:40:37 2017] CPU: All CPU(s) started in HYP mode.
[Wed Feb 15 21:40:37 2017] CPU: Virtualization extensions available.
[Wed Feb 15 21:40:37 2017] cpuidle: using governor ladder
[Wed Feb 15 21:40:37 2017] cpuidle: using governor menu
[Wed Feb 15 21:40:40 2017] ledtrig-cpu: registered to indicate activity on CPUs
[Wed Feb 15 21:40:44 2017] of: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[Wed Feb 15 21:40:44 2017] cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
[Wed Feb 15 21:40:44 2017] cpu cpu1: cpufreq_init: failed to get clk: -2
[Wed Feb 15 21:40:44 2017] cpu cpu2: cpufreq_init: failed to get clk: -2
[Wed Feb 15 21:40:44 2017] cpu cpu3: cpufreq_init: failed to get clk: -2

Where can I start digging for this issue? Anyone can point me, please?

 

Link to comment
Share on other sites

[Wed Feb 15 21:40:44 2017] of: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[Wed Feb 15 21:40:44 2017] cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)

Where can I start digging for this issue? Anyone can point me, please?

In the device tree. You need to add CPU regulator, operating points table and other DVFS and THS related entries with a patch to the DT.

Link to comment
Share on other sites

Finally I found some time to adopt DTS from OPI PC (seems pretty the same) and it seems to be working except wifi :)

Linux opi 4.11.0-sun8i #1 SMP Mon May 1 21:44:31 CEST 2017 armv7l armv7l armv7l GNU/Linux

rufik@opi:~$ sudo armbianmonitor -m
Time        CPU    load %cpu %sys %usr %nice %io %irq   CPU
13:27:00:  480MHz  0.14   3%   1%   2%   0%   0%   0% 38.3°C
13:27:05:  480MHz  0.21   3%   1%   2%   0%   0%   0% 38.2°C
13:27:10:  480MHz  0.18   3%   1%   2%   0%   0%   0% 38.3°C

Full info here: http://sprunge.us/eNVT

 

 

But some errors from dmesg:

[Tue May  2 06:29:24 2017] sunxi-mmc 1c10000.mmc: smc 1 err, cmd 8, RTO !!
[Tue May  2 06:29:24 2017] sun8i-h3-pinctrl 1c20800.pinctrl: unknown pin PH6
[Tue May  2 06:29:28 2017] thermal thermal_zone0: failed to read out thermal zone (-16)
[Tue May  2 06:29:30 2017] sun8i-emac 1c30000.ethernet: EMAC reset timeout

First and last seems to be onboard wifi related, right?

I wonder what is "failed to read thermal zone" about? Because I can read temperature with no problems and cpufreq works OK. Only no voltage readings in rpimonitor...

 

Link to comment
Share on other sites

14 minutes ago, rufik said:

[Tue May 2 06:29:24 2017] sunxi-mmc 1c10000.mmc: smc 1 err, cmd 8, RTO !!

Not an issue by itself, usually it's just an info/warning message related to interfacing with SDIO wireless modules

 

15 minutes ago, rufik said:

[Tue May 2 06:29:24 2017] sun8i-h3-pinctrl 1c20800.pinctrl: unknown pin PH6

There is no PH pin bank on H3, so something in the DT is wrong. Most likely USB VBUS regulator pins.

 

15 minutes ago, rufik said:

[Tue May 2 06:29:28 2017] thermal thermal_zone0: failed to read out thermal zone (-16)

Not an issue, usualy happens only on init

 

16 minutes ago, rufik said:

[Tue May  2 06:29:30 2017] sun8i-emac 1c30000.ethernet: EMAC reset timeout

 

Possibly Ethernet is not set up properly in the DT?

Link to comment
Share on other sites

2 minutes ago, zador.blood.stained said:

 

24 minutes ago, rufik said:


[Tue May  2 06:29:30 2017] sun8i-emac 1c30000.ethernet: EMAC reset timeout

 

Possibly Ethernet is not set up properly in the DT?

 

 

Hmmm, but ethernet is working fine:

rufik@opi:~$ sudo ethtool eth0
Settings for eth0:
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Current message level: 0x00000000 (0)
        Link detected: yes

rufik@opi:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 02:81:90:9e:18:31
          inet addr:xxx.xxx.xxx.46  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11194 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6882 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5040665 (5.0 MB)  TX bytes:2730668 (2.7 MB)

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines