UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
93 Views
Registered: ‎08-04-2016

ZynqMP connected to ethernet switch

Hello,

We have a custom board with ZU19 FPGA. The GEM0 port is connected to an ethernet switch, KSZ9897. The switch is connected to the FPGA over i2c and is controlled by an i2c driver. The device tree entry looks like this -

 

&gem0 {
	status = "okay";
	phy-handle = <&i2c_ksz9897>;
	phy-mode = "rgmii-txid";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gem0_default>;
	xlnx,ptp-enet-clock = <0x0>;
	local-mac-address = [00 0a 35 00 02 90];
};

&i2c0 {
	status = "okay";
	clock-frequency = <100000>;
	pinctrl-names = "default", "gpio";
	pinctrl-0 = <&pinctrl_i2c0_default>;
	pinctrl-1 = <&pinctrl_i2c0_gpio>;
	scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
	sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
	#address-cells = <1>;
	#size-cells = <0>;

	i2c_ksz9897: ksz9897@5f{
		compatible = "microchip,ksz9897";
		reg = <0x5f>;
		phy-mode = "rgmii-txid";

		interrupt-parent = <&gic>;
		interrupts = <0 89 0>;
		status = "okay";
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				label = "lan1";
			};
			port@1 {
				reg = <1>;
				label = "lan2";
			};
			port@2 {
				reg = <2>;
				label = "lan3";
			};
			port@3 {
				reg = <3>;
				label = "lan4";
			};
			port@4 {
				reg = <4>;
				label = "lan5";
			};
			port@5 {
				reg = <5>;
				label = "DA_FPGA";
				ethernet = <&gem0>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
			port@6 {
				reg = <6>;
				label = "lan6";
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

Now, the switch is getting enumerated as an i2c device and it in /sys/class/i2c/devices/0-005f/ the 7 ethernet ports are visible. But, no eth port is visible in ifconfig. The dmesg doesn't throw any error either.

 

Are we missing something? Is the device tree correct?

0 Kudos