SJA1105S No Communications

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

SJA1105S No Communications

Jump to solution
2,057 Views
mtcastle
Contributor II

I am trying to bring up a custom board using a SJA1105s and I cannot get any traffic to go through the system.


Architecture:

  • CPU: AT91SAMA5d36
  • MAC Switch: SJA1105s
  • Exterior PHY: Marvell 88E1512
  • See connection diagram below
  • The SJA is the only item connected to SPI0

Software Info:

  • I am using the Linux4SAM kernel
  • The kernel/device tree is made with buildroot
  • Linux recognizes the SJA1105 and starts the driver

 

My Findings:

Linux believes it is sending data out of the system and TX packet counters will increment, there are no RX packets. However I am not seeing any information data out of the system. I have probed both the RX and TX lines on the PHY and can see RX data coming in (data into the switch) but no data on the TX line (Data leaving the switch). I do not have acsess to the RX/TX lines between CPU and SJA to see what is happening there.

The SJA1105 driver recognizes the PHY as a 88E1510, the same family but without SGMII. Looking at the Marvell driver it seems to indicate they are the same software wise.

The SJA1105 driver does notify when the Ethernet cord is removed/replugged, so it appears it is monitoring the PHY.

 

My Concerns/Problems:

edit:

The driver sets the host port to 1 which is connected to the CPU.

The SJA1105 driver sets the host port to port 0, all implementations seem to have port 0 be the port connected to the CPU. My design does not, is this an issue? Can it be solved with a change to the device tree or something in the driver? Does this require a board revision to debug?

The driver marks all untagged packets to be dropped. Does this mean I need to configure a VLAN system with tagging on the CPU? I attempted to follow the startup scripts used by LS1021A-TSN-RD. I did not notice any info about VLAN tagging.

 

Thank you in advance,

Let me know if you need anymore information from me.

 

The connections look like this:

 

 

        ┌──────────────────────────────┐
        │                              │
        │                              │
        │                              │
        │                              │
        │                              │
        │                  ┌───────────┴───────────────┐
        │                  │         SPI               │
  ┌─────▼─────────┐        │                           │
  │   SPI         │        │                           │
  │               │        │M                          │
  │              1◄────────┤A                          │
  │    SJA1105    │        │C                          │
  │               │        │        CPU                │
  │               │        │        ATSAMA5d36         │
  │               │        │                           │
  │       0       │        │                           │
  └───────┬───────┘        │                           │
          │                │        MDIO               │
          │                └──────────┬────────────────┘
          │                           │
          │                           │
          │                           │
┌─────────▼────────┐                  │
│       RGMII      │                  │
│                  │                  │
│   PHY            │                  │
│   88E1512       M│                  │
│                 D◄──────────────────┘
│                 I│
│                 O│
│                  │
└───────┬──────────┘
        │
        │
        │
        │
        │
        │
        │
        │
        │
        └► OUT

 

 

The device tree:

 

 

&macb0 {
	phy-mode = "rgmii-id";
	fsl,spi-cs-sck-delay = <1000>;
	fsl,spi-sck-cs-delay = <1000>;	
	status = "okay";
	fixed-link {
		speed = <1000>;
		full-duplex;
	};
	mdio{
		#address-cells = <1>;
		#size-cells = <0>;
		t1phy0: ethernet-phy@0{//may not need the driver specified
			compatible = "ethernet-phy-ieee802.3-c22", "marvell,88e1512";
			reg = <0x0>;
		};
	};
		
};

&spi0 {//Ethernet Switch
	pinctrl-names = "default", "cs";
    pinctrl-1 = <&pinctrl_spi0_cs>;
    cs-gpios = <&pioD 13 0>;
	status = "okay";
	
	
	//5 port switch
	sja1105@0 {
		compatible = "nxp,sja1105s";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x0>;
		spi-max-frequency = <44000000>;//44MHz
		fsl,spi-cs-sck-delay = <1000>;
		fsl,spi-sck-cs-delay = <1000>;	
		
		//specify for spi mode 1
		//spi-cpol;//cpol not needed
		spi-cpha;//shifted clock phase
		
		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {//Ethernet out 
				reg = <0>;
				label = "lan1";
				phy-handle = <&t1phy0>;
				phy-mode = "rgmii-id";
			};
			port@1 {//MAC
				label = "cpuMAC";
				phy-mode = "rgmii-id";
				reg = <1>;
				ethernet = <&macb0>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};

			
		};
	};
};

 

 

 

 

 

 

 

 

 

 

 

1 Solution
1,581 Views
mtcastle
Contributor II
Thank you for all of your support. We have decided to move onto a different switch.

View solution in original post

