请问tiny200 f1c200s 从spi nor启动,但是这个开发板没有卡检测引脚,我在tina3.5 linux里面应该如何检测卡插入
离线
文档那个不对, 我是看驱动代码才知道的:
lichee/linux-3.10/drivers/mmc/host/sunxi-mmc-debug.c
这个命令可以:
echo 1 > /sys/devices/soc/sdc0/sunxi_insert
root@TinaLinux:/# echo 1 > /sys/devices/soc/sdc0/sunxi_insert
[ 108.740863] sunxi-mmc sdc0: insert 1
[ 108.745043] sunxi-mmc sdc0: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
root@TinaLinux:/# [ 108.775505] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 108.806324] sunxi-mmc sdc0: smc 0 p0 err, cmd 52, RTO !!
[ 108.813173] sunxi-mmc sdc0: smc 0 p0 err, cmd 52, RTO !!
[ 108.820225] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 108.834552] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 108.848562] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[ 108.855276] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[ 108.863116] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[ 108.869892] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[ 108.877619] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing LEGACY(SDR12) dt B
[ 108.889457] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing LEGACY(SDR12) dt B
[ 108.903769] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing LEGACY(SDR12) dt B
[ 109.264265] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 109.281077] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing SD-HS(SDR25) dt B
[ 109.302220] sunxi-mmc sdc0: sdc set ios: clk 50000000Hz bm PP pm ON vdd 16 width 1 timing SD-HS(SDR25) dt B
[ 109.326678] sunxi-mmc sdc0: sdc set ios: clk 50000000Hz bm PP pm ON vdd 16 width 4 timing SD-HS(SDR25) dt B
[ 109.338611] mmc0: new high speed SD card at address 0002
[ 109.347693] mmcblk0: mmc0:0002 N/A 1.85 GiB
[ 109.374938] mmcblk0: p1
[ 109.387442] sunxi-wlan wlan: wlan_busnum (0)
[ 109.392219] sunxi-wlan wlan: wlan_power_num (0)
[ 109.397415] sunxi-wlan wlan: Missing wlan_io_regulator.
[ 109.403274] sunxi-wlan wlan: io_regulator_name ((null))
[ 109.444716] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[ 109.452725] ------------SUNXI_RF: Set regon for SUN3IW1P1_R6!----------------
[ 109.460744] sunxi-wlan wlan: wlan_regon gpio=-1048148608 mul-sel=-1047011948 pull=-1047011992 drv_level=-1072832404 data=-1072 834700
[ 109.474434] sunxi-wlan wlan: can't request wlan_regon gpio 2041
[ 109.554057] platform wlan: Driver sunxi-wlan requests probe deferral
[ 109.584832] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@TinaLinux:/# ls /dev/mmcblk0
mmcblk0 mmcblk0p1
echo 1 > /sys/devices/soc/sdc0/sunxi_insert
自动扫描
sys_config.fex 要改一下:
[sdc0]
sdc0_used = 1
-;sdc0_detmode = 4
+sdc0_detmode = 4
sdc0_buswidth = 4
sdc0_d1 = port:PF00<2><1><3><default>
sdc0_d0 = port:PF01<2><1><3><default>
@@ -673,7 +673,7 @@ sdc0_clk = port:PF02<2><1><3><default>
sdc0_cmd = port:PF03<2><1><3><default>
sdc0_d3 = port:PF04<2><1><3><default>
sdc0_d2 = port:PF05<2><1><3><default>
-sdc0_det = port:PA01<0><1><3><default>
+sdc0_det =
sdc0_use_wp = 0
sdc0_wp =
sdc0_isio = 0
最近编辑记录 歌以咏志 (2021-03-30 14:53:36)
离线