S32G SJA1110 enable

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

S32G SJA1110 enable

Jump to solution
3,909 Views
Rece
Contributor II

I'm testing 100Base-t1 network on S32GRDB2 with GoldVIP-1.1.0 but it never work. I check the dip switch mentioned in the user manual and no help. There are some weird SJA1110 error in the boot message seems the 'sja1110_uc.bin' has invalid status header.

Missing something?

[ 4.588766] sja1110 spi5.0: probing uc
[ 4.589003] sja1110 spi5.1: probing switch
[ 4.589456] sja1110 spi5.1: Could not get GPIO from device tree
[ 4.591592] sja1110 spi5.1: [sja1110_post_probe_upload_worker] Trying to initialize switch
[ 4.592646] sja1110 spi5.1: [sja1110_init_hw] loaded fw 'sja1110_switch.bin'
[ 4.592786] sja1110 spi5.1: [sja1110_pre_switch_upload] Found switch config of size 2236
[ 4.593017] sja1110 spi5.1: Uploading config...
[ 4.615605] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 4.636165] sja1110 spi5.1: Successfully configured!
[ 4.636216] sja1110 spi5.0: [sja1110_post_probe_upload_worker] Trying to initialize uC
[ 4.651571] sja1110 spi5.0: [sja1110_init_hw] loaded fw 'sja1110_uc.bin'
[ 4.651595] sja1110 spi5.0: [sja1110_pre_uc_upload] Found firmware of size 320272
[ 4.651732] sja1110 spi5.0: [sja1110_pre_uc_upload] firmware appears to be valid
[ 4.651811] sja1110 spi5.0: [sja1110_pre_uc_upload] \xc2\xb5C not ready for download (Status=0x31)
[ 4.651885] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.651892] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.651899] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.651970] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.651977] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.651983] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652055] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652062] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652068] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652139] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652147] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652153] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652223] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652231] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652237] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status

[ 4.652309] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652316] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652323] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652392] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652399] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652406] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652476] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652483] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652489] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652560] sja1110 spi5.0: [sja1110_uc_parse_status] Invalid status header (0xfb)
[ 4.652567] sja1110 spi5.0: [sja1110_uc_read_status] Parsing uC status failed with -22
[ 4.652573] sja1110 spi5.0: [sja1110_pre_uc_upload] Could not read \xc2\xb5C status
[ 4.652578] sja1110 spi5.0: checking firmware failed with -22

Labels (1)
Tags (2)
0 Kudos
1 Solution
3,866 Views
nxf45013
NXP Employee
NXP Employee

Hi,

The appendix is used only for reference in terms of DIP switches positioning. The setting you have does not allow Linux to load the SJA firmware. Please set the DIP switches from SW12 to 1-1 position instead of 1-0.

Vlad 

View solution in original post

9 Replies
2,887 Views
fenghua_jiang
Contributor IV

Hello,

   the kernel source :https://source.codeaurora.org/external/autobsps32/linux/?h=release/bsp33.0-5.10.109-rt

   where is the drive of sja1110 ?

regards,

jiang

0 Kudos
2,841 Views
gmocanu
NXP Employee
NXP Employee

Hello,

 

The SJA1110 Linux driver can be found at: https://source.codeaurora.org/external/autoivnsw/sja1110_linux

It is referenced by the corresponding yocto recipe at https://source.codeaurora.org/external/autobsps32/meta-alb/tree/recipes-kernel/sja1110/sja1110_1.0.b...

 

Best regards,

George

0 Kudos
3,843 Views
Rece
Contributor II

Hi @nxf45013,

There are other questions.

  1. After the firmware in GoldVIP-1.1.0 upload successfully, I found the 100Base-T1 connection still cannot establish.
  2. I also try SJA1110 SDK in S32DS, the example application will generate switch_config_s32g_vnp_rdb.elf. Is it related to sja1110_uc.bin or sja1110_switch.bin?

Thanks

0 Kudos
3,808 Views
nxf45013
NXP Employee
NXP Employee

Hi, @Rece,

Before we continue with your question, I'd like to point out some things: 
1. The SJA binary delivered in GoldVIP offers extra functionality (connection to the Greengrass client running on the V2Xdomu).

2. The SJA binary is not mandatory (leaving SW12 to 1-0 position) means that the default firmware (from flash) will run on the device instead of the SJA binary which is offered in GoldVIP. 

In GoldVIP, the PFE0 is connected through the SJA switch. Could you try that connection from Linux, for the moment? Do you see any packets on the interface? 

Vlad

3,719 Views
Rece
Contributor II

Hi Vlad @nxf45013 ,

Thanks for the clarification.

I put the SW12 back to 1-0.

The pfe0 can get ip address through dhcp, so I think it works.

root@s32g274ardb2:~# udhcpc -i pfe0
udhcpc: started, v1.32.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.0.101
udhcpc: lease of 192.168.0.101 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.0.1
root@s32g274ardb2:~# ip addr show pfe0
6: pfe0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:01:be:be:ef:11 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.101/24 brd 192.168.0.255 scope global pfe0
valid_lft forever preferred_lft forever
inet6 fe80::201:beff:febe:ef11/64 scope link
valid_lft forever preferred_lft forever
root@s32g274ardb2:~#

0 Kudos
3,901 Views
nxf45013
NXP Employee
NXP Employee

Hi, 

It seems that SW12 is not set to the 1-1 position, from your log. 

Please consult the Appendix B for the switch position on the RDB. 

Vlad

3,882 Views
Rece
Contributor II

Hi,

Thanks for your reply,

 

attachment is the sw12 config on my board, i think its same as appendix B.

 

90733.jpg

0 Kudos
3,867 Views
nxf45013
NXP Employee
NXP Employee

Hi,

The appendix is used only for reference in terms of DIP switches positioning. The setting you have does not allow Linux to load the SJA firmware. Please set the DIP switches from SW12 to 1-1 position instead of 1-0.

Vlad 

3,854 Views
Rece
Contributor II

Thanks, it works!

[ 4.715220] sja1110 spi5.1: Successfully configured!
[ 4.715272] sja1110 spi5.0: [sja1110_post_probe_upload_worker] Trying to initialize uC
[ 4.731373] sja1110 spi5.0: [sja1110_init_hw] loaded fw 'sja1110_uc.bin'
[ 4.731392] sja1110 spi5.0: [sja1110_pre_uc_upload] Found firmware of size 320272
[ 4.731480] sja1110 spi5.0: [sja1110_pre_uc_upload] firmware appears to be valid
[ 4.731530] sja1110 spi5.0: [sja1110_pre_uc_upload] \xc2\xb5C not ready for download (Status=0x31)
[ 4.731770] sja1110 spi5.0: Uploading firmware...
[ 5.849629] sja1110 spi5.0: Upload successfully verified!

0 Kudos