From owner-freebsd-arm@freebsd.org Fri Jun 19 13:48:40 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 C799D34C4A7 for ; Fri, 19 Jun 2020 13:48:40 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pKs36l4Hz471X for ; Fri, 19 Jun 2020 13:48:39 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-ej1-x643.google.com with SMTP id l27so10306653ejc.1 for ; Fri, 19 Jun 2020 06:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=oKcdVFTiixF/44jwMh9XuhB8NIfobOt0OnEYabHS77A=; b=hw3X7pBqzr70vNIGCrHl4yvE4OlRi0mXZ7tYlU8dSJYckqZh15LScWGqorgBGQ/FKQ MZpLhZK3b5DkMYAn8CK0Z+uSRewtqwAya7uj2iPCNrb7uMvTBKfSpVDPGoXppt4HKI+0 Tf2mW2PUQlg0byFX/Y9lJN6wVr+whG2p+Xv/Gu5tqUXNnLkqbIHqyaPKku48aBS9ijpK eSc7o12t5o7lD9xT+DfPO21Jgdo+26gFMIT4BGefoMGQmm69sKO/jxIw5wGjFijKDoXP JYIt3ZfBtv3lP4EJ2eX6vyr0t4C96SoCsZOuuj6Mwj03honSnzvpboE6kdNQJD7wat8J CDiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=oKcdVFTiixF/44jwMh9XuhB8NIfobOt0OnEYabHS77A=; b=Rxs8MKFj6UWEiqV774YVGy9SzuhPuNFavwTmycXIbmmfHFWriMeZ89kEKpcGgxfn5/ xQS1D0Hm1YoOrw7GKMF9lf6I7lvoXOyECwlKlc4pYEXda14P7hNfP87go2uL4fdBCTKT kQnk2GO55loXAsWbH+S/PeeO3dRKeMcv70ea4RsYJ7mo205bqQBL2YdM5JgunzIjrxKO i3OCSHo9skltYo3PFrTLSYnfJI8OwZmkA558gBfsSI4ODW2sVdZ45VzLJgvA0Lxbcrox 5UQs3C2bwDUDwoLaKnDfw+ft4+38UYfM4Ls2DycF+fEXytMH3lv38zk4OSyKkpDwS1n5 TLWA== X-Gm-Message-State: AOAM5336dAh19olluzhJ8PnNkt04DPXvUnr5QRD8qxkA7BiaSRelFSuz Z9kc900DZEOkSA8lEhH5CI1dZ2yT X-Google-Smtp-Source: ABdhPJwhmhrAKN8WYmQIcIAwhezLLcQ5+sHcMdSIcD6kYNRW/nUpGK71AYo7RF0/4gDmcBD3zIseWQ== X-Received: by 2002:a17:906:7103:: with SMTP id x3mr3514211ejj.363.1592574518367; Fri, 19 Jun 2020 06:48:38 -0700 (PDT) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id sa19sm4904762ejb.15.2020.06.19.06.48.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2020 06:48:37 -0700 (PDT) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Message-Id: <7B4746AD-A8B7-43F0-B5EC-F3812A91F344@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Rock64 dwc interface issues Date: Fri, 19 Jun 2020 15:48:36 +0200 In-Reply-To: <877d6e2d-6cd8-30f3-08c3-60a2bacb5873@scd-systems.net> Cc: freebsd-arm@freebsd.org To: charlesr@scd-systems.net References: <877d6e2d-6cd8-30f3-08c3-60a2bacb5873@scd-systems.net> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49pKs36l4Hz471X X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=hw3X7pBq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sorenschmidt@gmail.com designates 2a00:1450:4864:20::643 as permitted sender) smtp.mailfrom=sorenschmidt@gmail.com X-Spamd-Result: default: False [-2.51 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.72)[-0.716]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.71)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-1.01)[-1.010]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::643:from]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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, 19 Jun 2020 13:48:40 -0000 You might not be alone :) I got my shiny new rockpro64 (yeah a little = different) and it probes the dwc device just fine (todays -current) dwc0: mem 0xfe300000-0xfe30ffff = irq 9 on ofwbus0 miibus0: on dwc0 rgephy0: PHY 0 on = miibus0 rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 rgephy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto rgephy1: PHY 1 on = miibus0 rgephy1: OUI 0x00e04c, model 0x0011, rev. 6 rgephy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto dwc0: bpf attached dwc0: Ethernet address: X:X:X:X:X:X It does not work however, no error msgs or anything, but no traffic = enter or leaves at all. I had a similar issue with the dwc compat chip on the Allwinner R40 = (Bananapi M2 Berry) and got that working, so I=E2=80=99ll se if similar = hacks works here=E2=80=A6 -S=C3=B8ren > On 22 May 2020, at 11.12, Charles wrote: >=20 > Hi, >=20 >=20 > 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) >=20 > The spi from the rock64 board is not flashed and the sd-card is = booting successful FreeBSD. >=20 > But the dwc0 network interface makes trouble. >=20 > 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. >=20 > icmp outout: >=20 > # 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=3D3 ttl=3D64 time=3D0.422 ms > 64 bytes from 192.168.178.79: icmp_seq=3D7 ttl=3D64 time=3D0.295 ms > 64 bytes from 192.168.178.79: icmp_seq=3D8 ttl=3D64 time=3D0.284 ms > 64 bytes from 192.168.178.79: icmp_seq=3D11 ttl=3D64 time=3D0.289 ms > 64 bytes from 192.168.178.79: icmp_seq=3D12 ttl=3D64 time=3D0.282 ms >=20 > tcpdump dump from the rock: >=20 > # 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 >=20 >=20 > Output ifconfig: >=20 > dwc0: flags=3D8843 metric 0 = mtu 1500 > options=3D80008 > 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=3D29 >=20 > dmesg: >=20 > ---<>--- > 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 =3D <64 byte D-cacheline,64 byte = I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG> > Instruction Set Attributes 0 =3D > Instruction Set Attributes 1 =3D <> > Processor Features 0 =3D > Processor Features 1 =3D <> > Memory Model Features 0 =3D > Memory Model Features 1 =3D <8bit VMID> > Memory Model Features 2 =3D <32bit CCIDX,48bit VA> > Trying to mount root from ufs:/dev/ufs/rootfs [rw]... > Debug Features 0 =3D <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 >=20 >=20 > Does anyone know this issue ? >=20 >=20 > Best, >=20 > Charles > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"