Hello,
On my custom board hosting a Xavier NX module, I have implemented an SD Card using the SDMMC3 slot. For the SD card detection signal, I used the GPIO08. For the enable of the voltage regulator, I took the GPIO09.
I am modifying the following dtsi files:
-
kernel/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3509-0000-a00.dtsi
added :
sdhci_sd: sdhci@3440000 {
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_sdmmc3_sw>;
status = “okay”;
};
-
kernel/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-fixed-regulator-p3668.dtsi
p3668_vdd_sdmmc3_sw: regulator@106 {
compatible = “regulator-fixed”;
reg = <106>;
regulator-name = “vdd-sdmmc3-sw”;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(S, 4) 0>;
enable-active-high;
};
kernel/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-power-tree-p3668.dtsi
sdhci@3440000 {
vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
};
I have two questions:
-
in the file tegra194-fixed-regulator-p3668.dtsi, I have an already regulator p3668_vdd_sdmmc1_sw with the option “reg 106” (which is useful for powering the SD card on the Xavier module). Is there an address pool available or not?
-
Should I make the modification in the file tegra194-power-tree-p3668.dtsi because I saw this on one of the Nvidia forums but not in the others talking about the installation of an SD card on SDMMC3…
Thanks for your feedback!
hello mickael.guibert,
I’m not quite understand your Q1, are you saying an address map? please check TRM for that.
you may check from the beginning of power-tree dtsi file, that the file tegra194-fixed-regulator-p3668.dtsi
had been included.
since there’re several device tree files, and they’ll compose into a single dtb binary for usage,
for example, Jetson Xavier NX is using tegra194-p3668-all-p3509-0000.dtb
, flashing this to kernel-dtb
partition.
so, it depends-on your choice to modify the default dtsi file or adding yours customize file to assign device tree properties.
thanks
Hi Jerry,
So, for the question 1, I don’t find any things about address map concerning regulator management (Xavier_TRM_DP09253002_v1.4p.pdf). My question is how to choose another adress for the new regulator control (through fixed-regulator “reg” option) ?
Concerning the second question. The question not speek about concerned dtsi files, but the methodology to included SD Card on SDMMC3 interface.
So, a declaration of sdhci at @3440000 with gpio SD card dectect signal on gpio, a then regulator control indicating supply level and gpio control, and finally, the adding of a nex regulator control on power-tree dtsi files. is it right or not ?
hello mickael.guibert,
(1)
please check below,
it’s fixed-regulators, which actually a GPIO pin for a 3.3V regulator control.
looks as same as your definition of cd-gpios
.
$L4T_Sources/r32.5/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-fixed-regulator-p3668.dtsi
17 / {
18 fixed-regulators {
...
28 p3668_vdd_sdmmc1_sw: regulator@106 {
29 compatible = "regulator-fixed";
30 reg = <106>;
31 regulator-name = "vdd-sdmmc1-sw";
32 regulator-min-microvolt = <3300000>;
33 regulator-max-microvolt = <3300000>;
34 gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 2) 0>;
35 enable-active-high;
36 };
please check fixed-regulators {...}
field for all available regulators.
(2)
there’re several device tree files included and build as single dtb binary for usage, the later one may overwrite the previous.
you may disassembler the dtb file into text file for examination.
for example, $ dtc -I dtb -O dts -o output.txt tegra194-p3668-all-p3509-0000.dtb
thanks
Sorry, but I want to keep the SDMMC1 which takes into account the SD Card of the Xavier NX module. And I want to add a new SD Card on my Custom card. So, I don’t want to replace the SD Card of the Xavier NX SOM.
Hence my question about mapping the fixed-regulator to another “reg”…
p3668_vdd_sdmmc1_sw: regulator@106 {
compatible = “regulator-fixed”;
reg = <106>;
…
For me,
p3668_vdd_sdmmc3_sw: regulator@xxx? {
compatible = “regulator-fixed”;
reg = <xxx?>;
…
Which number xxx, can I put ?
Thanks for your help.
hello mickael.guibert,
you may disassembler the dtb file into text file to check those occupied regulator numbers,
for example,
fixed-regulators {
compatible = "simple-bus";
device_type = "fixed-regulators";
regulator@101 {
regulator@102 {
regulator@104 {
regulator@105 {
...
after that, you may assign your new settings to avoid overwrite them.
thanks
1 Like
Thank you for your reply.
I will do this.