如果想查看或者修改sdio的频率该如何操作呢
本回答来源全志R329如何查看和修改sdio的频率?
1)启动log查看:
sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc sdc1: no vqmmc,Check if there is regulator
sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
一开始是400kHZ,后面是50MHZ
2)系统节点操作:
root@TinaLinux:/sys/kernel/debug/xradio_host_dbg# ls
dbg_ap dbg_logfile dbg_sta hwinfo
dbg_bh dbg_pm dbg_tpa_node set_sdio_clk
dbg_common dbg_sbus dbg_txrx tx_burst_limit
dbg_etf dbg_scan dbg_wsm
set_sdio_clk默认是0表示即扫卡的频率
操作:echo 50000000 > set_sdio_clk
3)在dts或者sys_config.fex中修改:
3.1)sys_config.fex
402 [sdc1]
403 sdc1_used = 1
404 bus-width = 4
405 sdc1_clk = port:PG00<2><1><3><default>
406 sdc1_cmd = port:PG01<2><1><3><default>
407 sdc1_d0 = port:PG02<2><1><3><default>
408 sdc1_d1 = port:PG03<2><1><3><default>
409 sdc1_d2 = port:PG04<2><1><3><default>
410 sdc1_d3 = port:PG05<2><1><3><default>
411 cap-sdio-irq =
412 max-frequency = 25000000 //从150M改为25M的.wifi最大到50M.
3.2)board.dts
565 &sdc1 {
566 bus-width = <4>;
567 no-mmc;
568 no-sd;
569 cap-sd-highspeed;
570 /*sd-uhs-sdr12*/
571 /*sd-uhs-sdr25;*/
572 /*sd-uhs-sdr50;*/
573 /*sd-uhs-ddr50;*/
574 /*sd-uhs-sdr104;*/
575 /*sunxi-power-save-mode;*/
576 /*sunxi-dis-signal-vol-sw;*/
577 cap-sdio-irq;
578 keep-power-in-suspend;
579 ignore-pm-notify;
580 max-frequency = <150000000>; //调整这个最大频率参数
581 ctl-spec-caps = <0x8>;
582 status = "okay";
583 };