Jetson Xavier-NX TF-card

Hi

  1. 软件环境:jp5.0.2

  2. 硬件环境:
    a. xaiver nx TF card,无cd检测信号,不支持热拔插。
    b. TF卡供应是外部3.3V供电,拉死。

  3. 设备树添加如下:

sdmmc3: sdhci@3440000 {
320         mmc-ocr-mask = <0x0>;
321         //cd-inverted;
322         //cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
323         //nvidia,cd-wakeup-capable;
324         mmc-ocr-mask = <0>;
325         //cd-inverted;
326         non-removable;
327         vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
328         status = "okay";
329     };

   4. 日志如下

sudo dmesg |grep mmc1
[sudo] password for lee:
[ 19.632917] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit
[ 19.876705] mmc1: host does not support reading read-only switch, assuming write-enable
[ 20.018765] mmc1: new ultra high speed SDR104 SDXC card at address aaaa
[ 20.019307] mmcblk1: mmc1:aaaa SR128 119 GiB
[ 21.594240] mmc1: Data CRC error
[ 21.594358] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 21.594500] mmc1: sdhci: Sys addr: 0x00000008 | Version: 0x00000505
[ 21.594651] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000004
[ 21.594796] mmc1: sdhci: Argument: 0x09810900 | Trn mode: 0x0000003b
[ 21.594921] mmc1: sdhci: Present: 0x011b0000 | Host ctl: 0x0000001b
[ 21.595044] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 21.595168] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 21.595291] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 21.595414] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 21.595539] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 21.595667] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 21.595792] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 21.596126] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 21.596586] mmc1: sdhci: Resp[2]: 0x34cb8000 | Resp[3]: 0x00000240
[ 21.597154] mmc1: sdhci: Host ctl2: 0x0000008b
[ 21.601276] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[ 21.608551] mmc1: sdhci: ============================================
[ 21.617815] mmc1: Data CRC error
[ 21.618595] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 21.625072] mmc1: sdhci: Sys addr: 0x00000108 | Version: 0x00000505
[ 21.631287] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x0000009e
[ 21.637762] mmc1: sdhci: Argument: 0x0c000900 | Trn mode: 0x0000003b
[ 21.644236] mmc1: sdhci: Present: 0x01fb0000 | Host ctl: 0x0000001b
[ 21.650712] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 21.657444] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 21.663661] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 21.670224] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 21.676612] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 21.683087] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 21.689733] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 21.695950] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 21.702682] mmc1: sdhci: Resp[2]: 0x34cb8000 | Resp[3]: 0x00000240
[ 21.709154] mmc1: sdhci: Host ctl2: 0x0000008b
[ 21.713532] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff224
[ 21.720556] mmc1: sdhci: ============================================
[ 21.728100] mmc1: Data CRC error
[ 21.730595] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 21.736814] mmc1: sdhci: Sys addr: 0x00000108 | Version: 0x00000505
[ 21.743286] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x000000fa
[ 21.749761] mmc1: sdhci: Argument: 0x0c000900 | Trn mode: 0x0000003b
[ 21.756495] mmc1: sdhci: Present: 0x010b0000 | Host ctl: 0x0000001b
[ 21.762968] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 21.769445] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 21.775937] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 21.782484] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 21.788612] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 21.795346] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 21.801739] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 21.808211] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 21.814684] mmc1: sdhci: Resp[2]: 0x0fcb8000 | Resp[3]: 0x00000240
[ 21.821157] mmc1: sdhci: Host ctl2: 0x0000008b
[ 21.825536] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff218
[ 21.832553] mmc1: sdhci: ============================================
[ 21.966285] mmc1: Data CRC error
[ 21.966401] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 21.966542] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00000505
[ 21.966680] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 21.966819] mmc1: sdhci: Argument: 0x0c0009b3 | Trn mode: 0x00000013
[ 21.966952] mmc1: sdhci: Present: 0x01fb0000 | Host ctl: 0x0000001b
[ 21.967087] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 21.967217] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 21.967357] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 21.967493] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 21.967621] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 21.967757] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 21.967886] mmc1: sdhci: Cmd: 0x0000113a | Max curr: 0x00000000
[ 21.968183] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04801f91
[ 21.968636] mmc1: sdhci: Resp[2]: 0x19c68000 | Resp[3]: 0x00000240
[ 21.969203] mmc1: sdhci: Host ctl2: 0x0000000b
[ 21.973326] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[ 21.980863] mmc1: sdhci: ============================================
[ 22.004174] mmc1: Data CRC error
[ 22.004303] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 22.008327] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00000505
[ 22.014803] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 22.021279] mmc1: sdhci: Argument: 0x0c0009c3 | Trn mode: 0x00000013
[ 22.027755] mmc1: sdhci: Present: 0x01fb0000 | Host ctl: 0x0000001b
[ 22.034227] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 22.040704] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 22.047095] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 22.053828] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 22.060129] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 22.066516] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 22.073161] mmc1: sdhci: Cmd: 0x0000113a | Max curr: 0x00000000
[ 22.079635] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04801f91
[ 22.085855] mmc1: sdhci: Resp[2]: 0x19c68000 | Resp[3]: 0x00000240
[ 22.092582] mmc1: sdhci: Host ctl2: 0x0000000b
[ 22.096964] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[ 22.104240] mmc1: sdhci: ============================================

   5. 问题
  请问这个是什么问题?

