Date: Fri, 22 May 2020 11:12:03 +0200 From: Charles <charlesr@scd-systems.net> To: freebsd-arm@freebsd.org Subject: Rock64 dwc interface issues Message-ID: <877d6e2d-6cd8-30f3-08c3-60a2bacb5873@scd-systems.net>
next in thread | raw e-mail | index | archive | help
Hi, I am currently trying to setup my Rock64 V2.0 SoC with FreeBSD (Image: http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm64/aarch64/ISO-IMAGES/13.0/FreeBSD-13.0-CURRENT-arm64-aarch64-ROCK64-20200514-r361019.img.xz) The spi from the rock64 board is not flashed and the sd-card is booting successful FreeBSD. But the dwc0 network interface makes trouble. At first I tried to reach the soc by ssh without success, the connection ends into a timeout. Next i tried to reach the board by icmp requests from other machines and i only got approx. every 3-4 packets answered back from the rock. The arp table from the rock64 machine is fine, same on the other side. icmp outout: # ping 192.168.178.79 PING 192.168.178.79 (192.168.178.79): 56 data bytes 64 bytes from 192.168.178.79: icmp_seq=3 ttl=64 time=0.422 ms 64 bytes from 192.168.178.79: icmp_seq=7 ttl=64 time=0.295 ms 64 bytes from 192.168.178.79: icmp_seq=8 ttl=64 time=0.284 ms 64 bytes from 192.168.178.79: icmp_seq=11 ttl=64 time=0.289 ms 64 bytes from 192.168.178.79: icmp_seq=12 ttl=64 time=0.282 ms tcpdump dump from the rock: # tcpdump -i dwc0 -n icmp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on dwc0, link-type EN10MB (Ethernet), capture size 262144 bytes 01:24:30.275479 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 0, length 64 01:24:31.286399 IP truncated-ip - 16384 bytes missing! 192.168.178.21 > 192.168.242.79: ICMP echo request, id 20996, seq 4097, length 16448 01:24:33.400434 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 3, length 64 01:24:33.400533 IP 192.168.178.79 > 192.168.178.21: ICMP echo reply, id 20996, seq 3, length 64 01:24:34.460477 IP truncated-ip - 16384 bytes missing! 192.168.242.21 > 192.168.178.79: ICMP echo request, id 20996, seq 4, length 16448 01:24:35.512486 IP 192.168.178.21 > 192.168.186.79: ICMP echo request, id 20996, seq 5, length 64 01:24:36.572512 IP truncated-ip - 16384 bytes missing! 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 6, length 16448 01:24:37.632534 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 7, length 64 01:24:37.632631 IP 192.168.178.79 > 192.168.178.21: ICMP echo reply, id 20996, seq 7, length 64 01:24:38.688549 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 8, length 64 01:24:38.688640 IP 192.168.178.79 > 192.168.178.21: ICMP echo reply, id 20996, seq 8, length 64 01:24:39.709363 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 9, length 64 01:24:40.711011 IP truncated-ip - 16384 bytes missing! 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 10, length 16448 01:24:41.712351 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 11, length 64 01:24:41.712449 IP 192.168.178.79 > 192.168.178.21: ICMP echo reply, id 20996, seq 11, length 64 01:24:42.775589 IP 192.168.178.21 > 192.168.178.79: ICMP echo request, id 20996, seq 12, length 64 01:24:42.775677 IP 192.168.178.79 > 192.168.178.21: ICMP echo reply, id 20996, seq 12, length 64 Output ifconfig: dwc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 3a:6f:36:64:e6:9c inet 192.168.178.79 netmask 0xffffff00 broadcast 192.168.178.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> dmesg: ---<<BOOT>>--- KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2020 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #0 r361019: Thu May 14 09:26:15 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b) WARNING: WITNESS option enabled, expect reduced performance. VT: init without driver. module firmware already present! KLD file umodem.ko is missing dependencies Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: unblocking device. random: entropy device external interface MAP fbf1b000 mode 2 pages 1 MAP fbf24000 mode 2 pages 1 MAP fbf27000 mode 2 pages 1 MAP fef30000 mode 2 pages 16 WARNING: Device "kbd" is Giant locked and may bware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 clk_fixed0: <Fixed clock> on ofwbus0 rk_grf0: <RockChip General Register Files> mem 0xff100000-0xff100fff on ofwbus0 rk3328_cru0: <Rockchip RK3328 Clock and Reset Unit> mem 0xff440000-0xff440fff on ofwbus0 rk3328_cru0: cannot get parent at idx 6 Cannot set frequency for clk: aclk_bus_pre, error: 34 rk3328_cru0: Failed to set aclk_bus_pre to a frequency of 15000000 Cannot set frequency for clk: aclk_peri_pre, error: 34 rk3328_cru0: Failed to set aclk_peri_pre to a frequency of 15000000 clk_fixed1: <Fixed clock> on ofwbus0 regfix0: <Fixed Regulator> on ofwbus0 regfix1: <Fixed Regulator> on ofwbus0 regfix2: <Fixed Regulator> on ofwbus0 regfix3: <Fixed Regulator> on ofwbus0 simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0xff450000-0xff45ffff on ofwbus0 psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0 gic0: <ARM Generic Interrupt Controller> mem 0xff811000-0xff811fff,0xff812000-0xff813fff,0xff8140s 160 rk_pinctrl0: <RockChip Pinctrl controller> on ofwbus0 gpio0: <RockChip GPIO Bank controller> mem 0xff210000-0xff2100ff irq 52 on rk_pinctrl0 gpiobus0: <OFW GPIO bus> on gpio0 gpio1: <RockChip GPIO Bank controller> mem 0xff220000-0xff2200ff irq 53 on rk_pinctrl0 gpiobus1: <OFW GPIO bus> on gpio1 gpio2: <RockChip GPIO Bank controller> mem 0xff230000-0xff2300ff irq 54 on rk_pinctrl0 gpiobus2: <OFW GPIO bus> on gpio2 gpio3: <RockChip GPIO Bank controller> mem 0xff240000-0xff2400ff irq 55 on rk_pinctrl0 gpiobus3: <OFW GPIO bus> on gpio3 rk_i2c0: <RockChip I2C> mem 0xff160000-0xff160fff irq 16 on ofwbus0 iicbus0: <OFW I2C bus> on rk_i2c0 rk805_pmu0: <RockChip RK805 PMIC> at addr 0x30 irq 56 on iicbus0 generic_timer0: <ARMv8 Generic Timer> irq 4,5,6,7 on ofwbus0 Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000 rk_tsadc0: <RockChip temperature sensors> mem 0xff250000-0xff2500ff irq 22 on ofwbus0 cpuliseq_dt1: <Generic cpufreq driver> on cpu1 cpu2: <Open Firmware CPU> on cpulist0 cpufreq_dt2: <Generic cpufreq driver> on cpu2 cpu3: <Open Firmware CPU> on cpulist0 cpufreq_dt3: <Generic cpufreq driver> on cpu3 uart0: <16750 or compatible> mem 0xff130000-0xff1300ff irq 14 on ofwbus0 uart0: console (-1,n,8,1) iic0: <I2C generic I/O> on iicbus0 rockchip_dwmmc0: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xff500000-0xff503fff irq 41 on ofwbus0 rockchip_dwmmc0: Hardware version ID is 270a mmc0: <MMC/SD bus> on rockchip_dwmmc0 rockchip_dwmmc1: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xff520000-0xff523fff irq 43 on ofwbus0 rockchip_dwmmc1: Hardware version ID is 270a mmc1: <MMC/SD bus> on rockchip_dwmmc1 dwc0: <Rockchip Gigabit Ethernet Controller> mem 0xff540000-0xff54ffff irq 44 on ofwbus0 miibus0: <MII bus> on dwc0 rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseT0baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto dwc0: Ethernet address: 3a:6f:36:64:e6:9c dwcotg0: <DWC OTG 2.0 integrated USB controller> mem 0xff580000-0xff5bffff irq 46 on ofwbus0 usbus0 on dwcotg0 ehci0: <Generic EHCI Controller> mem 0xff5c0000-0xff5cffff irq 47 on ofwbus0 usbus1: EHCI version 1.0 usbus1 on ehci0 ohci0: <Generic OHCI Controller> mem 0xff5d0000-0xff5dffff irq 48 on ofwbus0 usbus2 on ohci0 gpioc0: <GPIO controller> on gpio0 gpioc1: <GPIO controller> on gpio1 gpioc2: <GPIO controller> on gpio2 gpioc3: <GPIO controller> on gpio3 gpioled0: <GPIO LEDs> on ofwbus0 gpioled0: <power> failed to map pin gpioled0: <standby> failed to map pin cryptosoft0: <software crypto> Timecounters tick every 1.000 msec usbus0: 480Mbps High Speed USB v2.0 usbus1: 480Mbps High Speed USB v2.0 usbus2: 12Mbps Full Speed USB v1.0 Obsolete code will be removed soon: random(9) is the obsolete Park-Miller LCG from 1988 ugen1.1: <Generic EHCI root HUB> at usbus1 uhub0 on usbus1 uhub0: <Generiaddr 1> on usbus0 ugen2.1: <Generic OHCI root HUB> at usbus2 uhub2 on usbus2 uhub2: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2 mmcsd0: 32GB <SDHC SL32G 8.0 SN 0C4A1E4B MFG 08/2016 by 3 SD> at mmc0 50.0MHz/4bit/2048-block mmc1: No compatible cards found on bus Release APs...done CPU 0: ARM Cortex-A53 r0p4 affinity: 0 Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG> Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL> Instruction Set Attributes 1 = <> Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32> Processor Features 1 = <> Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA> Memory Model Features 1 = <8bit VMID> Memory Model Features 2 = <32bit CCIDX,48bit VA> Trying to mount root from ufs:/dev/ufs/rootfs [rw]... Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8> Debug FeatureCortex-A53 r0p4 affinity: 3 WARNING: WITNESS option enabled, expect reduced performance. Warning: no time-of-day clock registered, system time will not be set accurately uhub2: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered uhub0: 1 port with 1 removable, self powered lo0: link state changed to UP dwc0: link state changed to DOWN dwc0: link state changed to UP Does anyone know this issue ? Best, Charles
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?877d6e2d-6cd8-30f3-08c3-60a2bacb5873>