Verdin Am62 MMC2 Configuration Not working

Hi all,

We are trying to connect an SD card to the MMC2 Port on our system, we have enabled the sdhci2 on your device tree, but it seems it is not working , i mean when card is connected we are not able to detect in the linux. we are able to see mmc2 driver is loaded in the kernal boot logs, but whenever we connect the SD card, it is not detected.

below are the Device tree added in our system:

by default 3.3v is provided to the SD card. we are able to see 1.8V on the SD_CD when the card is not connected and when connected it goes LOW.

	sdhci2: mmc@fa20000 {
		compatible = "ti,am62-sdhci";
		reg = <0x00 0x0fa20000 0x00 0x1000>, <0x00 0x0fa28000 0x00 0x400>;
		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
		clock-names = "clk_ahb", "clk_xin";
		bus-width = <4>;
		ti,clkbuf-sel = <0x7>;
		ti,otap-del-sel-legacy = <0x8>;
		ti,otap-del-sel-sd-hs = <0x0>;
		ti,otap-del-sel-sdr12 = <0x0>;
		ti,otap-del-sel-sdr25 = <0x0>;
		ti,otap-del-sel-sdr50 = <0x8>;
		ti,otap-del-sel-sdr104 = <0x7>;
		ti,otap-del-sel-ddr50 = <0x8>;
		ti,itap-del-sel-legacy = <0xa>;
		ti,itap-del-sel-sd-hs = <0xa>;
		ti,itap-del-sel-sdr12 = <0xa>;
		ti,itap-del-sel-sdr25 = <0x1>;
		status = "disabled";
	};
	
	/* On-module Wi-Fi on WB SKUs, module-specific SDIO otherwise */
	pinctrl_sdhci2: main-mmc2-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2  */ /* WiFi_SDIO_DATA2 */
			AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3  */ /* WiFi_SDIO_DATA3 */
			AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
			AM62X_IOPAD(0x0124, PIN_INPUT_PULLUP, 7) /* (A23) MMC2_SDCD.GPIO0_71 */
		>;
	};

/*  MMC2 */
&sdhci2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sdhci2>;
	cd-gpios = <&main_gpio0 71 GPIO_ACTIVE_LOW>;
	disable-wp;
	ti,driver-strength-ohm = <50>;
	ti,fails-without-test-cd;
	status = "okay";
};

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It looks like you’ve done a good job setting up the device tree for the MMC2 port on your Verdin AM62 module. However, there are a few things you might want to check and try to resolve the issue:

  1. Check the Pin Configuration:
    Ensure that the pin configuration in the device tree matches the actual hardware connections. Double-check the pin numbers and their configurations.

  2. Voltage Levels:
    You mentioned that 3.3V is provided to the SD card and you see 1.8V on the SD_CD pin when the card is not detected, which goes LOW when connected. This seems correct, but ensure that the voltage levels are stable and within the expected range.

  3. Driver and Kernel Logs:
    Since the MMC2 driver is loaded, check the kernel logs (dmesg) for any error messages related to the MMC2 interface or SD card detection. This might give you more insight into what is going wrong.

  4. Device Tree Status:
    Ensure that the status property for sdhci2 is set to "okay" and not "disabled". From your provided device tree snippet, it looks correct, but double-check for any typos or inconsistencies.

  5. GPIO Configuration:
    Verify that the GPIO used for card detection (cd-gpios = <&main_gpio0 71 GPIO_ACTIVE_LOW>;) is correctly configured and functioning. You can test this GPIO separately to ensure it is working as expected.

  6. Clock Configuration:
    Ensure that the clocks are correctly configured and enabled. The clock-names and clocks properties should match the hardware specifications.

  7. Additional Properties:
    Sometimes additional properties might be required for proper operation. Refer to the TI AM62 documentation and the Toradex device tree reference for any additional properties that might be needed.

  8. Testing with Another SD Card:
    Try using a different SD card to rule out any issues with the card itself.

  9. Kernel Configuration:
    Ensure that the kernel is configured to support the MMC/SDHCI interface. Check the kernel configuration (.config) for the relevant options.

If after these checks the issue persists, you might want to reach out to Toradex support with detailed logs and your device tree configuration for further assistance.

Please, also check if these links can help you solve your problem:

