From owner-freebsd-arm@freebsd.org Fri May 22 09:12:12 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F050A32B492 for ; Fri, 22 May 2020 09:12:12 +0000 (UTC) (envelope-from charlesr@scd-systems.net) Received: from mail.scd-systems.net (warbird.scd-systems.net [37.120.173.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.scd-systems.net", Issuer "mail.scd-systems.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49T12z5vsQz43KB for ; Fri, 22 May 2020 09:12:11 +0000 (UTC) (envelope-from charlesr@scd-systems.net) Received: from mail.scd-systems.net (127.0.1.80 [127.0.1.80]) by mail.scd-systems.net (OpenSMTPD) with ESMTP id a5251167 for ; Fri, 22 May 2020 09:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=scd-systems.net; h=from :subject:to:reply-to:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=jLTWbapWTByNHsh4GZv9Wu 2HWEmpl6xVBzvKen2edG4=; b=oUHKoGs9SvQtjtTOn+nIfAUNBWRctBElxJNQJr 8g74POBYpnyiZqTATQU6VkdK6o4nteC/JHNZqwkU19NiAkNapIthdtpLy6P53Ccs SYZEM286oCuAJisBuJ6xaQsWySt2kr3YOWt0VrRoQ2C9GqgtQ+78n5pV4cetgqov 6bj8k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=scd-systems.net; h=from :subject:to:reply-to:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=KiuJInD3kRzH6HNa 9c5RJvqYeGj6G68vkrCBOb83XD6zpQcgxdFI4YCg6+YEtst18Fa2VQ9jWgIQtTdU PO0Vb/DU9fF8D8OweKlvYmgJ5nAPZ81Jh2WfsCVvCHwicJJRE5SS+IIfEf8jf5w6 MaL12tcD5auUkMpi65Oyc2yr9hI= Received: from LT1006.local (127.0.1.254 [127.0.1.254]) by mail.scd-systems.net (OpenSMTPD) with ESMTPSA id 8f9aff84 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO for ; Fri, 22 May 2020 09:12:04 +0000 (UTC) From: Charles Subject: Rock64 dwc interface issues To: freebsd-arm@freebsd.org Reply-To: charlesr@scd-systems.net Message-ID: <877d6e2d-6cd8-30f3-08c3-60a2bacb5873@scd-systems.net> Date: Fri, 22 May 2020 11:12:03 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49T12z5vsQz43KB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=scd-systems.net header.s=default header.b=oUHKoGs9; dmarc=none; spf=pass (mx1.freebsd.org: domain of charlesr@scd-systems.net designates 37.120.173.96 as permitted sender) smtp.mailfrom=charlesr@scd-systems.net X-Spamd-Result: default: False [-2.19 / 15.00]; HAS_REPLYTO(0.00)[charlesr@scd-systems.net]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[scd-systems.net:s=default]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.95)[-0.948]; RCVD_COUNT_THREE(0.00)[3]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_SPAM_SHORT(0.08)[0.076]; DKIM_TRACE(0.00)[scd-systems.net:+]; DMARC_NA(0.00)[scd-systems.net: no valid DMARC record]; NEURAL_HAM_MEDIUM(-0.82)[-0.816]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197540, ipnet:37.120.160.0/19, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2020 09:12:13 -0000 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 metric 0 mtu 1500 options=80008 ether 3a:6f:36:64:e6:9c inet 192.168.178.79 netmask 0xffffff00 broadcast 192.168.178.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=29 dmesg: ---<>--- 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: on ofwbus0 clk_fixed0: on ofwbus0 rk_grf0: mem 0xff100000-0xff100fff on ofwbus0 rk3328_cru0: 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: on ofwbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 regfix2: on ofwbus0 regfix3: on ofwbus0 simple_mfd0: mem 0xff450000-0xff45ffff on ofwbus0 psci0: on ofwbus0 gic0: mem 0xff811000-0xff811fff,0xff812000-0xff813fff,0xff8140s 160 rk_pinctrl0: on ofwbus0 gpio0: mem 0xff210000-0xff2100ff irq 52 on rk_pinctrl0 gpiobus0: on gpio0 gpio1: mem 0xff220000-0xff2200ff irq 53 on rk_pinctrl0 gpiobus1: on gpio1 gpio2: mem 0xff230000-0xff2300ff irq 54 on rk_pinctrl0 gpiobus2: on gpio2 gpio3: mem 0xff240000-0xff2400ff irq 55 on rk_pinctrl0 gpiobus3: on gpio3 rk_i2c0: mem 0xff160000-0xff160fff irq 16 on ofwbus0 iicbus0: on rk_i2c0 rk805_pmu0: at addr 0x30 irq 56 on iicbus0 generic_timer0: 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: mem 0xff250000-0xff2500ff irq 22 on ofwbus0 cpuliseq_dt1: on cpu1 cpu2: on cpulist0 cpufreq_dt2: on cpu2 cpu3: on cpulist0 cpufreq_dt3: on cpu3 uart0: <16750 or compatible> mem 0xff130000-0xff1300ff irq 14 on ofwbus0 uart0: console (-1,n,8,1) iic0: on iicbus0 rockchip_dwmmc0: mem 0xff500000-0xff503fff irq 41 on ofwbus0 rockchip_dwmmc0: Hardware version ID is 270a mmc0: on rockchip_dwmmc0 rockchip_dwmmc1: mem 0xff520000-0xff523fff irq 43 on ofwbus0 rockchip_dwmmc1: Hardware version ID is 270a mmc1: on rockchip_dwmmc1 dwc0: mem 0xff540000-0xff54ffff irq 44 on ofwbus0 miibus0: on dwc0 rgephy0: 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: mem 0xff580000-0xff5bffff irq 46 on ofwbus0 usbus0 on dwcotg0 ehci0: mem 0xff5c0000-0xff5cffff irq 47 on ofwbus0 usbus1: EHCI version 1.0 usbus1 on ehci0 ohci0: mem 0xff5d0000-0xff5dffff irq 48 on ofwbus0 usbus2 on ohci0 gpioc0: on gpio0 gpioc1: on gpio1 gpioc2: on gpio2 gpioc3: on gpio3 gpioled0: on ofwbus0 gpioled0: failed to map pin gpioled0: failed to map pin cryptosoft0: 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: at usbus1 uhub0 on usbus1 uhub0: on usbus0 ugen2.1: at usbus2 uhub2 on usbus2 uhub2: on usbus2 mmcsd0: 32GB 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 = Instruction Set Attributes 1 = <> Processor Features 0 = Processor Features 1 = <> Memory Model Features 0 = 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