how to config sja1105 to work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to config sja1105 to work

2,364 Views
hw_zw
Contributor I

now i'm using sja1105 with linux4.14.0

i see the kernel v5.2 has sja1105 driver

but 4.14 Has not yet been

i serach the sja1105-tool from github

when i use

root@autobrain:~# sja1105-tool config save bug.xml
Staging area /lib/firmware/sja1105.bin does not exist!
root@autobrain:~# ls /dev/spidev1.0
/dev/spidev1.0
root@autobrain:~# ls /dev/spidev1.0 -l
crw------- 1 root root 153, 0 Jan 1 1970 /dev/spidev1.0
root@autobrain:~#
root@autobrain:~# sja1105-tool config default ls1021atsn
could not open /lib/firmware/sja1105.bin for write
root@autobrain:~# sja1105-tool status general
Unrecognized Device ID 0xffffffff
sja1105_spi_configure failed
root@autobrain:~#
root@autobrain:~# uname -a
Linux autobrain 4.14.0-xilinx #2 SMP PREEMPT Tue Sep 3 16:42:53 CST 2019 armv7l GNU/Linux
root@autobrain:~#

So

What can I do to drive sja1105 to work

thanks a lot

0 Kudos
3 Replies

1,859 Views
bpe
NXP Employee
NXP Employee

 
 
There is no kernel-space driver for SJA1105EL/TEL. For P/Q/R/S models
you can find the driver here

https://source.codeaurora.org/external/autoivnsw/sja1105x_linux_switchdev/

As of the tool you are trying to use, it requires an SPIDEV driver,
which seems to be there, but your switch is not properly responding
(Unrecognized Device ID 0xffffffff). The suggestion is to make sure
that the switch is connected to the appropriate SPI Slave Select
line. If your platform supports Device Tree, make sure the Device
Tree properly reflects the connection. More information can be found
here:

https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/Documentation/devicetree/bi...

Hope this helps,
Platon

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,859 Views
hw_zw
Contributor I

hi

   thanks a lot for your suggestion

   i found  the driver support device  is sja1105QS and sja1105PR

   but my device is sja1105EL

   so i add my device id in driver code

QQ图片20190920095909.png

and then i found the platform_independent dir can use python to generate the firmware.bin

our hardware design is the port 0 connect to phy and port 4 connect to soc mac

QQ图片20190920100239.png

so i modify the cfg_applicationBoard.py

QQ图片20190920100704.png

but the console just display

QQ图片20190920100828.png

i will try my best to debug it

if u see this problem , please help me

thanks a lot

0 Kudos

1,859 Views
bpe
NXP Employee
NXP Employee

The driver you are trying to utilize is _not_ valid for SJA1105EL.
Merely correcting the device IDs is not sufficient because SJA1105EL/TEL
and SJA1105P/Q/R/S are not software compatible.

Regards,

Platon

0 Kudos