Configure GPIO20/AUD_INT and GPIO10/WIFI_WAKE_AP pins

Hi,

I am trying to configure the pinmux following the instructions in the Tegra Package Docs ( Tegra_Linux_Driver_Package_Documents_R27.1/nvl4t_docs/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide/l4t_pinmux.html#) and here are a couple of issues I am running into:

  1. I downloaded the pinmux spreadsheet from here http://developer.nvidia.com/embedded/dlc/jetson-tx2-module-pinmux
  2. Configure a couple of pins in the orange section (right side)
  3. Use MS Excel in Windows to generate 3 dtsi files (pinmux, gpio and padvoltage)
  4. Use dos2unix tool to convert all 3 dtsi files UNIX files
  5. Copy dt-bindings dir in u-boot/include dir to where the dtsi are
  6. Change #include lines in the dtsi files to use double quotes instead of <>. For example, #include <dt-bindings/pinctrl/pinctrl-tegra.h> becomes #include “dt-bindings/pinctrl/pinctrl-tegra.h”
  7. Run “python pinmux-dts2cfg.py --pinmux addr_info.txt gpio_addr_info.txt por_val.txt pinmux.dsti gpio-defaults.dtsi 1.0 > pinmux.cfg” in kernel/pinmux to generate pinmux.cfg
  8. Run “python pinmux-dts2cfg.py --pad pad_info.txt $3 1.0 > pad.cfg” in kernel/pinmux to generate pad.cfg
  9. Copied both pinmux.cfg and pad.cfg to bootloader/t186ref/BCT and rename them to “tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg” and “tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg”, respectively
  10. build the kernel and flash to TX2

2 issues I am running into:

  1. I cannot find “mandatory_pinmux.txt” for step 7, but step 7 did not fail.
  2. After flashing, eth0 is missing and network fails base on “ifconfig” (no IP address)

I am going to all of these just to change 2 GPIO pins, GPIO20/AUD_INT and GPIO10/WIFI_WAKE_AP, to input/output, high/low, pull-up/pull-down. Is there an easier way? Changing the cfg or dtb files directly perhaps?

Thanks,
Tom

You can reference to below piece of code to modify the original device tree in the kernel package instead of gen it by the pimux table.

You may need to reference to below topic to find out the pin number for TX2.

https://devtalk.nvidia.com/default/topic/1003613/jetson-tx2/gpio-doesn-t-work-/post/5125910/#5125910
https://devtalk.nvidia.com/default/topic/1007639/?comment=5144174

gpio@2200000 {
                camera-control-output-low {
                        gpio-hog;
                        output-low;
                        gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
                        label = "cam0-rst", "cam0-pwdn";
                };
        };

Hi Tom,

I am facing on the same problem. Did you find a solution ?

Hi Thierry,

I have not tried out the answer above yet so not sure if it will work. It will be another 2 weeks until I can back to this issue.

-Tom

ShaneCCC,
Can you please specify what is supposed to be done about the missing mandatory_pinmux.txt file?

@jp444
Please download new release version from the download center. You can see this file in this release package.

Point 2.2 above (#1): If you are using the default pinmux then the dev-kit starts without LAN (cable). Only wifi is working.

Another point : dev/ttyACM0 also is not working. Running the console with screen is not possible.

Alternative solution is to rebuild the kernel with this great tutorial : http://www.jetsonhacks.com/2017/03/25/build-kernel-and-modules-nvidia-jetson-tx2/

Hi Thierry7,
Any chance you know which changes to the default pinmux are necessary to get the ethernet working?

@ShaneCCC: why does the default pinmux have ethernet not working yet the default device tree blob provided with release package does have ethernet working?

@jp444:

In fact I used the extlinux.conf FDT redirection with tegra186-quill-a00 or c03 resulting no local network.
IMHO pinmux is not responsible for that. Sorry for the confusion.

I think the best solution is to rebuild the kernel directly on the TX2 itself. See #7
But it is really crazy to find the good config files and path.

I’ll try the proposal from ShaneCC

@ShaneCC:

Regarding #2, which file do I have to modify on the TX2 itself (full path and name) for:

  • PJ0 (I2S0_CLK) - GPIO num 392
  • PJ3 (I2S0_LRCLK) - GPIO 395
  • PI4 (INT_SPI2) - GPIO 388

Content will be this ?

gpio@2200000 {
                WHICH-NAME-HERE? {
                        gpio-hog;
                        output-low;
                        gpios = <I2S0_CLK 0 I2S0_LRCLK 0 INT_SPI2 0>;
                        label = "i2s0-clk", "i2s0-lrclk", "int-spi2";
                };
        };

Anyone have a fix for the network issues? I have this exact same issue in a different thread. This came after flashing jetpack 3.1 to the new dev kit. Is it an issue with the pinmux or something else entirely. I would really appreciate the help as i am somewhat new to the platform.
CT

The problem really comes from the pinmux config (Jetson-TX2-Generic-Customer-Pinmux-Template.xlsm) !
Because there is no Ethernet configuration inside.

The Jetson-TX1.xlsm allows configuring ethernet => NVIDIA should update the .xlsm for TX2 (@ShaneCCC ?)

What is missing for TX2:

  • ethernet
  • sdmmc4
  • directdc1

Not yet tested, but the temporary solution is probably this (for ethernet):

Once the .dtsi are converted to .cfg, add the following lines to the .cfg:

pinmux.0x02439054 = 0x00004400; # eqos_txc_pe0: eqos, tristate-disable, input-disable
pinmux.0x02439018 = 0x00004400; # eqos_td0_pe1: eqos, tristate-disable, input-disable
pinmux.0x02439010 = 0x00004400; # eqos_td1_pe2: eqos, tristate-disable, input-disable
pinmux.0x02439008 = 0x00004400; # eqos_td2_pe3: eqos, tristate-disable, input-disable
pinmux.0x02439000 = 0x00004400; # eqos_td3_pe4: eqos, tristate-disable, input-disable
pinmux.0x02439064 = 0x00004400; # eqos_tx_ctl_pe5: eqos, tristate-disable, input-disable
pinmux.0x02439040 = 0x00004450; # eqos_rd0_pe6: eqos, tristate-enable, input-enable
pinmux.0x02439030 = 0x00004450; # eqos_rd1_pe7: eqos, tristate-enable, input-enable
pinmux.0x02439028 = 0x00004450; # eqos_rd2_pf0: eqos, tristate-enable, input-enable
pinmux.0x02439020 = 0x00004450; # eqos_rd3_pf1: eqos, tristate-enable, input-enable, loopback-disable
pinmux.0x0243906c = 0x00000450; # eqos_rx_ctl_pf2: eqos, tristate-enable, input-enable
pinmux.0x0243905c = 0x00000450; # eqos_rxc_pf3: eqos, tristate-enable, input-enable
pinmux.0x02439038 = 0x00004448; # eqos_mdio_pf4: eqos, pull-up, tristate-disable, input-enable
pinmux.0x02439048 = 0x00004400; # eqos_mdc_pf5: eqos, tristate-disable, input-disable

Thanks all
We are working on the xlsm file. Will release once done.

Temporary solution #11 is not working.

Here is one which is working:

  1. Open pinmux, make no changes and generate the dtsi. Rename by “pinmux-reference”
  2. Open pinmux, make your changes and generate the dtsi. Name it “pinmux”
  3. Convert both files to .cfg
  4. Compare changes with “meld” and apply them to “tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg”
  5. Copy the latest file (point 4) to …/bootloader/t186ref/BCT. Overwrite the existing one (of course, make a copy before)
  6. And Flash…

BUT NOW…

My 3 GPIOs (output) are reserved for me (#9), cool, but I cannot change their states:

Previously, without modification, ils was possible to use:

a) echo 395 > /sys/class/gpio/export
b) echo out > /sys/class/gpio/gpio395/direction
c) echo 1 > /sys/class/gpio/gpio395/value

Now, with c) I get this error message (from ssh connection) and I am ejected without output change:

ubuntu@tegra-ubuntu:~$ packet_write_wait: Connection to 10.194.24.51 port 22: Broken pipe

Any idea what is wrong ?

Sorry for the end of comment #13 because it works perfectly now !

It was one hardware problem on my board.

SUMMARY:

  1. Wait for the newest pinmux

or

  1. Follow comment #13, points 1 to 6. To test with SSH, execute points a to c.

Hope this helps

To ShaneCCC : In reply to #12

Do you have one new pinmux released ?

Many thanks in advance

Thierry

That will be updated in the next release.

Thanks

Do you have a date ?

Many thanks