SD Card detect line on custom carrier boards.

Any update on this issue?

Hi @naveenkumar.muthusam ,
Is it a custom board that you are using along with Verdin Am62?

Hi @sahil.tx ,

yes it is a custom board developed which is using the Verdin am62 SOM

Below are the schematics of the SD card MMC2 connector

is there anything missing in Device tree configuration shared above?

please let me know.

we are still facing issue in mmc2, SDCARD is not detetced on this port, but we have verfied that the SD CARD is working on the EVM in MMC1.

Hi @sahil.tx ,

Any update on this issue?

Hi @sahil.tx,

Any update on this issue?

Hi @sahil.tx ,

any update on this issue

Hi @sahil.tx ,

Any update on this issue?

Hi @naveenkumar.muthusam ,
We are looking into it

Hi @sahil.tx ,

Any updates on this issue?

Hi @sahil.tx,

Any updates on this issue?

Hi @naveenkumar.muthusam ,

Thanks for sharing schematic and modification but with provided information it is not clear where and which file you have made modification. So kindly share git diff so as we can see all changes.

Additionally please also share below information to help us understand your setup

  • BSP/OS version
  • dtb you are using.
  • dmesg logs

Finally please note we have not tested MMC2 as same is not populated on our development board. That said if you check device tree for k3-am62-verdin-nonwifi.dtsi « ti « dts « boot « arm64 « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules sdhci2 is already defined and is disabled. I suggest you to enable and test.
May be based on your requirement you need to tweak pad settings but that’s for another test.

Best Regards
Ritesh Kumar

Hi @ritesh.tx,
we have made changes in the k3-am62-verdin.dtsi. As MMC2 pin configurations were already provided in this file CMD,CLK,D0-D3, we have added only the CD for the MMC2.

The file k3-am62-verdin-nonwifi.dtsi file is completely commented and we are not including this file in the k3-am62-verdin-nonwifi-dev.dts.

we are able to use the UART5 but MMC2 we are facing issues in detection.