0 Kudos
Reply
9 Replies
1,618 Views
mtcastle
Contributor II

Here is the log. The issue is the log seems to indicate the switch is up and is active. However, no packets can be sent through the switch. I am not seeing any data pass out of lan1 nor do I see any traffic in linux (eth0).

atmel_spi: Using dma0chan4 (tx) and dma0chan5 (rx) for DMA transfers
sja1105@0 enforce active low on chipselect handle
sja1105 spi0.0: Probed switch chip: SJA1105S
sja1105 spi0.0: Port 2 interpreting RGMII delay settings based on "phy-mode" property, please update device tree to specify "rx-internal-delay-ps" and "tx-internal-delay-ps"
sja1105 spi0.0: Port 3 interpreting RGMII delay settings based on "phy-mode" property, please update device tree to specify "rx-internal-delay-ps" and "tx-internal-delay-ps"
macb ethernet eth0: Cadence GEM rev 0x00020119 at 0xf0028000 irq 30 (02:10:a0:94:77:20)

sja1105 spi0.0: Probed switch chip: SJA1105S
sja1105 spi0.0: Port 2 interpreting RGMII delay settings based on "phy-mode" property, please update device tree to specify "rx-internal-delay-ps" and "tx-internal-delay-ps"
sja1105 spi0.0: Port 3 interpreting RGMII delay settings based on "phy-mode" property, please update device tree to specify "rx-internal-delay-ps" and "tx-internal-delay-ps"
sja1105 spi0.0: configuring for fixed/rgmii-id link mode
sja1105 spi0.0: Link is Up - 1Gbps/Full - flow control off
sja1105 spi0.0 lan1 (uninitialized): PHY [f0028000.ethernet-ffffffff:00] driver [Marvell 88E1510] (irq=POLL)
device eth0 entered promiscuous mode

DSA: tree 0 setup

Starting network: macb f0028000.ethernet eth0: configuring for fixed/rgmii link mode
macb f0028000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
OK
sja1105 spi0.0 lan1: configuring for phy/rgmii-id link mode
sja1105 spi0.0 lan2: configuring for fixed/rgmii-id link mode
sja1105 spi0.0 lan2: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): lan2: link becomes ready
sja1105 spi0.0 lan3: configuring for fixed/rgmii-id link mode
sja1105 spi0.0 lan3: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): lan3: link becomes ready
write 1 to vlan_filtering to enable VLAN filtering
br0: port 1(lan1) entered blocking state
br0: port 1(lan1) entered disabled state
device lan1 entered promiscuous mode
br0: port 2(lan2) entered blocking state
br0: port 2(lan2) entered disabled state
device lan2 entered promiscuous mode
br0: port 3(lan3) entered blocking state
br0: port 3(lan3) entered disabled state
device lan3 entered promiscuous mode
br0: port 3(lan3) entered blocking state
br0: port 3(lan3) entered forwarding state
br0: port 2(lan2) entered blocking state
br0: port 2(lan2) entered forwarding state

sja1105 spi0.0 lan1: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
br0: port 1(lan1) entered blocking state
br0: port 1(lan1) entered forwarding state

 

 

 

0 Kudos
Reply
1,609 Views
SebastianG
NXP TechSupport
NXP TechSupport
Also, you can share with me a .pcap file during packet transmission.
0 Kudos
Reply
1,582 Views
mtcastle
Contributor II
Thank you for all of your support. We have decided to move onto a different switch.
0 Kudos
Reply
1,662 Views
SebastianG
NXP TechSupport
NXP TechSupport

Hello @mtcastle,

Apologies for the delayed response

Just to let you know that I am still working on your questions, I will let you know as soon as I have an update.

Thank you so much for your patience

 

Regards,

Sebastian

0 Kudos
Reply
1,887 Views
SebastianG
NXP TechSupport
NXP TechSupport

Hello @mtcastle,

Could you please share with me the schematics of your board?

Regards,

Sebastian

1,788 Views
mtcastle
Contributor II
Update:
The host port is being set to port 1(the CPU). I was incorrectly displaying that information.
0 Kudos
Reply
1,876 Views
mtcastle
Contributor II
Sent in a private message
0 Kudos
Reply
1,628 Views
SebastianG
NXP TechSupport
NXP TechSupport
Spoiler
 

Hello @mtcastle,

The schematic appears to be connected properly,

Can you send me a log when the error or situation occurs?

Regards,

Sebastian

0 Kudos
Reply
1,957 Views
SebastianG
NXP TechSupport
NXP TechSupport

Hello @mtcastle,

I would like to inform you that I'm working on your question, I will let you know as soon as I have an update.

Thank you so much for your patience

Regards,

Sebastian

0 Kudos
Reply