SPI for nrc7292 network device not working

For the past 3 weeks we have tried to get our first Jetson device up and running. The software and most of the hardware we no real problem, except for the network device on the 40-pin header.
We are trying to get the Alpha Network AHPI7292S (based on an nrc7292 (Newracom) WiFi HaLow chipset) up and running, but as far as I can see the SPI on the system isn’t co-operating.
I already asked briefly on the Nvidia Jetson Discord chat, but with no results. Maybe this is a better spot to ask for directions for now and in the near future. I know these issues have been discussed before, but the information was unfortunately of no help to me (yet). It’s most of the times over two years old, too. E.g.:

I also looked at some more general SPI configuration threads, but found nothing that helped me.

I managed to disable the system default SPI driver as stated, and “ls /dev” lists no spi items at the moment.
However, trying anything regarding configuring the device tree keeps failing for me.
dmesg lists this after each attempt of loading the Newracom driver (which at first compiles fine on this system, by the way):
spi-tegra114 3210000.spi: chipselect already in use
Failed to instantiate a new spi device.
Succeeded to register spi driver(nrc80211).

The device tree source (dts file) I’ve tried were the modified version of the default Newracom driver, and the one published by Silex in “APPLICATION NOTE: SX-NEWAH Evaluation with nVidia Jetson”. Neither are accepted by the OS out-of-the-box.
The current one I’m using looks like this:

/dts-v1/;
/plugin/;
/ {
	overlay-name = "SPI for Newracom WiFi HaLow";// must be unique, most chars are allowed
	jetson-header-name = "Jetson 40pin Header";// do not edit unless the spec for the installer changes
	compatible = "nvidia,p3509-0000+p3767-0000 nvidia,tegra234 nvidia,tegra23x";// obtained through "cat /sys/firmware/devicetree/base/compatible" and adding the required spaces in between entries
	fragment@0 {
		target = <0xffffffff>;

		__overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <0x1>;

			exp-header-pinmux {
				linux,phandle = <0x1>;
				phandle = <0x1>;

				/* disabled control over pins other than SPI, wouldn't install otherwise
				hdr40-pin3 {
					nvidia,function = "i2c2";
					nvidia,pins = "gen2_i2c_sda_pj3";
					nvidia,pull = <0x0>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
					nvidia,io-high-voltage = <0x1>;
				};
				hdr40-pin5 {
					nvidia,function = "i2c2";
					nvidia,pins = "gen2_i2c_scl_pj2";
					nvidia,pull = <0x0>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
					nvidia,io-high-voltage = <0x1>;
				};
				hdr40-pin8 {
					nvidia,function = "uartb";
					nvidia,pins = "uart2_tx_pg0";
					nvidia,pull = <0x0>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x0>;
				};
				hdr40-pin10 {
					nvidia,function = "uartb";
					nvidia,pins = "uart2_rx_pg1";
					nvidia,pull = <0x2>;
					nvidia,tristate = <0x1>;
					nvidia,enable-input = <0x1>;
				};
				*/
				hdr40-pin19 {
					nvidia,function = "spi1";
					nvidia,pins = "spi1_mosi_pc0";
					nvidia,pull = <0x1>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
				};
				hdr40-pin21 {
					nvidia,function = "spi1";
					nvidia,pins = "spi1_miso_pc1";
					nvidia,pull = <0x1>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
				};
				hdr40-pin23 {
					nvidia,function = "spi1";
					nvidia,pins = "spi1_sck_pc2";
					nvidia,pull = <0x1>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
				};
				hdr40-pin24 {
					nvidia,function = "spi1";
					nvidia,pins = "spi1_cs0_pc3";
					nvidia,pull = <0x2>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
				};
				hdr40-pin26 {
					nvidia,function = "spi1";
					nvidia,pins = "spi1_cs1_pc4";
					nvidia,pull = <0x2>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
				};
				/* disabled control over pins other than SPI, wouldn't install otherwise
				hdr40-pin27 {
					nvidia,function = "i2c1";
					nvidia,pins = "gen1_i2c_sda_pj0";
					nvidia,pull = <0x0>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
					nvidia,io-high-voltage = <0x1>;
				};
				hdr40-pin28 {
					nvidia,function = "i2c1";
					nvidia,pins = "gen1_i2c_scl_pj1";
					nvidia,pull = <0x0>;
					nvidia,tristate = <0x0>;
					nvidia,enable-input = <0x1>;
					nvidia,io-high-voltage = <0x1>;
				};
				*/
			};
		};
	};
	fragment@1 {
		compatible = "nvidia,tegra114-spi-slave";
		target = <&hdr40_spi1>;
		__overlay__ {
			spi@0 {
				status = "disabled";
			};
			spi@1 {
				status = "disabled";
			};
		};
	};
	fragment@2 {
		compatible = "nvidia,tegra114-spi-slave";
		target = <&hdr40_spi2>;
		__overlay__ {
			spi@0 {
				status = "disabled";
			};
			spi@1 {
				status = "disabled";
			};
		};
	};
	__symbols__ {
		jetson_io_pinmux = "/fragment@0/__overlay__/exp-header-pinmux";
	};
	__fixups__ {
		pinmux = "/fragment@0:target:0";
	};
	__local_fixups__ {
		fragment@0 {
			__overlay__ {
				pinctrl-0 = <0x00>;
			};
		};
	};
};

This is after many attempts of getting something to work by either adding or removing some items here. It installs, but I’m by no means an expert at these kind of components (even though I’ve done a bit of kernel mode development since 2009). Could someone help with getting (the various types of) nrc7292-based network devices to work like they apparently did before?

Hi j.kvw,

Are you using the devkit or custom board for Orin NX?
What’s your Jetpack verion in use?

Sorry that we don’t have this module to verify locally. I would suggest you contacting the vendor for the porting guide of this module. (including driver, device tree…etc).

Before that, you could also verify the SPI loopback test first to make sure SPI worked on your board, but the SPI driver(spidev) used should be different from yours(nrc80211).

Hi KevinFFF,

Thanks for looking into it with me. The carrier board is an AVerMedia D131. The version string displayed by “sudo apt-cache show nvidia-jetpack” is: “5.1.2-b104”.
I’ll look into the SPI device info in the documents today to see if I missed something. It’s a bit of a hassle that everything in the device tree info there seems to be targeted towards our previous test system, a Raspberry Pi.
Any hints to how to set up the device to do a “standard” SPI test with the Newracom device attached? I know it’s a rather specific SPI device in terms of master/slave control.

As I said before, we don’t have this module to verify so that it would be suggested requesting the porting guide from your vendor of Newracom device.

For my understanding, SPI is default disabled and you would need to configure the pinmux and load the SPI driver manually(it has been built as a kernl module).
You could refer to the following thread about how we verify SPI loopback test.
Jetson Nano SPI Bus Not Working - #10 by KevinFFF

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