Pinmux config during jetpack upgrade

We have a custom pinmux .cfg file tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg that we use for our agx board running JP 4.3. Now we are upgrading to JP 4.6.1, can the same cfg file be used as it, or do we need to start from the latest sheet and recreate the cfg file?

I copied the same tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg to JP 4.6.1 Linux_for_Tegra/bootloader/t186ref/BCT and observe the following differences.

In JP 4.3:

$ sudo cat /sys/kernel/debug/gpio 
gpiochip2: GPIOs 240-247, parent: platform/max77620-gpio, max77620-gpio, can sleep:
 gpio-246 (                    |gpio_default        ) out hi    
 gpio-247 (                    |gpio_default        ) out hi    

gpiochip1: GPIOs 248-287, parent: platform/c2f0000.gpio, tegra-gpio-aon:
 gpio-253 (                    |sysfs               ) out hi    
 gpio-254 (                    |sysfs               ) out hi    
 gpio-256 (                    |sysfs               ) out hi    
 gpio-257 (                    |sysfs               ) out hi    
 gpio-284 (                    |power-key           ) in  hi    

gpiochip0: GPIOs 288-511, parent: platform/2200000.gpio, tegra-gpio:
 gpio-336 (                    |force-recovery      ) in  hi    
 gpio-339 (                    |wifi-enable         ) out hi    
 gpio-341 (                    |eqos_phy_reset      ) out hi    
 gpio-343 (                    |cd                  ) in  lo    
 gpio-346 (                    |temp-alert          ) in  hi    
 gpio-378 (                    |pcie_wake           ) in  hi    
 gpio-386 (                    |hdmi2.0_hpd         ) in  hi    
 gpio-389 (                    |vdd_sys_en          ) out lo    
 gpio-390 (                    |reset_gpio          ) out lo    
 gpio-391 (                    |bt_ext_wake         ) out hi    
 gpio-392 (                    |avdd-cam-2v8        ) out lo    
 gpio-417 (                    |sysfs               ) out lo    
 gpio-480 (                    |bt_host_wake        ) in  lo    

But in JP 4.6.1:

$ sudo cat /sys/kernel/debug/gpio 
gpiochip2: GPIOs 240-247, parent: platform/max77620-gpio, max77620-gpio, can sleep:
 gpio-246 (                    |gpio_default        ) out hi    
 gpio-247 (                    |gpio_default        ) out hi    

gpiochip1: GPIOs 248-287, parent: platform/c2f0000.gpio, tegra-gpio-aon:
 gpio-248 (CAN1_DOUT           )
 gpio-249 (CAN1_DIN            )
 gpio-250 (CAN0_DOUT           )
 gpio-251 (CAN0_DIN            )
 gpio-252 (                    )
 gpio-253 (                    |sysfs               ) out hi    
 gpio-254 (                    |sysfs               ) out hi    
 gpio-255 (                    )
 gpio-256 (GPIO8               |sysfs               ) out hi    
 gpio-257 (GPIO9               |sysfs               ) out hi    
 gpio-258 (                    )
 gpio-259 (                    )
 gpio-260 (                    )
 gpio-261 (                    )
 gpio-262 (                    )
 gpio-263 (                    )
 gpio-264 (                    )
 gpio-265 (                    )
 gpio-266 (                    )
 gpio-267 (                    )
 gpio-268 (                    )
 gpio-269 (                    )
 gpio-270 (                    )
 gpio-271 (I2C2_CLK            )
 gpio-272 (I2C2_DAT            )
 gpio-273 (                    )
 gpio-274 (                    )
 gpio-275 (                    )
 gpio-276 (                    )
 gpio-277 (                    )
 gpio-284 (                    |power-key           ) in  hi    
