Hey,
I have a custom carrier for the TX2 NX and I cannot for the life of me get the SD to show up in the file system. I believe that I have the pinmux configuration working correctly to enable the card detect but I have no idea what is wrong with the sdhci@3440000 section of the dts.
Originally I got the sd card to show up in mmcblk1 by setting gpio7 to output Drive 1 in the pinmux. gpio07 is connected to a load switch that turns the power to the card on. When booting with a card in the slot, it would show up in the filesystem. However, this also seemed to cause a intermittent kernel panic and boot loop half of the time.
To solve this problem I changed gpio08 to input pull up and added that pin to the cd-gpois in sdhci@3440000. Now what happens is that when I boot (or hot plug the card in) I get 3 instances of the error âmmc1: error -110 whilst initialising SD cardâ in the dmesg. I can see that the card detect pin is working in /sys/kernel/debug/gpio. But for the life of me I can tell whatâs wrong with my dts. I have tried almost 30 different configurations of dts based on these forum posts.
Hereâs relevant dmesg:
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 video=tegrafb earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x1772e0000 gpt rootfs.slot_suffix= tegra_fbmem=0x800000@0x96085000 lut_mem=0x2008@0x96081000 usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 no_console_suspend boot.slot_suffix= boot.ratchetvalues=0.2031647.1 vpr_resize bl_prof_dataptr=0x10000@0x175840000 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
[ 0.401634] iommu: Adding device 3460000.sdhci to group 0
[ 0.402061] iommu: Adding device 3440000.sdhci to group 1
[ 0.501206] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[ 0.964609] sd: No Scsi addr parsed to reserve index
[ 1.220741] PPP BSD Compression module registered
[ 1.450397] sdhci: Secure Digital Host Controller Interface driver
[ 1.450399] sdhci: Copyright(c) Pierre Ossman
[ 1.450401] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.451381] sdhci-tegra 3460000.sdhci: Client registration for eMC Successful
[ 1.453349] sdhci-tegra 3440000.sdhci: Got CD GPIO
[ 1.456142] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
[ 1.458986] sdhci-tegra 3440000.sdhci: wakeup init done, cdirq 286
[ 1.459096] sdhci-tegra 3440000.sdhci: Failed getting OCR mask: 0
[ 1.496215] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.508300] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.537904] mmc0: mmc_decode_ext_csd: CMDQ supported: depth: 31, cmdq_support: 1
[ 1.551842] mmc0: periodic cache flush enabled
[ 1.551848] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[ 1.552132] mmcblk0: mmc0:0001 DG4016 14.7 GiB
[ 1.556279] mmcblk0boot0: mmc0:0001 DG4016 partition 1 4.00 MiB
[ 1.561309] mmcblk0boot1: mmc0:0001 DG4016 partition 2 4.00 MiB
[ 1.562777] mmc1: error -110 whilst initialising SD card
[ 1.568268] mmcblk0rpmb: mmc0:0001 DG4016 partition 3 4.00 MiB
[ 1.575566] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33
[ 1.675442] mmc1: error -110 whilst initialising SD card
[ 1.788133] mmc1: error -110 whilst initialising SD card
[ 1.910822] mmc1: error -110 whilst initialising SD card
[ 11.361574] mmcblk mmc0:0001: Card claimed for testing.
[ 11.406802] Root device found: mmcblk0p1
[ 11.407876] Found dev node: /dev/mmcblk0p1
[ 11.449405] EXT4-fs (mmcblk0p1): 1 orphan inode deleted
[ 11.449409] EXT4-fs (mmcblk0p1): recovery complete
[ 11.452486] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 11.454336] Rootfs mounted over mmcblk0p1
[ 11.582603] cgroup: cgroup2: unknown option "nsdelegate"
[ 11.695580] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[ 11.869206] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[ 13.674065] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 42.065072] vddio-sdmmc1: disabling
Here is relevant dts:
sdhci@3440000 {
compatible = "nvidia,tegra186-sdhci";
reg = <0x0 0x3440000 0x0 0x210>;
interrupts = <0x0 0x40 0x4>;
max-clk-limit = <0xc28cb00>;
ddr-clk-limit = <0x2dc6c00>;
tap-delay = <0xb>;
trim-delay = <0x5>;
nvidia,ddr-tap-delay = <0xb>;
ddr-trim-delay = <0x5>;
bus-width = <0x4>;
ignore-pm-notify;
mmc-ocr-mask = <3>;
keep-power-in-suspend;
cap-mmc-highspeed;
cap-sd-highspeed;
pwrdet-support;
pinctrl-names = "sdmmc_e_33v_enable", "sdmmc_e_33v_disable";
pinctrl-0 = <0x14>;
pinctrl-1 = <0x15>;
compad-vref-3v3 = <0x1>;
compad-vref-1v8 = <0x2>;
nvidia,min-tap-delay = <0x54>;
nvidia,max-tap-delay = <0x88>;
pll_source = "pll_p";
resets = <0x10 0x23>;
reset-names = "sdhci";
clocks = <0x10 0x4c 0x10 0x10d 0x10 0x80>;
clock-names = "sdmmc", "pll_p", "sdmmc_legacy_tm";
iommus = <0x11 0x19>;
nvidia,en-periodic-calib;
status = "okay";
vqmmc-supply = <0x16>;
vmmc-supply = <0x25>;
cd-gpios = <0x21 0x9c 0x0>;
nvidia,vmmc-always-on;
nvidia,sd-device;
nvidia,cd-wakeup-capable;
disable-wp;
no-sdio;
no-mmc;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
linux,phandle = <0xc7>;
phandle = <0xc7>;
Here is /sys/kernel/debug/mmc1/ios:
clock: 0 Hz
vdd: 0 (invalid)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 0 (off)
bus width: 0 (1 bits)
timing spec: 0 (legacy)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
Full dts
sdhci_3440000_test24.dts (239.3 KB)
Full dmesg
dmesg_dump.txt (91.7 KB)
For the record I have tried many configurations with vmmc-supply pointing at the spmic sd3 regulator. Nothing happened in dmesg following a hot plug suggesting that it is not attempting to connect to the card. When I changed vmmc-supply to vdd-ac-bat I now get the âmmc1: error -110 whilst initialising SD cardâ four times when ever the card is plugged in.
Also, the OCR error in the dmesg goes away if mmc-ocr-mask is set to 3 and iommus is removed from the sdhci@3440000.
Can some one help please!??