請在這個forum搜尋sdmmc3有關連的topic.

您好!

  操作方法,我也是按某些论坛上说的去做的。

那請問你的always-on 加在哪?

always-on是必需要加的对吧?这个是针对sd电源部分的?像我这边无cd脚的是需要加?

您说的是设备树的这个部分吗?
nvidia,vqmmc-always-on;

對. nvidia,vmmc-always-on是針對電源的部份. 當然你的vmmc-supply那個regulator也要是always-on的設定.

cd-gpio是card detection用的 沒有要用hotplug的話就不需要.

nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi

sdmmc3: sdhci@3440000 {
320 mmc-ocr-mask = <0x0>;
321 //cd-inverted;
322 //cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
323 //nvidia,cd-wakeup-capable;
324 mmc-ocr-mask = <0>;
325 nvidia,vqmmc-always-on;
326 //cd-inverted;
327 non-removable;
328 vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
329 status = “okay”;
330 };

nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-fixed-regulator-p3668.dtsi

p3668_vdd_sdmmc3_sw: regulator@103 {
39 compatible = “regulator-fixed”;
40 reg = <103>;
41 regulator-name = “vdd-sdmmc3-sw”;
42 regulator-min-microvolt = <3300000>;
43 regulator-max-microvolt = <3300000>;
44 regulator-always-on;
45 //gpio = <&tegra_main_gpio TEGRA194_AON_GPIO(CC, 0) 0>;
46 //enable-active-high;
47 };

