Hi all, @WayneWWW
We have replaced the AGX PHY with ksz switch in our custom board. The switch is connected through SPI to the SoM and we are loading the driver manually using modprobe during the bootup (Using a systemd service).
We are able to load the Ethernet switch driver with JAX at the bootup in the above mention method. But when it comes to JAXi, we are seeing some kernel panic while loading the Ethernet driver.
As a work around, we are able to load the Ethernet driver with a delay of around 60sec during bootup.
What is the difference between JAX and JAXi which causes this issue?
Below is the error we are getting related to the Ethernet Switch with the AGX Industrail SoM
[ 7.747497] nvgpu: 17000000.gv11b tpc_pg_mask_store:843 [INFO] no value change, same mask already set
[ 7.762305] ksz9896_dsa: probe() started
[ 7.762367] ksz9897_dsa: ksz_switch_register enter
[ 7.762589] ERROR: could not get clock /spi@c260000:osc(2)
[ 7.763365] ERROR: could not get clock /spi@c260000:osc(2)
[ 7.764245] spi-tegra114 c260000.spi: CpuXfer ERROR bit set 0x8400044
[ 7.764393] spi-tegra114 c260000.spi: CpuXfer 0x43e00827:0x00000000
[ 7.764516] spi-tegra114 c260000.spi: SPI_ERR: CMD_0: 0x43e01827, FIFO_STS: 0x08400044
[ 7.764661] spi-tegra114 c260000.spi: SPI_ERR: DMA_CTL: 0x00000000, TRANS_STS: 0x00ff0040
[ 7.764817] spi-tegra114 c260000.spi: Error in Transfer
[ 7.764945] spi_master spi1: failed to transfer one message from queue
[ 7.765062] retuen value…-5
[ 7.765066] ksz9896_dsa:chip id: ffffffc6
[ 7.765133] ksz9477-switch: probe of spi1.0 failed with error -22
Also I have attached the complete log complete_log.txt (89.6 KB)
Ya the error comes when we load the driver correctly also.
Also while probing the SPI Chip Select line for the Ethernet Switch I have observed some difference between Industrial and Commercial SoMs. The initial state of the chip select line in Industrial SoM is high while it is low for the commercial SoM.
I just to do some check regarding to your “what is difference between AGX and AGXI”. With the help of the error log, it turns out there is a difference in SPI.
On AGXi, there is a SCE-FW using SPI2 controller before kernel is ready. Thus, after kernel is up, you need to wait for a while so that kernel can configure it back to the state which kernel can use.