gpiochip0: GPIOs 288-511, parent: platform/2200000.gpio, tegra-gpio:
 gpio-288 (                    |sysfs               ) out lo    
 gpio-289 (                    |vdd-12v-pcie        ) out lo    
 gpio-290 (                    )
 gpio-291 (                    |sysfs               ) out lo    
 gpio-292 (                    )
 gpio-293 (                    )
 gpio-294 (                    )
 gpio-295 (                    )
 gpio-296 (                    )
 gpio-297 (                    )
 gpio-298 (                    )
 gpio-299 (                    )
 gpio-300 (                    )
 gpio-301 (                    )
 gpio-302 (                    )
 gpio-303 (                    )
 gpio-304 (                    )
 gpio-305 (                    )
 gpio-306 (                    )
 gpio-307 (                    )
 gpio-308 (                    )
 gpio-309 (                    )
 gpio-310 (                    )
 gpio-311 (                    )
 gpio-312 (                    )
 gpio-313 (                    )
 gpio-314 (                    )
 gpio-315 (                    )
 gpio-316 (                    )
 gpio-317 (                    )
 gpio-318 (                    )
 gpio-319 (                    )
 gpio-320 (                    )
 gpio-321 (                    )
 gpio-322 (                    )
 gpio-323 (                    )
 gpio-324 (                    )
 gpio-325 (                    )
 gpio-326 (                    )
 gpio-327 (                    )
 gpio-328 (                    )
 gpio-329 (                    )
 gpio-330 (                    )
 gpio-331 (                    )
 gpio-332 (                    )
 gpio-333 (                    )
 gpio-334 (                    )
 gpio-335 (                    )
 gpio-336 (                    |force-recovery      ) in  hi    
 gpio-337 (                    )
 gpio-338 (                    )
 gpio-339 (                    |wifi-enable         ) out hi    
 gpio-340 (                    )
 gpio-341 (                    |eqos_phy_reset      ) out hi    
 gpio-342 (                    )
 gpio-343 (                    |cd                  ) in  hi    
 gpio-344 (GPIO35              )
 gpio-345 (                    )
 gpio-346 (                    |temp-alert          ) in  hi    
 gpio-347 (                    )
 gpio-348 (                    )
 gpio-349 (                    )
 gpio-350 (                    )
 gpio-351 (I2S2_CLK            )
 gpio-352 (I2S2_DOUT           )
 gpio-353 (I2S2_DIN            )
 gpio-354 (I2S2_FS             )
 gpio-355 (                    )
 gpio-356 (                    )
 gpio-357 (                    )
 gpio-358 (                    )
 gpio-359 (                    )
 gpio-360 (                    )
 gpio-361 (                    )
 gpio-362 (                    )
 gpio-363 (                    )
 gpio-364 (                    )
 gpio-365 (                    )
 gpio-366 (                    )
 gpio-367 (                    )
 gpio-368 (                    )
 gpio-369 (                    )
 gpio-370 (                    )
 gpio-371 (                    )
 gpio-372 (                    )
 gpio-373 (                    )
 gpio-374 (                    )
 gpio-375 (                    )
 gpio-376 (                    )
 gpio-377 (                    )
 gpio-378 (                    |pcie_wake           ) in  hi    
 gpio-379 (                    )
 gpio-380 (                    )
 gpio-381 (                    )
 gpio-382 (                    )
 gpio-383 (                    )
 gpio-384 (                    )
 gpio-385 (                    )
 gpio-386 (                    |hdmi2.0_hpd         ) in  hi    
 gpio-387 (                    )
 gpio-388 (                    )
 gpio-389 (                    |vdd_sys_en          ) out lo    
 gpio-390 (                    |reset_gpio          ) out lo    
 gpio-391 (                    |bt_ext_wake         ) out hi    
 gpio-392 (                    |avdd-cam-2v8        ) out lo    
 gpio-393 (                    )
 gpio-394 (                    )
 gpio-395 (                    )
 gpio-396 (                    )
 gpio-397 (                    )
 gpio-398 (                    )
 gpio-399 (                    )
 gpio-400 (                    )
 gpio-401 (                    )
 gpio-402 (                    )
 gpio-403 (                    )
 gpio-404 (                    )
 gpio-405 (                    )
 gpio-406 (                    )
 gpio-407 (                    )
 gpio-408 (                    )
 gpio-409 (                    )
 gpio-410 (                    )
 gpio-411 (                    )
 gpio-412 (GPIO32              )
 gpio-413 (                    )
 gpio-414 (                    )
 gpio-415 (                    )
 gpio-416 (                    )
 gpio-417 (GPIO17              |sysfs               ) out lo    
 gpio-418 (                    )
 gpio-419 (                    )
 gpio-420 (                    )
 gpio-421 (                    )
 gpio-422 (MCLK05              )
 gpio-423 (                    )
 gpio-424 (                    )
 gpio-425 (                    )
 gpio-426 (UART1_TX            )
 gpio-427 (UART1_RX            )
 gpio-428 (UART1_RTS           )
 gpio-429 (UART1_CTS           )
 gpio-430 (                    )
 gpio-431 (                    )
 gpio-432 (                    )
 gpio-433 (                    )
 gpio-434 (                    )
 gpio-435 (                    )
 gpio-436 (                    )
 gpio-437 (                    )
 gpio-438 (                    )
 gpio-439 (                    )
 gpio-440 (                    )
 gpio-441 (                    )
 gpio-442 (                    )
 gpio-443 (                    )
 gpio-444 (                    )
 gpio-445 (                    )
 gpio-446 (                    )
 gpio-447 (                    )
 gpio-448 (                    )
 gpio-449 (                    )
 gpio-450 (                    )
 gpio-451 (                    )
 gpio-452 (                    )
 gpio-453 (                    )
 gpio-454 (                    )
 gpio-455 (                    )
 gpio-456 (                    )
 gpio-457 (                    )
 gpio-458 (                    )
 gpio-459 (                    )
 gpio-460 (                    )
 gpio-461 (                    )
 gpio-462 (                    )
 gpio-463 (                    )
 gpio-464 (                    )
 gpio-465 (                    )
 gpio-466 (                    )
 gpio-467 (                    )
 gpio-468 (                    )
 gpio-469 (                    )
 gpio-470 (                    )
 gpio-471 (                    )
 gpio-472 (                    )
 gpio-473 (                    )
 gpio-474 (                    )
 gpio-475 (                    )
 gpio-476 (                    )
 gpio-477 (                    )
 gpio-478 (                    )
 gpio-479 (                    )
 gpio-480 (                    |bt_host_wake        ) in  lo    
 gpio-481 (                    )
 gpio-482 (                    )
 gpio-483 (SPI3_CS0_N          )
 gpio-484 (                    )
 gpio-485 (                    )
 gpio-486 (                    )
 gpio-487 (                    )
 gpio-488 (                    )
 gpio-489 (                    |sysfs               ) out lo    
 gpio-490 (                    |vdd-3v3-pcie        ) out hi    
 gpio-491 (SPI1_CLK            )
 gpio-492 (SPI1_MISO           )
 gpio-493 (SPI1_MOSI           )
 gpio-494 (SPI1_CS0_N          )
 gpio-495 (SPI1_CS1_N          )
 gpio-496 (                    )
 gpio-497 (                    )

