I followed the Jetson Xavier NX Platform Adaptation and Bring-Up Guide for an own carrier board, but have still some problems.
I customized the pinmux spreadsheet from the Jetson Xavier NX and generated the dtsi files. With the dtsi files I generated a pinmux.cfg and a pad.cfg file. The most important changes in the kernel are the activations of the SD-Card on SDMMC3 and SPI0. I have done that for the Nano with no problems but I cannot find the necessary changes for the Xavier NX (production module). If my assumption is right there must be an entry in the DTSI where I change the SDMMC3 from “disabled” to “okay”. Same for SPI0 I guess.
Could someone please give me some hints how to do this? Any help much appreciated!
If all you need to do is change the state you could just create an overlay that does it for those 2 devices and re-generate the dtb with it. That way you’re not changing and having to recompile the distributed dtb.
Thank you for your quick reply @gtj ! The basic problem is that I cannot find the related entries for SDMMC3 and SPI0. I would expect that these peripherals are defined somewhere and their state should be set to “disabled”. But where?
sdmmc3 is in the L4T/sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra194-soc-sdhci.dtsi.
spi0 is in tegra194-soc-spi.dtsi in that same directory. You’ll probably have to run “./source_sync.sh” to get it, then rebuild the kernel.
Or you could decompile the running dtb, modify it, then re-compile it.
Or you could create a simple overlay that enables them. Something like this should work:
/dts-v1/;
/plugin/;
/ {
overlay-name = "Custom";
compatible = "nvidia,<use the correct part number here>";
fragment@spi0 {
target = < &spi0 >;
__overlay__ {
status = "okay";
};
};
fragment@sdmmc3 {
target = < &sdmmc3 >;
__overlay__ {
status = "okay";
};
};
};
Many thanks for your help! I did not follow the DTSI files and I missed the SOC file. In the end I made a copy of the board+SOC DTS file and added my modifications. Finally it worked!
BTW: The card detect pin CD for SDMMC3 is not on the same location where it used to be on the Nano. The only appearance I found in the Pinmux was a signal on the SOC which is not available on the card connector. For the moment I disabled the card detect mechanism, but the problem is that any card movement will not be recognized. Not a big issue since the card is not meant to be inserted at run time in my system but finally not nice. Any suggestion?