设备树这么设定,结果还是一样的
sudo dmesg |grep mmc
[sudo] password for lee:
[ 19.624991] mmc0: CQHCI version 5.10
[ 19.659350] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit
[ 19.731642] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit
[ 19.946338] mmc0: Command Queue Engine enabled
[ 19.952887] mmc0: periodic cache flush enabled
[ 19.952906] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[ 19.962940] mmcblk0: mmc0:0001 DG4016 14.7 GiB
[ 19.975198] mmcblk0rpmb: mmc0:0001 DG4016 partition 3 4.00 MiB, chardev (510:0)
[ 20.031839] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19
[ 20.038031] mmc1: host does not support reading read-only switch, assuming write-enable
[ 20.160707] Root device found: mmcblk0p1
[ 20.162985] Found dev node: /dev/mmcblk0p1
[ 20.247281] mmc1: new ultra high speed SDR104 SDXC card at address aaaa
[ 20.248142] mmcblk1: mmc1:aaaa SR128 119 GiB
[ 20.253221] mmcblk1: p1
[ 20.313605] EXT4-fs (mmcblk0p1): 1 orphan inode deleted
[ 20.313755] EXT4-fs (mmcblk0p1): recovery complete
[ 20.317418] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 20.322057] Rootfs mounted over mmcblk0p1
[ 21.262466] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[ 25.072160] mmc1: Data CRC error
[ 25.072280] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 25.072419] mmc1: sdhci: Sys addr: 0x00000080 | Version: 0x00000505
[ 25.072556] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000025
[ 25.072690] mmc1: sdhci: Argument: 0x00000820 | Trn mode: 0x0000003b
[ 25.072826] mmc1: sdhci: Present: 0x010b0000 | Host ctl: 0x0000001b
[ 25.072954] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 25.073083] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 25.073214] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 25.073341] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 25.073471] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 25.073599] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 25.073726] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 25.074067] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 25.074524] mmc1: sdhci: Resp[2]: 0x34cb8000 | Resp[3]: 0x00000240
[ 25.075086] mmc1: sdhci: Host ctl2: 0x0000008b
[ 25.079215] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff218
[ 25.086750] mmc1: sdhci: ============================================
[ 46.818392] mmc1: Data CRC error
[ 46.818510] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 46.818675] mmc1: sdhci: Sys addr: 0x00000050 | Version: 0x00000505
[ 46.818831] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x0000004d
[ 46.818979] mmc1: sdhci: Argument: 0x00000818 | Trn mode: 0x0000003b
[ 46.819124] mmc1: sdhci: Present: 0x010b0000 | Host ctl: 0x0000001b
[ 46.819269] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 46.819419] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 46.819567] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 46.819717] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 46.819863] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 46.820008] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 46.820154] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 46.820299] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 46.820719] mmc1: sdhci: Resp[2]: 0x34cb8000 | Resp[3]: 0x00000240
[ 46.821293] mmc1: sdhci: Host ctl2: 0x0000008b
[ 46.825680] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[ 46.832950] mmc1: sdhci: ============================================
[ 46.951558] EXT4-fs (mmcblk1p1): warning: mounting fs with errors, running e2fsck is recommended
[ 47.101414] EXT4-fs (mmcblk1p1): recovery complete
[ 47.101446] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[ 52.172217] mmc1: Applying tuning correction
[ 52.172237] mmc1: Tap value after applying correction 27
[ 52.183693] mmc1: Data CRC error
[ 52.183802] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 52.183963] mmc1: sdhci: Sys addr: 0x00000108 | Version: 0x00000505
[ 52.184121] mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x000000b9
[ 52.184271] mmc1: sdhci: Argument: 0x09800900 | Trn mode: 0x0000003b
[ 52.184419] mmc1: sdhci: Present: 0x010b0000 | Host ctl: 0x0000001b
[ 52.184569] mmc1: sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 52.184723] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 52.184873] mmc1: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 52.185038] mmc1: sdhci: Int enab: 0x03ff000b | Sig enab: 0x03fc000b
[ 52.185184] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 52.185331] mmc1: sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18002f70
[ 52.185501] mmc1: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 52.185652] mmc1: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x04800e92
[ 52.186002] mmc1: sdhci: Resp[2]: 0x34cb8000 | Resp[3]: 0x00000240
[ 52.186594] mmc1: sdhci: Host ctl2: 0x0000008b
[ 52.190974] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000007ffffff218
[ 52.198249] mmc1: sdhci: ============================================
[ 52.206590] mmc1: Data CRC error

nvidia,vqmmc-always-on 跟 nvidia,vmmc-always-on是兩個不同property.

sdmmc3: sdhci@3440000 {
320 mmc-ocr-mask = <0x0>;
321 //cd-inverted;
322 //cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
323 //nvidia,cd-wakeup-capable;
324 mmc-ocr-mask = <0>;
325 nvidia,vqmmc-always-on;
326 nvidia,vmmc-always-on;
327 //cd-inverted;
328 non-removable;
329 vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
330 status = “okay”;
331 };

加了后目测是一样的结果

please remove nvidia,vqmmc-always-on.

please also try to use jetpack4 to validate the hardware first.

确定是硬件问题了,谢谢

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.