Hi,

On Sat, Dec 29, 2018 at 11:10:05PM +0100, Mark Kettenis wrote:
> > Date: Sat, 29 Dec 2018 16:06:51 +0100
> > From: Aldo Mazzeo <aldo.maz...@gmail.com>
> > 
> > If anybody can guide me in the process, I could try to do it, as I have 
> > exactly the same issue
> 
> Here is a a dtb file that enables the USB3 port:
> 
>   https://sibelius.home.xs4all.nl/firmware/rk3328-rock64/rk3328-rock64.dtb
> 
> Of the USB2 ports the bottom one works, but the top one doesn't seem
> to work.  I think the top port is the OTG port, which is implemented
> using a dwc2 controller.  While we do have a driver for that
> conrtroller it probably doesn't work for this hardware.  The driver
> doesn't work very well anyway, so you're probably better off ignoring
> that port.
> 

Picking up this old thread: I've installed the dtb on my Rock64
running the snapshot from Feb 5.  It enables the additinal USB, the
rkclock, "apm", and it seems that RSA is twice as fast, but it somehow
breaks networking via dwge0.

I noticed that with the dtb, ssh -v to the rock64 shows progress but
runs *very* slow and even after login I don't manage to use the
session.  I can ping but the delay to the next hop drops down from
0.xms to about 2ms.  tcpbench and other real networking are totally
unusable.

I tried with and without apm -H (408MHz vs. 1296MHz) without seeing
any improvement.  Disabling apm0 or rkclock0 doesn't helper either.

Any idea how to debug this?

Reyk

--- dmesg.without-rk3328-rock64.dtb     Wed Feb  6 12:12:06 2019
+++ dmesg.with-rk3328-rock64.dtb        Wed Feb  6 12:14:23 2019
@@ -1,7 +1,7 @@
 OpenBSD 6.4-current (GENERIC.MP) #421: Tue Feb  5 16:32:10 MST 2019
     dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
-real mem  = 4213796864 (4018MB)
-avail mem = 4050694144 (3863MB)
+real mem  = 4212244480 (4017MB)
+avail mem = 4049178624 (3861MB)
 mainbus0 at root: Pine64 Rock64
 cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
 cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
@@ -11,56 +11,32 @@ efi0: Das U-boot rev 0x0
 apm0 at mainbus0
 psci0 at mainbus0: PSCI 1.0
 syscon0 at mainbus0: "syscon"
-syscon1 at mainbus0: "power-management"
+"io-domains" at syscon0 not configured
+"grf-gpio" at syscon0 not configured
+"power-controller" at syscon0 not configured
+"reboot-mode" at syscon0 not configured
 rkclock0 at mainbus0
-rkclock_set_parent: 0x000000b4
-rkclock_set_frequency: 0x000000c4
-rkclock_set_frequency: 0x000000c5
-rkclock_set_frequency: 0x000000ca
-rkclock_set_frequency: 0x000000c1
-rkclock_set_frequency: 0x000000bf
-rkclock_set_frequency: 0x000000c6
-rkclock_set_frequency: 0x000000c8
-rkclock_set_frequency: 0x000000c9
-rkclock_set_frequency: 0x000000c4
-rkclock_set_frequency: 0x000001ac
-rkclock_set_frequency: 0x0000013c
-rkclock_set_frequency: 0x000000c5
-rkclock_set_frequency: 0x00000198
-rkclock_set_frequency: 0x0000014a
-rkclock_set_frequency: 0x000000ca
-rkclock_set_frequency: 0x000001a9
-rkclock_set_frequency: 0x000000c1
-rkclock_set_frequency: 0x00000045
-rkclock_set_frequency: 0x000000bf
-rkclock_set_frequency: 0x000000c6
-rkclock_set_frequency: 0x000000c8
-rkclock_set_frequency: 0x000000c9
-rkclock_set_frequency: 0x0000003e
-rkclock_set_frequency: 0x00000149
-rkclock_set_frequency: 0x000000ce
-rkclock_set_frequency: 0x00000140
-rkclock_set_frequency: 0x00000061
-syscon2 at mainbus0: "syscon-usb"
-"usb2-phy" at syscon2 not configured
+syscon1 at mainbus0: "syscon"
+"usb2-phy" at syscon1 not configured
 ampintc0 at mainbus0 nirq 160, ncpu 4 ipi: 0, 1: "interrupt-controller"
 rkpinctrl0 at mainbus0: "pinctrl"
 rkgpio0 at rkpinctrl0
 rkgpio1 at rkpinctrl0
 rkgpio2 at rkpinctrl0
 rkgpio3 at rkpinctrl0