dmesg logs:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.80-6.7.0-devel+git.603f75dc931d (oe-user@oe-host) (aarch64-tdx-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Wed Aug 28 15:15:41 UTC 2024
[    0.000000] Machine model: Toradex Verdin AM62 on Verdin Development Board
[    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[    0.000000] printk: bootconsole [ns16550a0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
[    0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000bfffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009dafffff]
[    0.000000]   node   0: [mem 0x000000009db00000-0x000000009e6fffff]
[    0.000000]   node   0: [mem 0x000000009e700000-0x000000009e77ffff]
[    0.000000]   node   0: [mem 0x000000009e780000-0x000000009fffffff]
[    0.000000]   node   0: [mem 0x00000000a0000000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
[    0.000000] cma: Reserved 128 MiB at 0x00000000b6c00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 20 pages/cpu s41064 r8192 d32664 u81920
[    0.000000] pcpu-alloc: s41064 r8192 d32664 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: root=PARTUUID=230396cd-02 ro rootwait console=tty1 console=ttyS2,115200 consoleblank=0 earlycon=ns16550a,mmio32,0x02800000
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 840092K/1048576K available (11456K kernel code, 1396K rwdata, 3936K rodata, 2240K init, 425K bss, 77412K reserved, 131072K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 256 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
[    0.000000] ITS [mem 0x01820000-0x0182ffff]
[    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
[    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000080030000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080040000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[    0.000001] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[    0.008610] Console: colour dummy device 80x25
[    0.013623] printk: console [tty1] enabled
[    0.017867] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[    0.028562] pid_max: default: 32768 minimum: 301
[    0.033340] LSM: Security Framework initializing
[    0.038204] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.045791] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.055723] cblist_init_generic: Setting adjustable number of callback queues.
[    0.063204] cblist_init_generic: Setting shift to 1 and lim to 1.
[    0.069513] cblist_init_generic: Setting adjustable number of callback queues.
[    0.076920] cblist_init_generic: Setting shift to 1 and lim to 1.
[    0.083319] rcu: Hierarchical SRCU implementation.
[    0.088235] rcu: 	Max phase no-delay instances is 1000.
[    0.094312] Platform MSI: msi-controller@1820000 domain created
[    0.100927] EFI services will not be available.
[    0.105898] smp: Bringing up secondary CPUs ...
[    0.111254] Detected VIPT I-cache on CPU1
[    0.111384] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
[    0.111404] GICv3: CPU1: using allocated LPI pending table @0x0000000080050000
[    0.111470] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.111603] smp: Brought up 1 node, 2 CPUs
[    0.141053] SMP: Total of 2 processors activated.
[    0.145873] CPU features: detected: 32-bit EL0 Support
[    0.151156] CPU features: detected: CRC32 instructions
[    0.156479] CPU: All CPU(s) started at EL2
[    0.160672] alternatives: applying system-wide alternatives
[    0.168033] devtmpfs: initialized
[    0.180785] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.190838] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.203669] pinctrl core: initialized pinctrl subsystem
[    0.209867] DMI not present or invalid.
[    0.214523] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.221794] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.229148] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.237162] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.245369] audit: initializing netlink subsys (disabled)
[    0.251186] audit: type=2000 audit(0.160:1): state=initialized audit_enabled=0 res=1
[    0.251709] thermal_sys: Registered thermal governor 'step_wise'
[    0.259128] thermal_sys: Registered thermal governor 'power_allocator'
[    0.265489] cpuidle: using governor menu
[    0.276403] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.283414] ASID allocator initialised with 65536 entries
[    0.302536] KASLR disabled due to lack of seed
[    0.313859] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.320856] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.327276] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.334224] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.340639] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.347585] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.354000] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.360947] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.369042] k3-chipinfo 43000014.chipid: Family:AM62X rev:SR1.0 JTAGID[0x0bb7e02f] Detected
[    0.379079] iommu: Default domain type: Translated 
[    0.384102] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.390825] SCSI subsystem initialized
[    0.394863] libata version 3.00 loaded.
[    0.395064] usbcore: registered new interface driver usbfs
[    0.400721] usbcore: registered new interface driver hub
[    0.406187] usbcore: registered new device driver usb
[    0.411883] pps_core: LinuxPPS API ver. 1 registered
[    0.416971] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.426331] PTP clock support registered
[    0.430478] EDAC MC: Ver: 3.0.0
[    0.434762] FPGA manager framework
[    0.438344] Advanced Linux Sound Architecture Driver Initialized.
[    0.445664] clocksource: Switched to clocksource arch_sys_counter
[    0.452236] VFS: Disk quotas dquot_6.6.0
[    0.456309] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.469398] NET: Registered PF_INET protocol family
[    0.474676] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.483403] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.492054] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.500004] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.507996] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.515716] TCP: Hash tables configured (established 8192 bind 8192)
[    0.522420] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.529232] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.536651] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.543014] RPC: Registered named UNIX socket transport module.
[    0.549119] RPC: Registered udp transport module.
[    0.553935] RPC: Registered tcp transport module.
[    0.558751] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.565351] NET: Registered PF_XDP protocol family
[    0.571129] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.581345] Initialise system trusted keyrings
[    0.586223] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.597312] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.604053] NFS: Registering the id_resolver key type
[    0.609302] Key type id_resolver registered
[    0.613588] Key type id_legacy registered
[    0.617754] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.624620] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.666940] Key type asymmetric registered
[    0.671146] Asymmetric key parser 'x509' registered
[    0.676203] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.683988] io scheduler mq-deadline registered
[    0.688637] io scheduler kyber registered
[    0.696462] pinctrl-single 4084000.pinctrl: 34 pins, size 136
[    0.703191] pinctrl-single f4000.pinctrl: 171 pins, size 684
[    0.715614] Serial: 8250/16550 driver, 8 ports, IRQ sharing enabled
[    0.733080] brd: module loaded
[    0.741252] loop: module loaded
[    0.748554] tun: Universal TUN/TAP device driver, 1.6
[    0.754595] VFIO - User Level meta-driver version: 0.3
[    0.761403] usbcore: registered new interface driver uas
[    0.766940] usbcore: registered new interface driver usb-storage
[    0.773115] usbcore: registered new interface driver ums-sddr09
[    0.779200] usbcore: registered new interface driver ums-sddr55
[    0.785789] UDC core: g_mass_storage: couldn't find an available UDC
[    0.792746] i2c_dev: i2c /dev entries driver
[    0.799114] sdhci: Secure Digital Host Controller Interface driver
[    0.805497] sdhci: Copyright(c) Pierre Ossman
[    0.810185] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.816575] ledtrig-cpu: registered to indicate activity on CPUs
[    0.822921] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    0.829922] usbcore: registered new interface driver usbhid
[    0.835632] usbhid: USB HID core driver
[    0.840577] optee: probing for conduit method.
[    0.845191] optee: revision 3.20 (8e74d476)
[    0.845560] optee: dynamic shared memory is enabled
[    0.855124] optee: initialized driver
[    0.860931] Initializing XFRM netlink socket
[    0.865392] NET: Registered PF_PACKET protocol family
[    0.870676] Key type dns_resolver registered
[    0.875523] registered taskstats version 1
[    0.879763] Loading compiled-in X.509 certificates
[    0.894588] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
[    0.974699] i2c 0-0030: Fixed dependency cycle(s) with /bus@f0000/i2c@20000000/pmic@30/regulators/buck2
[    1.014139] input: tps65219-pwrbutton as /devices/platform/bus@f0000/20000000.i2c/i2c-0/0-0030/tps65219-pwrbutton.2.auto/input/input0
[    1.028423] rtc-ds1307 0-0032: oscillator failed, set time!
[    1.034350] rtc-ds1307 0-0032: registered as rtc0
[    1.039316] rtc-ds1307 0-0032: hctosys: unable to read the hardware clock
[    1.048275] at24 0-0050: supply vcc not found, using dummy regulator
[    1.055255] at24 0-0050: 256 byte 24c02 EEPROM, writable, 16 bytes/write
[    1.062194] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
[    1.094210] lm73 1-0049: sensor 'lm73'
[    1.098817] lm73 1-004a: sensor 'lm73'
[    1.102706] omap_i2c 20010000.i2c: bus 1 rev0.12 at 100 kHz
[    1.108698] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
[    1.117062] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
[    1.126328] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
[    1.137353] ti-udma 485c0100.dma-controller: Number of rings: 82
[    1.145690] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
[    1.156848] ti-udma 485c0000.dma-controller: Number of rings: 150
[    1.167181] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
[    1.177521] printk: console [ttyS2] disabled
[    1.182013] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 287, base_baud = 3000000) is a 8250
[    1.190915] printk: console [ttyS2] enabled
[    1.199382] printk: bootconsole [ns16550a0] disabled
[    1.210676] 2810000.serial: ttyS0 at MMIO 0x2810000 (irq = 288, base_baud = 3000000) is a 8250
[    1.220396] 2820000.serial: ttyS3 at MMIO 0x2820000 (irq = 289, base_baud = 3000000) is a 8250
[    1.230167] 2830000.serial: ttyS5 at MMIO 0x2830000 (irq = 290, base_baud = 3000000) is a 8250
[    1.239847] 2840000.serial: ttyS6 at MMIO 0x2840000 (irq = 291, base_baud = 3000000) is a 8250
[    1.249498] 2850000.serial: ttyS4 at MMIO 0x2850000 (irq = 292, base_baud = 3000000) is a 8250
[    1.259161] 2860000.serial: ttyS7 at MMIO 0x2860000 (irq = 293, base_baud = 3000000) is a 8250
[    1.271012] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
[    1.317665] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.326528] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
[    1.339447] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
[    1.346589] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
[    1.353332] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:0
[    1.363968] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
[    1.376273] Mass Storage Function, version: 2009/09/11
[    1.381551] LUN: removable file: (no medium)
[    1.385924] no file given for LUN0
[    1.389360] udc 31000000.usb: failed to start g_mass_storage: -22
[    1.395461] g_mass_storage: probe of gadget.0 failed with error -22
[    1.509107] mmc0: CQHCI version 5.10
[    1.511686] gpio-427 (CTRL_SLEEP_MOCI#): hogged as output/high
[    1.525917] debugfs: Directory 'spi0.0' with parent 'regmap' already present!
[    1.554132] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
[    1.569863] spi0.0: ttyMAX0 at I/O 0x0 (irq = 361, base_baud = 2764800) is a MAX3109
[    1.578289] spi0.0: ttyMAX1 at I/O 0x1 (irq = 361, base_baud = 2764800) is a MAX3109
[    1.587411] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
[    1.625701] mmc0: new HS200 MMC card at address 0001
[    1.631728] mmcblk0: mmc0:0001 Q2J55L 7.09 GiB 
[    1.636341] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.644420]  mmcblk0: p1 p2
[    1.648165] mmcblk0boot0: mmc0:0001 Q2J55L 16.0 MiB 
[    1.650106] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
[    1.654654] mmcblk0boot1: mmc0:0001 Q2J55L 16.0 MiB 
[    1.663188] sdhci-am654 fa20000.mmc: Got CD GPIO
[    1.667579] mmcblk0rpmb: mmc0:0001 Q2J55L 4.00 MiB, chardev (241:0)
[    1.672460] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
[    1.685346] mmc2: CQHCI version 5.10
[    1.687862] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[    1.707014] ALSA device list:
[    1.710057]   No soundcards found.
[    1.740698] mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit
[    1.754228] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.761668] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    2.405077] EXT4-fs (mmcblk0p2): recovery complete
[    2.414334] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
[    2.422981] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.430602] devtmpfs: mounted
[    2.435141] Freeing unused kernel memory: 2240K
[    2.439786] Run /sbin/init as init process
[    2.443895]   with arguments:
[    2.443902]     /sbin/init
[    2.443907]   with environment:
[    2.443911]     HOME=/
[    2.443916]     TERM=linux
[    2.592791] systemd[1]: System time before build time, advancing clock.
[    2.645137] systemd[1]: systemd 250.5+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
[    2.677251] systemd[1]: Detected architecture arm64.
[    2.743139] systemd[1]: Hostname set to <verdin-am62-15133535>.
[    3.101600] systemd[1]: Binding to IPv6 address not available since kernel does not support IPv6.
[    3.110583] systemd[1]: Binding to IPv6 address not available since kernel does not support IPv6.
[    3.201532] systemd[1]: Binding to IPv6 address not available since kernel does not support IPv6.
[    3.232905] systemd[1]: Queued start job for default target Graphical Interface.
[    3.285966] systemd[1]: Created slice Slice /system/getty.
[    3.312332] systemd[1]: Created slice Slice /system/modprobe.
[    3.336555] systemd[1]: Created slice Slice /system/serial-getty.
[    3.360189] systemd[1]: Created slice User and Session Slice.
[    3.382536] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    3.406337] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.430755] systemd[1]: Reached target Host and Network Name Lookups.
[    3.453913] systemd[1]: Reached target Path Units.
[    3.470076] systemd[1]: Reached target Remote File Systems.
[    3.489953] systemd[1]: Reached target Slice Units.
[    3.506079] systemd[1]: Reached target Swaps.
[    3.563134] systemd[1]: Listening on RPCbind Server Activation Socket.
[    3.590365] systemd[1]: Reached target RPC Port Mapper.
[    3.617050] systemd[1]: Listening on Syslog Socket.
[    3.639763] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    3.665638] systemd[1]: Listening on Journal Audit Socket.
[    3.692390] systemd[1]: Listening on Journal Socket (/dev/log).
[    3.716680] systemd[1]: Listening on Journal Socket.
[    3.737951] systemd[1]: Listening on Network Service Netlink Socket.
[    3.765065] systemd[1]: Listening on udev Control Socket.
[    3.788019] systemd[1]: Listening on udev Kernel Socket.
[    3.812303] systemd[1]: Listening on User Database Manager Socket.
[    3.866470] systemd[1]: Mounting Huge Pages File System...
[    3.896229] systemd[1]: Mounting POSIX Message Queue File System...
[    3.928298] systemd[1]: Mounting Kernel Debug File System...
[    3.946870] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
[    3.968751] systemd[1]: Mounting Temporary Directory /tmp...
[    4.014875] systemd[1]: Starting Create List of Static Device Nodes...
[    4.046582] systemd[1]: Starting Load Kernel Module configfs...
[    4.071206] systemd[1]: Starting Load Kernel Module drm...
[    4.104648] systemd[1]: Starting Load Kernel Module fuse...
[    4.119561] fuse: init (API version 7.37)
[    4.147061] systemd[1]: Starting RPC Bind...
[    4.179886] systemd[1]: Starting File System Check on Root Device...
[    4.229389] systemd[1]: Starting Journal Service...
[    4.256029] systemd[1]: Starting Load Kernel Modules...
[    4.276280] systemd[1]: Starting Generate network units from Kernel command line...
[    4.307919] systemd[1]: Starting Coldplug All udev Devices...
[    4.345164] systemd[1]: Started RPC Bind.
[    4.357301] g_serial gadget.0: Gadget Serial v2.4
[    4.362150] g_serial gadget.0: g_serial ready
[    4.363115] systemd[1]: Mounted Huge Pages File System.
[    4.399074] systemd[1]: Mounted POSIX Message Queue File System.
[    4.430831] systemd[1]: Mounted Kernel Debug File System.
[    4.463006] systemd[1]: Started Journal Service.
[    4.847712] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[    4.940586] systemd-journald[156]: Received client request to flush runtime journal.
[    5.112054] audit: type=1334 audit(1651167747.516:2): prog-id=5 op=LOAD
[    5.120158] audit: type=1334 audit(1651167747.524:3): prog-id=6 op=LOAD
[    6.183773] ina2xx 1-0040: power monitor ina260 (Rshunt = 0 uOhm)
[    6.191174] ina2xx 1-0041: power monitor ina260 (Rshunt = 0 uOhm)
[    6.202589] ina2xx 1-0042: power monitor ina260 (Rshunt = 0 uOhm)
[    6.210974] omap8250 2b300000.serial: No clock speed specified: using default: 48000000
[    6.212292] ina2xx 1-0043: power monitor ina260 (Rshunt = 0 uOhm)
[    6.229902] 2b300000.serial: ttyS1 at MMIO 0x2b300000 (irq = 482, base_baud = 3000000) is a 8250
[    6.232047] ina2xx 1-0044: power monitor ina260 (Rshunt = 0 uOhm)
[    6.250041] ina2xx 1-0045: power monitor ina260 (Rshunt = 0 uOhm)
[    6.268497] ina2xx 1-0046: power monitor ina260 (Rshunt = 0 uOhm)
[    6.285751] random: crng init done
[    6.292941] ina2xx 1-0047: power monitor ina260 (Rshunt = 0 uOhm)
[    6.320437] ina2xx 1-004b: power monitor ina260 (Rshunt = 0 uOhm)
[    6.390314] pwm-backlight backlight-mezzanine: supply power not found, using dummy regulator
[    6.605294] k3-m4-rproc 5000000.m4fss: device does not reserved memory regions, ret = -22
[    6.634230] k3-m4-rproc 5000000.m4fss: reserved memory init failed, ret = -22
[    6.647336] remoteproc remoteproc0: releasing 5000000.m4fss
[    6.661283] k3-m4-rproc: probe of 5000000.m4fss failed with error -22
[    6.772774] rtc-ti-k3 2b1f0000.rtc: registered as rtc1
[    6.848028] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
[    6.849537] pvrsrvkm: loading out-of-tree module taints kernel.
[    6.872658] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
[    6.896922] Console: switching to colour frame buffer device 240x67
[    6.938105] platform 78000000.r5f: configured R5F for IPC-only mode
[    6.943481] tidss 30200000.dss: [drm] fb0: tidssdrmfb frame buffer device
[    6.996080] platform 78000000.r5f: device does not have reserved memory regions, ret = -22
[    7.050432] k3_r5_rproc bus@f0000:bus@b00000:r5fss@78000000: reserved memory init failed, ret = -22
[    7.091013] remoteproc remoteproc0: releasing 78000000.r5f
[    7.097603] PVR_K:  186: Device: fd00000.gpu
[    7.102536] PVR_K:  186: Read BVNC 33.15.11.3 from HW device registers
[    7.132631] k3_r5_rproc bus@f0000:bus@b00000:r5fss@78000000: k3_r5_cluster_rproc_init failed, ret = -22
[    7.147386] PVR_K:  186: RGX Device registered with BVNC 33.15.11.3
[    7.189936] [drm] Initialized pvr 23.3.6512818 20170530 for fd00000.gpu on minor 1
[    7.208346] k3_r5_rproc: probe of bus@f0000:bus@b00000:r5fss@78000000 failed with error -22
[    9.210316] remoteproc remoteproc0: 30074000.pru is available
[    9.247258] remoteproc remoteproc1: 30078000.pru is available
[   10.101149] audit: type=1334 audit(1651194971.476:4): prog-id=7 op=LOAD
[   10.109430] audit: type=1334 audit(1651194971.484:5): prog-id=8 op=LOAD
[   10.595368] audit: type=1334 audit(1651194971.972:6): prog-id=9 op=LOAD
[   10.618243] audit: type=1334 audit(1651194971.992:7): prog-id=10 op=LOAD
[   10.794628] using random self ethernet address
[   10.807464] using random host ethernet address
[   11.247557] UDC core: g1: couldn't find an available UDC or it's busy
[   11.567366] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   11.612030] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   11.619895] cfg80211: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[   11.737986] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=357)
[   11.754573] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[   11.874322] audit: type=1334 audit(1651194973.252:8): prog-id=11 op=LOAD
[   11.890484] audit: type=1334 audit(1651194973.260:9): prog-id=12 op=LOAD
[   12.309242] audit: type=1334 audit(1651194973.684:10): prog-id=13 op=LOAD
[   12.330615] audit: type=1334 audit(1651194973.696:11): prog-id=14 op=LOAD
[   12.828935] audit: type=1006 audit(1651194974.204:12): pid=567 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
[   12.852378] audit: type=1300 audit(1651194974.204:12): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=fffff2db3fb0 a2=1 a3=0 items=0 ppid=1 pid=567 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null)
[   13.392780] systemd-journald[156]: Data hash table of /run/log/journal/e0ce9ad8216448fabc0c3c94d3b8442b/system.journal has a fill level at 75.1 (2732 of 3640 items, 2097152 file size, 767 bytes per hash table item), suggesting rotation.
[   13.418528] systemd-journald[156]: /run/log/journal/e0ce9ad8216448fabc0c3c94d3b8442b/system.journal: Journal header limits reached or header out-of-date, rotating.
[   13.870975] PVR_K:  561: RGX Firmware image 'rgx.fw.33.15.11.3' loaded
[   13.885513] PVR_K:  561: Shader binary image 'rgx.sh.33.15.11.3' loaded
[   42.510084] kauditd_printk_skb: 12 callbacks suppressed
[   42.510125] audit: type=1334 audit(1651195003.888:18): prog-id=12 op=UNLOAD
[   42.522774] audit: type=1334 audit(1651195003.888:19): prog-id=11 op=UNLOAD

