Issues setting the "CAN_120R_EN" Terminating Resistor Switch

We are trying to set the “CAN_120R_EN” Terminating Resistor Switch using GPIO. From your wiki
we see that we’re supposed to get this

# sudo cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 300-315, parent: i2c/1-0021, 1-0021, can sleep:
 gpio-305 (bt_wake_hst         )
 gpio-306 (spi0_rst_3v3        |gpio_xten_pin@6     ) out lo ACTIVE LOW
 gpio-307 (gpio_pin7           |gpio_xten_pin@7     ) out lo ACTIVE LOW
 gpio-308 (can_120R_en         )
 gpio-309 (M2B_PCIe_rst        )
 gpio-310 (USB_HUB_rst         |gpio_xten_pin@10    ) out hi

where the 308 pin is what we are looking for. For us however this is missing, making it difficult to figure out how this GPIO should be set. Here is our output:

# cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 300-315, parent: usb/1-2.3:1.0, cp210x, can sleep:

gpiochip1: GPIOs 316-347, parent: platform/c2f0000.gpio, tegra234-gpio-aon:
 gpio-316 (PAA.00              )
 gpio-317 (PAA.01              )
 gpio-318 (PAA.02              )
 gpio-319 (PAA.03              )
 gpio-320 (PAA.04              )

Also it says that parent is i2c for you, while it is usb for us under gpiochip2, not sure why this is. We are also missing the gpio-folder, but this is maybe because we flashed it without the gpio sysfs.

# ls /sys/class/gpio
ls: cannot access '/sys/class/gpio': No such file or directory

We are using the reComputer Industrial J4012 ORIN NX 16GB

Hi there,
So I’m 50/50 sure that’s a problem, Unless you know you don’t need it? (even though it’s depreciated)It’s how the Kernel add’s and deletes items in IO space.
Here is a GREAT discussion about it.

GL :slight_smile: PJ :v:

We noticed it was deprecated as well, and was hoping to be able to set the pins using e.g. gpiodev or something similar. However, I cannot get the info on the gpiochips to find which one is the 120R resistor.

Any tips on how to rebuild the jetson rootfs with the gpio sysfs? We followed the seeedstudio’s guide to flash the jetpack, although we flashed a minimal (or basic) rootfs instead of the samplefs. From my understand the kernel has to be rebuilt with the CONFIG_GPIO_SYSFS flag set, but I dont think the flash procedure rebuilds the linux kernel(?)

Hi there,
I don’t know the Answer but AGREE on building with the CONF_GPIO_SYSFS flag
also I’m thinking with the JetPack flash You should still be able to use the gpiodev
I’m pretty sure I have seen this b4, Not sure if they reflashed or found the iopins but your in the right neighborhood. Maybe one of the SEEED ninja’s :ninja: can chime in?
GL :slight_smile: PJ

I see that for Jetpack 5 they have a couple of patches here reComputer Industrial | Seeed Studio Wiki, specifically one of the dts files contains CAN_120R_EN. So I guess what we’re really wanting is an updated guide for Jetpack 6.

1 Like