OpenNuvoton/NUC980-linux-4.4.y

W5100s driver and device tree

hongduc10 opened this issue · 1 comments

Board: NUC980-ETH2UART
Ethernet module: WIZ810Sio
Driver: From linux kernel 4.7 w5100.zip
Device tree: nuc980-eth2uart.dts.txt

I want to use W5100s as main SPI ethernet driver with board NUC980-ETH2UART
Wring:

  • SPI0. PD8 (CSn), PD9 (CLK) , PD10 (MOSI), PD11(MISO)
  • INTn: PE12
  • RSTn: PG9

I have try to bringup this board. The driver seem that it can be recognized by linux kernel.
I can use 2 command below, if I disconnected one wire, the 2 command will be invalid

ifconfig eth2 up
ifconfig eth2 192.168.0.100

But due to the INTn and RSTn is not defined in device tree, so I cannot ping to PC ---> The connection is not okay.
I have tried to find the sample of config the interrupt but not found.

Do you have any sample or the same experience with W5100/W5500 SPI?

The log if i ping another IP:


------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:306 dev_watchdog+0x2bc/0x2e0()
NETDEV WATCHDOG: eth2 (w5100): transmit queue 0 timed out
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.207 #16
Hardware name: Nuvoton NUC980 (Device Tree)
Backtrace:
[<c0012ec0>] (dump_backtrace) from [<c00130ac>] (show_stack+0x18/0x1c)
 r6:c02a2590 r5:c03cb120 r4:00000000 r3:00000000
[<c0013094>] (show_stack) from [<c0170ed8>] (dump_stack+0x20/0x28)
[<c0170eb8>] (dump_stack) from [<c001eb38>] (warn_slowpath_common+0x80/0xb8)
[<c001eab8>] (warn_slowpath_common) from [<c001eba8>] (warn_slowpath_fmt+0x38/0x                                                                                                             40)
 r8:ffffffff r7:c0677b0e r6:c0661240 r5:c2d23000 r4:00000000
[<c001eb74>] (warn_slowpath_fmt) from [<c02a2590>] (dev_watchdog+0x2bc/0x2e0)
 r3:c2d23000 r2:c03cb138
[<c02a22d4>] (dev_watchdog) from [<c0058ec8>] (call_timer_fn+0x2c/0xa4)
 r9:c0661240 r8:00000000 r7:00000200 r6:c0660a20 r5:c02a22d4 r4:00000101
[<c0058e9c>] (call_timer_fn) from [<c005971c>] (run_timer_softirq+0x1b0/0x2bc)
 r6:c0660a20 r5:c0646000 r4:c2d2322c
[<c005956c>] (run_timer_softirq) from [<c002164c>] (__do_softirq+0xac/0x224)
 r10:00000101 r9:c0678280 r8:c0646000 r7:40000001 r6:00000001 r5:c0678284
 r4:00000000
[<c00215a0>] (__do_softirq) from [<c0021a88>] (irq_exit+0xa8/0x100)
 r10:c040fa28 r9:c0648000 r8:00000000 r7:00000000 r6:00000000 r5:c0663b28
 r4:00000000
[<c00219e0>] (irq_exit) from [<c004bb08>] (__handle_domain_irq+0x74/0xcc)
 r4:00000000 r3:c0646000
[<c004ba94>] (__handle_domain_irq) from [<c0009024>] (asm_do_IRQ+0x24/0x28)
 r8:c0677a22 r7:c0647f3c r6:f0000000 r5:60000013 r4:c0010d14 r3:c0647f08
[<c0009000>] (asm_do_IRQ) from [<c0013ab0>] (__irq_svc+0x30/0x70)
Exception stack(0xc0647f08 to 0xc0647f50)
7f00:                   00000000 0005317f 0005217f 60000013 c0646000 c064806c
7f20: c064806c c0677a22 c0677a22 c0648000 c040fa28 c0647f64 600000d3 c0647f58
7f40: c0010d1c c0010d14 60000013 ffffffff
[<c0010ce8>] (arch_cpu_idle) from [<c0044da0>] (default_idle_call+0x28/0x3c)
[<c0044d78>] (default_idle_call) from [<c0044e84>] (cpu_startup_entry+0xd0/0x128                                                                                                             )
[<c0044db4>] (cpu_startup_entry) from [<c0313010>] (rest_init+0x78/0x90)
 r7:ffffffff r3:c0646000
[<c0312f98>] (rest_init) from [<c03f1c9c>] (start_kernel+0x35c/0x3d0)
 r4:c0677b90 r3:c0646000
[<c03f1940>] (start_kernel) from [<00008048>] (0x8048)
---[ end trace d739aa0f1741619b ]---