I am working on Jetson TX2 NX L4T 32.7.1 BSP and I have customized carrier board.
I have changed USB2.0 to host mode from OTG by below changes and my USB is not up, same changes I have made in L4T 32.5.1 based BSP and it works. I have attached my DTS file(tegra186-p3636-0001-p3509-0000-a01.dts)
tegra186-p3636-0001-p3509-0000-a01-modified.dts (239.3 KB)
Here is the change I have made for /source/public/hardware/nvidia/soc/t18x/kernel-dts/tegra186-soc/tegra186-soc-sdhci.dtsi:
sdmmc3: sdhci@3440000 {
compatible = “nvidia,tegra186-sdhci”;
reg = <0x0 0x3440000 0x0 0x210>;
interrupts = < 0 64 0x04>;
max-clk-limit = <204000000>;
ddr-clk-limit = <48000000>;
tap-delay = <11>;
trim-delay = <5>;
nvidia,ddr-tap-delay = <11>;
ddr-trim-delay = <5>;
bus-width = <4>;
ignore-pm-notify;
mmc-ocr-mask = <0>;
keep-power-in-suspend;
/non-removable;/
cap-mmc-highspeed;
cap-sd-highspeed;
pwrdet-support;
pinctrl-names = “sdmmc_e_33v_enable”, “sdmmc_e_33v_disable”;
pinctrl-0 = <&sdmmc3_e_33V_enable>;
pinctrl-1 = <&sdmmc3_e_33V_disable>;
compad-vref-3v3 = <0x1>;
compad-vref-1v8 = <0x2>;
nvidia,min-tap-delay = <84>;
nvidia,max-tap-delay = <136>;
pll_source = “pll_p”;
resets = <&tegra_car TEGRA186_RESET_SDMMC3>;
reset-names = “sdhci”;
clocks = <&tegra_car TEGRA186_CLK_SDMMC3>,
<&tegra_car TEGRA186_CLK_PLLP_OUT0>,
<&tegra_car TEGRA186_CLK_SDMMC_LEGACY_TM>;
clock-names = “sdmmc”, “pll_p”, “sdmmc_legacy_tm”;
cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(L, 4) 0>
iommus = <&smmu TEGRA_SID_SDMMC3A>;
nvidia,en-periodic-calib;
/force-non-removable-rescan;/
mmc-ocr-mask = <0x0>;
nvidia,cd-wakeup-capable;
vmmc-supply = <&battery_reg>;
nvidia,vmmc-always-on;
cd-inverted;
nvidia,sd-device;
status = “okay”;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
}
tegra186-soc-sdhci.dtsi (5.9 KB)
In our design we use GPIO00 (USB_VBUS_EN0) Pin 87 for SD card CD(detection)
When I remove and hotplug SD card:
[ 33.096585] tegradc 15200000.nvdisplay: unblank
[ 33.096595] tegradc 15210000.nvdisplay: blank - powerdown
[ 35.357307] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 90.557040] extcon-gpio-states external-connection:extcon@1: Cable state:0, cable id:0
[ 90.557068] tegra-xudc-new 3550000.xudc: vbus state: 0
[ 90.557088] tegra-xudc-new 3550000.xudc: device mode off: 0
[ 90.557132] tegra-xudc-new 3550000.xudc: active: 1 => 0
[ 90.557156] tegra-xudc-new 3550000.xudc: entering ELPG
[ 90.558992] tegra-xudc-new 3550000.xudc: entering ELPG done
[ 111.392758] extcon-gpio-states external-connection:extcon@1: Cable state:1, cable id:1
[ 111.392826] tegra-xudc-new 3550000.xudc: vbus state: 1
[ 111.392835] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 111.393814] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 111.393824] tegra-xudc-new 3550000.xudc: device mode on: 0
[ 111.393839] tegra-xudc-new 3550000.xudc: active: 0 => 1
attached dmesg log file below:
dmesg_TX2_NX_l4t32.7.1_FSC_sd_card_not_up (71.5 KB)