Hello, I have a Jetson AGX Orin industrial and I want to connect a switch KSZ9567R through the RGMII interface and use i2c to configurel it. I have compiled the drivers and right now I´m able to see the interfaces whith the “ip a” command:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 5e:fc:9c:38:6e:e9 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1468 qdisc mq state UP group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
7: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
8: lan5@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
9: lan6@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 48:b0:2d:93:ec:47 brd ff:ff:ff:ff:ff:ff
10: l4tbr0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b6:84:fa:02:5a:e5 brd ff:ff:ff:ff:ff:ff
11: rndis0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN group default qlen 1000
link/ether b6:84:fa:02:5a:e5 brd ff:ff:ff:ff:ff:ff
12: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN group default qlen 1000
link/ether b6:84:fa:02:5a:e7 brd ff:ff:ff:ff:ff:ff
I have modified the DT:
#include <dt-bindings/gpio/tegra234-gpio.h>
/ {
eth0:ethernet@2310000 {
status = "okay";
nvidia,mac-addr-idx = <0>;
nvidia,max-platform-mtu = <8000>;
nvidia,pause_frames = <0>;
phy-mode = "rgmii-id";
fixed-link {
speed = <1000>;
full-duplex;
};
};
i2c1:i2c@c240000{
status = "okay";
ksz9567: ksz9567@5f {
compatible = "microchip,ksz9567";
reg = <0x5f>;
status = "okay";
ethernet-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 = "lan6";
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <ð0>;
phy-mode = "rgmii-id";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};
};
After plugging in an ethernet cable the corresponding interface goes up but after manually assigning an IP I´m not able to ping any device in the network and it looks like the network gets saturated. My kernel version is 35.2.1. Here are some logs that may be usefull:
box-ai@tegra-ubuntu:~$ sudo dmesg | grep eth
[sudo] password for box-ai:
[ 0.000000] psci: probing for conduit method from DT.
[ 4.135108] usbcore: registered new interface driver cdc_ether
[ 6.484171] optee: probing for conduit method.
[ 12.941787] nvethernet 2310000.ethernet: Adding to iommu group 51
[ 12.948209] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[ 12.956361] nvethernet 2310000.ethernet: failed to read MDIO address
[ 12.962919] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 12.969832] nvethernet 2310000.ethernet: Failed to read DMA Tx ring size, using default [1024]
[ 12.978689] nvethernet 2310000.ethernet: Failed to read DMA Tx ring size, using default [1024]
[ 12.988133] nvethernet 2310000.ethernet: failed to get phy reset gpio error: -2
[ 12.998935] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:93:ec:47
[ 13.006973] nvethernet 2310000.ethernet: Macsec not enabled
[ 13.012708] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 8000
[ 13.021616] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
[ 15.813764] using random self ethernet address
[ 15.819217] using random host ethernet address
[ 16.100017] nvethernet 2310000.ethernet eth0: Macsec: Reduced MTU: 1468 Max: 8000
[ 17.806212] nvethernet 2310000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 17.847475] using random self ethernet address
[ 17.852106] using random host ethernet address
box-ai@tegra-ubuntu:~$ sudo dmesg | grep ksz
[ 15.909659] ksz9477-switch 1-005f: Found KSZ9477 or compatible
[ 15.940191] ksz9477-switch 1-005f: Port6: using phy mode rgmii-txid
[ 16.018251] ksz9477-switch 1-005f lan1 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[ 16.021367] ksz9477-switch 1-005f lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[ 16.023805] ksz9477-switch 1-005f lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[ 16.026268] ksz9477-switch 1-005f lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[ 16.028680] ksz9477-switch 1-005f lan5 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[ 16.029232] ksz9477-switch 1-005f lan6 (uninitialized): PHY [dsa-0.0:05] driver [Generic PHY] (irq=POLL)
[ 16.033298] ksz9477-switch 1-005f: configuring for fixed/rgmii-id link mode
[ 16.033326] ksz9477-switch 1-005f: Link is Up - 1Gbps/Full - flow control off
[ 16.184240] Modules linked in: snd_soc_tegra186_asrc(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_dspk(E) snd_soc_tegra210_iqc(E) aes_ce_blk(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) crypto_simd(E) snd_soc_tegra210_afc(E) tag_ksz(E) cryptd(E) snd_soc_tegra210_dmic(E) loop(E+) aes_ce_cipher(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_amx(E) ghash_ce(E) ksz9477_i2c(E) sha2_ce(E) snd_soc_tegra210_admaif(E) snd_soc_tegra210_i2s(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_sfc(E) ksz9477(E) snd_soc_tegra_pcm(E) snd_soc_tegra210_adsp(E+) sha256_arm64(E) ksz_common(E) snd_soc_tegra_machine_driver(E) sha1_ce(E) ucsi_ccg(E) snd_soc_tegra_utils(E) snd_soc_simple_card_utils(E) snd_soc_spdif_tx(E) dsa_core(E) typec_ucsi(E) userspace_alert(E) typec(E) snd_hda_codec_hdmi(E) nvadsp(E) nct1008(E) snd_soc_tegra210_ahub(E) snd_soc_rt5640(E) tegra210_adma(E) tegra_bpmp_thermal(E) snd_soc_rl6231(E) snd_hda_tegra(E) snd_hda_codec(E) snd_hda_core(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) ina3221(E)
[ 17.867065] ksz9477-switch 1-005f lan1: configuring for phy/gmii link mode
[ 17.927497] ksz9477-switch 1-005f lan2: configuring for phy/gmii link mode
[ 17.991917] ksz9477-switch 1-005f lan3: configuring for phy/gmii link mode
[ 18.058313] ksz9477-switch 1-005f lan4: configuring for phy/gmii link mode
[ 18.122843] ksz9477-switch 1-005f lan5: configuring for phy/gmii link mode
[ 18.140051] ksz9477-switch 1-005f lan6: configuring for phy/gmii link mode
[ 18.140088] ksz9477-switch 1-005f lan6: Link is Up - 1Gbps/Full - flow control rx/tx
box-ai@tegra-ubuntu:~$ sudo dmesg | grep i2c
[ 4.244186] i2c /dev entries driver
[ 4.247831] tegra-i2c 3160000.i2c: Adding to iommu group 2
[ 4.253605] tegra-i2c c240000.i2c: Adding to iommu group 2
[ 4.259293] tegra-i2c 3180000.i2c: Adding to iommu group 2
[ 4.264958] tegra-i2c 3190000.i2c: Adding to iommu group 2
[ 4.270628] tegra-i2c 31c0000.i2c: Adding to iommu group 2
[ 4.276297] tegra-i2c c250000.i2c: Adding to iommu group 2
[ 4.281957] tegra-i2c 31e0000.i2c: Adding to iommu group 2
[ 4.287682] tegra-i2c 31b0000.i2c: Adding to iommu group 2
[ 15.764756] tegra-i2c 31e0000.i2c: I2C transfer timed out
[ 15.830941] ucsi_ccg 1-0008: i2c_transfer failed -121
[ 16.184240] Modules linked in: snd_soc_tegra186_asrc(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_dspk(E) snd_soc_tegra210_iqc(E) aes_ce_blk(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) crypto_simd(E) snd_soc_tegra210_afc(E) tag_ksz(E) cryptd(E) snd_soc_tegra210_dmic(E) loop(E+) aes_ce_cipher(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_amx(E) ghash_ce(E) ksz9477_i2c(E) sha2_ce(E) snd_soc_tegra210_admaif(E) snd_soc_tegra210_i2s(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_sfc(E) ksz9477(E) snd_soc_tegra_pcm(E) snd_soc_tegra210_adsp(E+) sha256_arm64(E) ksz_common(E) snd_soc_tegra_machine_driver(E) sha1_ce(E) ucsi_ccg(E) snd_soc_tegra_utils(E) snd_soc_simple_card_utils(E) snd_soc_spdif_tx(E) dsa_core(E) typec_ucsi(E) userspace_alert(E) typec(E) snd_hda_codec_hdmi(E) nvadsp(E) nct1008(E) snd_soc_tegra210_ahub(E) snd_soc_rt5640(E) tegra210_adma(E) tegra_bpmp_thermal(E) snd_soc_rl6231(E) snd_hda_tegra(E) snd_hda_codec(E) snd_hda_core(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) ina3221(E)