cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>; <–In this line I used the following :
According to file: Jetson_Xavier_NX_Pinmux_Configuration_Template_v1
Line 187, the GPIO08 connected to pin #208 and GPIO name is GPIO3_PQ.02.
I also tried to manipulate with following in DTB
cd-gpios = <&tegra_aon_gpio TEGRA194_AON_GPIO(Q, 2) 0>;
or
cd-gpios = <&tegra_aon_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
None of them worked :-(
Additional DTB changed was:
hardware/nvidia/oc/t19x/kernel-dts/tegra194-soc/tegra194-soc-sdhci.dts
sdmmc3: sdhci@3440000 {
compatible = “nvidia,tegra194-sdhci”;
…
//status = “disabled”; //closed original line
status = “okay”;
}
I’m attaching the dmesg and schematics.
The other threads are not helped me. I did found only 1 suitable thread and there was no solution in it (sorry for repeating )
In tegra194-p3668-common.dtsi file I only have an “sdhci_sd: sdhci@3400000 {”
Here I probably need to define the proper GPIO under cd-gpios node and according to pinmux excel I did it right
On the other hand I got tegra194-soc-sdhci.dtsi I got “sdmmc3: sdhci@3440000 {”, but in the same file there is another entrance “sdmmc1: sdhci@3400000 {” - but this one is for sdmmc1.
Can you advice please, what is the proper solution?
Thanks!
I didn’t thought that I need to add node.
I did added a new node to hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi
Now it’s looks like this:
type osdhci_sd: sdhci@3400000 {
mmc-ocr-mask = <0x0>;
cd-inverted;
cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 7) 0>;
nvidia,cd-wakeup-capable;
mmc-ocr-mask = <0>;
cd-inverted;
vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
status = "okay";
};
sdhci_sd1: sdhci@3440000 { //added this node
mmc-ocr-mask = <0x0>;
cd-inverted;
cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
nvidia,cd-wakeup-capable;
mmc-ocr-mask = <0>;
cd-inverted;
vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
status = "okay";
};
r paste code here
Now I have a working SDCARD with working hot plug in/out.
I would like to ask an additional question.
The thing is, that our HW eng made a small change to our custom board. As a result, I need to configure GPIO10 (pin 212, GPIO3_PQ.01) to be always output and high.
I made a small test. I edited /etc/rc.local and added the below lines to it: