I am using a Jetson Xavier NX with a custom carrier board that uses an SD card connected to sdmmc3
with pin CC0
(spi2_sck_pcc0
) connected to the card detect switch on the micro SD card cage. The board pulls the card detect line to down to ground when a card is inserted, so I want to configure the card detect pin with a pull-up. I am using a custom linux distro built with yocto using the tegra demo distro as a base. So far I have tried adding the following entry to tegra194-p3668-common.dtsi
:
pinmux@2430000 {
spi2_sck_pcc0 {
nvidia,pins = "spi2_sck_pcc0";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
};
This does not seem to do anything because running the following command gives the same output as it did before I modified the device tree:
$ cat /sys/kernel/debug/tegra_pinctrl_reg | grep pcc0
Bank: 1 Reg: 0x0c302048 Val: 0x00000052 -> spi2_sck_pcc0
Can anybody point me in the right direction as to how to enable the pull-up on this pin?
The full patch for my changes to the device tree is as follows:
--- a/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi
+++ b/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi
@@ -291,6 +291,28 @@
status = "okay";
};
+ sdmmc3: sdhci@3440000 {
+ mmc-ocr-mask = <0x0>;
+ cd-inverted;
+ cd-gpios = <&tegra_aon_gpio TEGRA194_AON_GPIO(CC, 0) 0>;
+ nvidia,cd-wakeup-capable;
+ mmc-ocr-mask = <0>;
+ cd-inverted;
+ status = "okay";
+ };
+
+ pinmux@2430000 {
+ spi2_sck_pcc0 {
+ nvidia,pins = "spi2_sck_pcc0";
+ nvidia,function = "rsvd2";
+ nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+ nvidia,tristate = <TEGRA_PIN_ENABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
+ nvidia,lpdr = <TEGRA_PIN_DISABLE>;
+ };
+ };
+
mipical@3990000 {
status = "okay";
};
@@ -320,20 +342,7 @@
label = "pex_refclk_sel_high";
status = "disabled";
};
- w-disable1 {
- gpio-hog;
- output-high;
- gpios = <TEGRA194_AON_GPIO(CC, 2) GPIO_ACTIVE_LOW>;
- label = "w-disable1";
- status = "okay";
- };
- w-disable2 {
- gpio-hog;
- output-high;
- gpios = <TEGRA194_AON_GPIO(CC, 0) GPIO_ACTIVE_LOW>;
- label = "w-disable2";
- status = "okay";
- };
+
suspend_gpio: suspend-led-gpio {
gpio-hog;
output-high;
--
2.17.1