In JP 4.6.1, I am getting below error:

~#  echo 490 > /sys/class/gpio/unexport
-bash: echo: write error: Invalid argument
~#  echo 490 > /sys/class/gpio/export
-bash: echo: write error: Device or resource busy
~#  echo 490 > /sys/class/gpio/unexport
-bash: echo: write error: Invalid argument

It is not because of the pinmux change. It is due to gpio 490 is being used by other driver.

ok, I updated Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-fixed-regulator-p2822-1000.dtsi and that frees up gpio-490.

Back to my original question, are you suggesting the custom pinmux.cfg file can be just copied over?

@@ -140,9 +140,9 @@
                        regulator-name = "vdd-3v3-pcie";
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
-                       gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 2) 0>;
+                       /* gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 2) 0>; */
                        regulator-boot-on;
-                       enable-active-high;
+                       /* enable-active-high; */
                };
 
                p2822_vdd_12v_pcie: regulator@116 {

Yes, you can just replace the cfg file.

I assume I can just replace the cfg file whether upgrading from my current JP4.3 to JP 4.6.1, or in the future to JP 5.x?

What about module upgrade? eg: if I upgrade/swap the existing 16GB AGX module on my board to the new 64GB (or 32GB) module. Will everything just work, or do I need to re-flash? If latter, do I need to modify .cfg file or any other files? Again, there is no change in the board.

Hi,

Of course you need to reflash. This pinmux info is stored in the module, not any memory/disk on the carrier board.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.