RK3288 笔记

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xzx208/article/details/82907450

RK3288 GPIO编号:

  1. PIN={

  2. 'A0': 0, 'A1': 1, 'A2': 2, 'A3': 3, 'A4': 4, 'A5': 5, 'A6': 6, 'A7': 7,

  3. 'B0': 8, 'B1': 9, 'B2':10, 'B3':11, 'B4':12, 'B5':13, 'B6':14, 'B7':15,

  4. 'C0':16, 'C1':17, 'C2':18, 'C3':19, 'C4':20, 'C5':21, 'C6':22, 'C7':23,

  5. 'D0':24, 'D1':25, 'D2':26, 'D3':27, 'D4':28, 'D5':29, 'D6':30, 'D7':31,

  6. }

num=bank*32+pin

比如GPIO7_C2: 7*32+18=242

锁定CPU主频:

  1. 1. 方式一: 可以在内核代码中,将其他频率屏蔽掉,比如RK3188的是修改 kernel/arch/arm/mach-rk3188/board-rk31-box.c

  2. static struct cpufreq_frequency_table dvfs_arm_table[] 频率表,将里面不需要的频率值屏蔽掉

  3. static struct cpufreq_frequency_table dvfs_arm_table[] = {

  4. // {.frequency = 312 * 1000, .index = 900 * 1000},

  5. // {.frequency = 504 * 1000, .index = 925 * 1000},

  6. // {.frequency = 816 * 1000, .index = 1000 * 1000},

  7.  
  8. {.frequency = 1008 * 1000, .index = 1075 * 1000},

  9. {.frequency = 1200 * 1000, .index = 1150 * 1000},

  10.  
  11. {.frequency = 1416 * 1000, .index = 1250 * 1000},

  12. {.frequency = 1512 * 1000, .index = 1250 * 1000},

  13.  
  14. // {.frequency = 1608 * 1000, .index = 1250 * 1000},

  15. {.frequency = CPUFREQ_TABLE_END},

  16. };

  17.  
  18.  
  19.  
  20. 2. 方式二: 如果是想直接固定跑在最高主频上,可以在内核配置中打开CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE:

  21. CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

  22. # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

  23. # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

  24. # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set

  25. # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

  26. # CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set

  27.  
  28. 3. 方式三: 如果想固定跑某一个主频(不是最高主频),比如1.4Ghz(1416000), 可以在系统开机初始化过程中,使用脚本进行主频固定:

  29. echo "userspace" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

  30. echo "1416000" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed (当然,这个主频

https://blog.csdn.net/lushengchu_luis/article/details/52876452

猜你喜欢

转载自blog.csdn.net/xzx208/article/details/82907450