Errors in dmesg when trying to bring up WiFi using SDIO

I tried a few more things after the above attempt.

sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;

Added the above speeds.

/delete-property/ cap-sd-highspeed;
/delete-property/ cap-mmc-highspeed;

Deleted the above properties.

max-clk-limit = <50000000>;
uhs-mask = <0x7C>;

Tried this to restrict interface to a lower speed.

Finally decided to try out the card at 3.3v. For this I set the jumpers on the m.2 to uSD Adapter that holds the WiFi/BLE card to use 3.3v for IO and also set it to expect the Host to have 3.3v. Accordingly I changed the vmmc-supply to a dummy regulator that has 3.3v. And set vqmmc-supply = <&max77620_ldo6>; which is a 1.8v to 3.3v LDO defined in the power tree. Also, removed the only-1-8-v; property and set uhs-mask = <0x7E>;

With this setup I got the following in dmesg

mmc1: error -110 whilst initialising SDIO card

Lastly I tried the following:

sdhci@700b0400 {
		compatible = "nvidia,tegra210-sdhci";
		reg = <0x00 0x700b0400 0x00 0x200>;
		interrupts = <0x00 0x13 0x04>;
		aux-device-name = "sdhci-tegra.2";
		nvidia,runtime-pm-type = <0x00>;
		clocks = <0x21 0x45 0x21 0xf3 0x21 0x136 0x21 0xc1>;
		clock-names = "sdmmc\0pll_p\0pll_c4_out2\0sdmmc_legacy_tm";
		resets = <0x21 0x45>;
		reset-names = "sdhci";
		status = "okay";
		tap-delay = <0x04>;
		trim-delay = <0x08>;
		mmc-ocr-mask = <0x00>;
		max-clk-limit = <0xc65d400>;
		ddr-clk-limit = <0x2faf080>;
		bus-width = <0x04>;
		calib-3v3-offsets = <0x7d>;
		calib-1v8-offsets = <0x7b7b>;
		compad-vref-3v3 = <0x07>;
		compad-vref-1v8 = <0x07>;
		pll_source = "pll_p\0pll_c4_out2";
		keep-power-in-suspend;
		ignore-pm-notify;
		non-removable;
		cap-mmc-highspeed;
		cap-sd-highspeed;
		nvidia,en-io-trim-volt;
		nvidia,min-tap-delay = <0x6a>;
		nvidia,max-tap-delay = <0xb9>;
		pinctrl-names = "sdmmc_schmitt_enable\0sdmmc_schmitt_disable\0sdmmc_clk_schmitt_enable\0sdmmc_clk_schmitt_disable\0sdmmc_drv_code\0sdmmc_default_drv_code\0sdmmc_e_33v_enable\0sdmmc_e_33v_disable";
		pinctrl-0 = <0x88>;
		pinctrl-1 = <0x89>;
		pinctrl-2 = <0x8a>;
		pinctrl-3 = <0x8b>;
		pinctrl-4 = <0x8c>;
		pinctrl-5 = <0x8d>;
		pinctrl-6 = <0x8e>;
		pinctrl-7 = <0x8f>;
		vqmmc-supply = <0x58>;
		vmmc-supply = <0x90>;
		uhs-mask = <0xff>;
		id = <0x00>;
		nvidia,is-sdio;
		fixed-clock-freq = <0x1851960 0x1851960 0x16e3600 0x2cd29c0 0x16e3600 0x2cd29c0 0x59a5380 0xc28cb00 0x00 0x00 0x00>;
		nvidia,vqmmc-always-on;
		nvidia,vmmc-always-on;
		force-non-removable-rescan;
		no-sd;
		no-mmc;
		built-in;
		default-drive-type = <0x01>;
		nvidia,is-ddr-tap-delay;
		nvidia,ddr-tap-delay = <0x00>;
		power-off-rail;
		linux,phandle = <0xb9>;
		phandle = <0xb9>;

		prod-settings {
			#prod-cells = <0x03>;

			prod_c_ds {
				prod = <0x100 0xff0000 0x10000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x3000007d>;
			};

			prod_c_hs {
				prod = <0x100 0xff0000 0x10000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x3000007d>;
			};

			prod_c_sdr12 {
				prod = <0x100 0xff0000 0x10000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x30007b7b>;
			};

			prod_c_sdr25 {
				prod = <0x100 0xff0000 0x10000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x30007b7b>;
			};

			prod_c_sdr50 {
				prod = <0x100 0xff0000 0x10000 0x1c0 0xe000 0x8000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x30007b7b>;
			};

			prod_c_sdr104 {
				prod = <0x100 0xff0000 0x10000 0x1c0 0xe000 0x4000 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x30007b7b>;
			};

			prod_c_ddr52 {
				prod = <0x100 0x1fff0000 0x00 0x1e0 0x0f 0x07 0x1e4 0x30077f7f 0x30007b7b>;
			};

			prod {
				prod = <0x100 0x1fff000e 0x3090028 0x1c0 0x8001fc0 0x8000040 0x1c4 0x77 0x00 0x120 0x20001 0x01 0x128 0x43000000 0x00 0x1f0 0x80000 0x80000>;
			};
		};
	};

Here the major change was removing the subnode. I tried this because we are not going to use the kernel’s built in drivers for the sd8997 WiFi. We have compiled kernel module source code received from the HW vendor which has to be loaded manually. Is this the correct thing to do?:

type_1ym_wifi@1{
    compatible = "marvell,sd8997";
    reg=<1>;
};

There were a few other changes that are reflected in the sdhci@700b0400 node pasted above. Attached the final dtb converted to dts. Also attached the bootlogs.
Notice the debug nessage:

[    4.929297] mmc1: CMD CRC or end bit error, int mask 0xc0001
[    4.929324] mmc1: error -84 whilst initialising SDIO card

This is shown multiple times.

jul-25th-change-20.dts (284.7 KB)
change-20-bootlogs-25-jul.txt (56.2 KB)

A few questions I have are:

  1. Should a dummy regulator also be set for the vqmmc-supply?

  2. How do I decide whether nvidia,vqmmc-always-on; should be set or not?

  3. As I am trying out the 3.3v modes, how do I make sure that the Default Speed and High Speed modes shown in this table from the TX1 Ref Manual are enabled?

  4. Do the below properties have anything to do with SDIO cards?

- cap-sd-highspeed: SD high-speed timing is supported
- cap-mmc-highspeed: MMC high-speed timing is supported
  1. Can someone please take a look at the latest node and recommend any necessary changes?

Thanks and Regards.