BSP/OS Version:

Linux verdin-am62-15133535 6.1.80-6.7.0-devel+git.603f75dc931d #1 SMP PREEMPT Wed Aug 28 15:15:41 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

k3-am625-verdin-nonwifi-dev.dtb (67.6 KB)

Hi @ritesh.tx ,
any updates in this issue?

Hi @naveenkumar.muthusam,

Thanks for sharing logs, upon checking we found that some activity is being done for mmc2 and driver is being loaded.
Can you also test add “ti,fails-without-test-cd” to sdhci2 node and see with this you are able to detect card.

[    1.509107] mmc0: CQHCI version 5.10
[    1.554132] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
[    1.625701] mmc0: new HS200 MMC card at address 0001
[    1.631728] mmcblk0: mmc0:0001 Q2J55L 7.09 GiB 
[    1.644420]  mmcblk0: p1 p2
[    1.648165] mmcblk0boot0: mmc0:0001 Q2J55L 16.0 MiB 
[    1.654654] mmcblk0boot1: mmc0:0001 Q2J55L 16.0 MiB 
[    1.663188] sdhci-am654 fa20000.mmc: Got CD GPIO
[    1.667579] mmcblk0rpmb: mmc0:0001 Q2J55L 4.00 MiB, chardev (241:0)
[    1.685346] mmc2: CQHCI version 5.10
[    1.740698] mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit

Now please note that we don’t have custom hardware with us to test and for some reason you didn’t share complete changes. It is difficult to suggest anything remotely that why sd card is not detected.

I will suggest to please try with default device tree and bsp with simply enabling sdhci2 and see if this work.
You can also try to probe MMC and CD signals to further check for any activity.
Also please share complete schematic to verify pins and git diff output to understand all changes.

Best Regards
Ritesh Kumar