Jetson orin nx 16GB + ksz9477 switch

Hi All,

I have a custom base board and using a jetson orin nx 16GB module. The SOM ethernet is connected directly to the phy port of the ksz9477 switch and the SPI to control the switch.

I also have other devices connected to the other phy ports and I´m not using the RGMII and SGMII ports.

I´m currently having issues with the dsa driver (dsa2.c) and I could track the problem down to the dsa_port_parse_of function.

if (ethernet) {
struct net_device *master;
master = of_find_net_device_by_node(ethernet);
of_node_put(ethernet);
if (!master){
return -EPROBE_DEFER;
}

	return dsa_port_parse_cpu(dp, master);
}

Where this function is returning EPROBE_DEFER.

I´m editing tegra234-p3768-0000-a0.dtsi and added the following to this file:

eth1: pcie@140a0000 {// C8 - Ethernet
status = “okay”;

	//nvidia,pex-wake-gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(L, 2) GPIO_ACTIVE_LOW>;
};




spi@3210000{ /* SPI1 in 40 pin conn */
	status = "okay";
	ksz9477@0{
		compatible = "microchip,ksz9477";
		reg = <0x0>;
		reset-gpios = <&tegra_aon_gpio TEGRA234_AON_GPIO(CC, 2) GPIO_ACTIVE_HIGH>;
		spi-max-frequency = <1000000>;
		spi-cpha;
		spi-cpol;
		status = "okay";  
		controller-data {
			nvidia,enable-hw-based-cs;
			nvidia,rx-clk-tap-delay = <0x10>;
			nvidia,tx-clk-tap-delay = <0x0>;
		};
		ports{
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				label = "cpu";
				ethernet = <&eth1>;
				phy-mode = "rgmii-txid";
				fixed-link {
					speed = <1000>;
					full-duplex;
					pause;
				};
			};
			port@1 {
				reg = <1>;
				label = "lan2";
			};
			port@2 {
				reg = <2>;
				label = "lan3";
			};
			port@3 {
				reg = <3>;
				label = "lan4";
			};
			port@4 {
				reg = <4>;
				label = "lan5";
			};
	        };
	
	};
};

Could you please help me check what could be going wrong?

Best Regards

Daniel

Hi follmer,

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

It seems a custom driver.
From your code snipet, it seems something missing in device tree.

I would suggest you ask the vendor for the porting guide of ksz9477 switch.

Hi Kevin,

I´m using a custom board and jetpack 35.4.1

I also used the p3767.conf.common as reference.

Could you please check and let me know what is wrong inside the dtsi file?

Best regards,

Daniel

  1. I don’t see how you specify which pin is used for CS in your device tree. (cs-gpios)
  2. It seems the driver is looking for the ethernet node failed.

Please also share the porting guide for further check.

Hi Kevin,

Here is the porting guide:

https://microchip.my.site.com/s/article/EVB-KSZ9477--How-to-Use-the-Linux-DSA-Driver

tegra234-p3768-0000-a0.zip (2.3 KB)

I also attached the dtsi file.

Daniel

I don’t have your module so that I can not verify it locally.

May I know why you comment out the following lines?

	/*eth1: ethernet@2310000 {
		status = "okay";
		fixed-link {
			speed = <1000>;
			full-duplex;
		};
	};*/

Could you try to add it back and check if you still hit EPROBE_DEFER issue during finding ethernet node?

I also tried with ethernet@2310000 and the same problem occurs.

Does the dmesg show the same error?

yes, the same error.

As I stated before, I don’t have this module to help you verifying it locally.
You may ask the vendor for this error reporting from driver.

Or you can refer to kernel/kernel-5.10/Documentation/devicetree/bindings/net/dsa/ksz.txt to configure the device tree.

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