+simplebus0 at mainbus0: "amba"
+"dmac" at simplebus0 not configured
 agtimer0 at mainbus0: tick rate 24000 KHz
 com0 at mainbus0: ns16550, no working fifo
 com0: console
 rkiic0 at mainbus0
 iic0 at rkiic0
 rkpmic0 at iic0 addr 0x18: RK805
-simplebus0 at mainbus0: "amba"
-"dmac" at simplebus0 not configured
+rktemp0 at mainbus0
 dwmmc0 at mainbus0: 50 MHz base clock
-sdmmc0 at dwmmc0: 8-bit, mmc high-speed, dma
+sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
 dwmmc1 at mainbus0: 50 MHz base clock
-sdmmc1 at dwmmc1: 4-bit, sd high-speed, mmc high-speed, dma
+sdmmc1 at dwmmc1: 8-bit, mmc high-speed, dma
 dwge0 at mainbus0
 dwge0: address: ea:61:d0:db:bf:44
 rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
@@ -68,6 +44,10 @@ ehci0 at mainbus0
 usb0 at ehci0: USB revision 2.0
 uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 
2.00/1.00 addr 1
 ohci0 at mainbus0: version 1.0
+rkdwusb0 at mainbus0: "usb"
+xhci0 at rkdwusb0, xHCI 1.10
+usb1 at xhci0: USB revision 3.0
+uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 
3.00/1.00 addr 1
 cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
 cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
 cpu1: 256KB 64b/line 16-way L2 cache
@@ -77,10 +57,10 @@ cpu2: 256KB 64b/line 16-way L2 cache
 cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
 cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
 cpu3: 256KB 64b/line 16-way L2 cache
-usb1 at ohci0: USB revision 1.0
-uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 
1.00/1.00 addr 1
-sdmmc0: can't enable card
-scsibus0 at sdmmc1: 2 targets, initiator 0
+usb2 at ohci0: USB revision 1.0
+uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev 
1.00/1.00 addr 1
+sdmmc1: can't enable card
+scsibus0 at sdmmc0: 2 targets, initiator 0
 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC16G, 0080> SCSI2 0/direct removable
 sd0: 15193MB, 512 bytes/sector, 31116288 sectors
 vscsi0 at root
@@ -90,4 +70,3 @@ scsibus2 at softraid0: 256 targets
 bootfile: sd0a:/bsd
 boot device: sd0
 root on sd0a (48a8f55f5bd5cba3.a) swap on sd0b dump on sd0b
-cpu0: clock not implemented

Without rk3328-rock64.dtb:

OpenBSD 6.4-current (GENERIC.MP) #421: Tue Feb  5 16:32:10 MST 2019
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4213796864 (4018MB)
avail mem = 4050694144 (3863MB)
mainbus0 at root: Pine64 Rock64
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.0.5
efi0: Das U-boot rev 0x0
apm0 at mainbus0
psci0 at mainbus0: PSCI 1.0
syscon0 at mainbus0: "syscon"
syscon1 at mainbus0: "power-management"
rkclock0 at mainbus0
rkclock_set_parent: 0x000000b4
rkclock_set_frequency: 0x000000c4
rkclock_set_frequency: 0x000000c5
rkclock_set_frequency: 0x000000ca
rkclock_set_frequency: 0x000000c1
rkclock_set_frequency: 0x000000bf
rkclock_set_frequency: 0x000000c6
rkclock_set_frequency: 0x000000c8
rkclock_set_frequency: 0x000000c9
rkclock_set_frequency: 0x000000c4
rkclock_set_frequency: 0x000001ac
rkclock_set_frequency: 0x0000013c
rkclock_set_frequency: 0x000000c5
rkclock_set_frequency: 0x00000198
rkclock_set_frequency: 0x0000014a
rkclock_set_frequency: 0x000000ca
rkclock_set_frequency: 0x000001a9
rkclock_set_frequency: 0x000000c1
rkclock_set_frequency: 0x00000045
rkclock_set_frequency: 0x000000bf
rkclock_set_frequency: 0x000000c6
rkclock_set_frequency: 0x000000c8
rkclock_set_frequency: 0x000000c9
rkclock_set_frequency: 0x0000003e
rkclock_set_frequency: 0x00000149
rkclock_set_frequency: 0x000000ce
rkclock_set_frequency: 0x00000140
rkclock_set_frequency: 0x00000061
syscon2 at mainbus0: "syscon-usb"
"usb2-phy" at syscon2 not configured
ampintc0 at mainbus0 nirq 160, ncpu 4 ipi: 0, 1: "interrupt-controller"
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
agtimer0 at mainbus0: tick rate 24000 KHz
com0 at mainbus0: ns16550, no working fifo
com0: console
rkiic0 at mainbus0
iic0 at rkiic0
rkpmic0 at iic0 addr 0x18: RK805
simplebus0 at mainbus0: "amba"
"dmac" at simplebus0 not configured
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 8-bit, mmc high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, mmc high-speed, dma
dwge0 at mainbus0
dwge0: address: ea:61:d0:db:bf:44
rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
ehci0 at mainbus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at mainbus0: version 1.0
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 256KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 256KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 256KB 64b/line 16-way L2 cache
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
sdmmc0: can't enable card
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC16G, 0080> SCSI2 0/direct removable
sd0: 15193MB, 512 bytes/sector, 31116288 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (48a8f55f5bd5cba3.a) swap on sd0b dump on sd0b
cpu0: clock not implemented
hw.machine=arm64
hw.model=ARM Cortex-A53 r0p4
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:48a8f55f5bd5cba3
hw.diskcount=1
hw.product=Pine64 Rock64
hw.physmem=4213796864
hw.usermem=4213784576
hw.ncpufound=4
hw.allowpowerdown=1
hw.ncpuonline=4

With rk3328-rock64.dtb:

OpenBSD 6.4-current (GENERIC.MP) #421: Tue Feb  5 16:32:10 MST 2019
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4212244480 (4017MB)
avail mem = 4049178624 (3861MB)
mainbus0 at root: Pine64 Rock64
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.0.5
efi0: Das U-boot rev 0x0
apm0 at mainbus0
psci0 at mainbus0: PSCI 1.0
syscon0 at mainbus0: "syscon"
"io-domains" at syscon0 not configured
"grf-gpio" at syscon0 not configured
"power-controller" at syscon0 not configured
"reboot-mode" at syscon0 not configured
rkclock0 at mainbus0
syscon1 at mainbus0: "syscon"
"usb2-phy" at syscon1 not configured
ampintc0 at mainbus0 nirq 160, ncpu 4 ipi: 0, 1: "interrupt-controller"
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
simplebus0 at mainbus0: "amba"
"dmac" at simplebus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
com0 at mainbus0: ns16550, no working fifo
com0: console
rkiic0 at mainbus0
iic0 at rkiic0
rkpmic0 at iic0 addr 0x18: RK805
rktemp0 at mainbus0
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 8-bit, mmc high-speed, dma
dwge0 at mainbus0
dwge0: address: ea:61:d0:db:bf:44
rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
ehci0 at mainbus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at mainbus0: version 1.0
rkdwusb0 at mainbus0: "usb"
xhci0 at rkdwusb0, xHCI 1.10
usb1 at xhci0: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 256KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 256KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 256KB 64b/line 16-way L2 cache
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
sdmmc1: can't enable card
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC16G, 0080> SCSI2 0/direct removable
sd0: 15193MB, 512 bytes/sector, 31116288 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (48a8f55f5bd5cba3.a) swap on sd0b dump on sd0b
hw.machine=arm64
hw.model=ARM Cortex-A53 r0p4
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:48a8f55f5bd5cba3
hw.diskcount=1
hw.sensors.rktemp0.temp0=56.82 degC (CPU)
hw.cpuspeed=1296
hw.setperf=100
hw.product=Pine64 Rock64
hw.physmem=4213800960
hw.usermem=4213788672
hw.ncpufound=4
hw.allowpowerdown=1
hw.perfpolicy=high
hw.ncpuonline=4

Reply via email to