Re: Make Rockchip RK3399 eMMC faster

2020-04-24 Thread Sebastian Benoit
Mark Kettenis(mark.kette...@xs4all.nl) on 2020.04.23 22:56:17 +0200:
> I put this in at some point since I couldn't get the eMMC on my
> firefly-rk3399 working otherwise.  But its eMMC died and on my
> rockpro64 and rk3399-q7 boards things work very well without it.  On
> the latter board it even makes things a bit speedier: the raw read
> performance goes up from 35 MB/s to 43 MB/s.
> 
> Probably good if this was tested on the pinebook pro.

On the pinebook pro with the diff i get 38 MB/s from the eMMC, reading from
rsd1c. Thats average over 10 reads.

Without the diff i get only about 28 MB/s.

/Benno

> 
> ok?
> 
> 
> Index: dev/fdt/sdhc_fdt.c
> ===
> RCS file: /cvs/src/sys/dev/fdt/sdhc_fdt.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 sdhc_fdt.c
> --- dev/fdt/sdhc_fdt.c21 Apr 2020 07:58:57 -  1.7
> +++ dev/fdt/sdhc_fdt.c23 Apr 2020 20:51:48 -
> @@ -154,9 +154,6 @@ sdhc_fdt_attach(struct device *parent, s
>*/
>   phy_enable(faa->fa_node, "phy_arasan");
>   sc->sc.sc_flags |= SDHC_F_NOPWR0;
> -
> - /* XXX Doesn't work on Rockchip RK3399. */
> - sc->sc.sc_flags |= SDHC_F_NODDR50;
>   }
>  
>   if (OF_is_compatible(faa->fa_node, "brcm,bcm2711-emmc2"))
> 



Re: Make Rockchip RK3399 eMMC faster

2020-04-24 Thread Marcus MERIGHI
mark.kette...@xs4all.nl (Mark Kettenis), 2020.04.23 (Thu) 22:56 (CEST):
> I put this in at some point since I couldn't get the eMMC on my
> firefly-rk3399 working otherwise.  But its eMMC died and on my
> rockpro64 and rk3399-q7 boards things work very well without it.  On
> the latter board it even makes things a bit speedier: the raw read
> performance goes up from 35 MB/s to 43 MB/s.
> 
> Probably good if this was tested on the pinebook pro.

running with it on pinebook pro. no problems so far. 
i (still!) run OpenBSD from sdcard (sd0). 

tested write speed to emmc (sd1) is 14M without to 16M with the patch.
observed maximum during a 1GB write with:
  dd if=/dev/zero of=/mnt/sandisk_da4064-Sandisk.g.ffs/test.file bs=1m

sorry, did not test rsd1c, because OpenBSD already sits there waiting
for me making it boot from eMMC.

thanks for you work!

marcus

dmesg diff between this kernel and the last snapshot installed:

--- dmesg.2020-04-22-18-51-1587574272   Wed Apr 22 18:51:12 2020
+++ dmesg.2020-04-24-18-49-1587746995   Fri Apr 24 18:49:55 2020
@@ -1,4 +1,4 @@
-OpenBSD 6.7-beta (GENERIC.MP) #575: Wed Apr 22 00:26:52 MDT 2020
-dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
-real mem  = 4059058176 (3871MB)
-avail mem = 3861360640 (3682MB)
+OpenBSD 6.7-beta (GENERIC.MP) #0: Fri Apr 24 18:24:05 CEST 2020
+me@myself:/usr/src/sys/arch/arm64/compile/GENERIC.MP
+real mem  = 4058992640 (3870MB)
+avail mem = 3861295104 (3682MB)
@@ -104 +103,0 @@
-"thermal-zones" at mainbus0 not configured
@@ -140 +138,0 @@
-"reserved-memory" at mainbus0 not configured
@@ -204 +202 @@
-bootfile: sd0a:/bsd
+bootfile: sd0a:bsd.emmc
@@ -214,2 +212,2 @@
-hw.sensors.rktemp0.temp0=36.25 degC (CPU)
-hw.sensors.rktemp0.temp1=34.44 degC (GPU)
+hw.sensors.rktemp0.temp0=35.62 degC (CPU)
+hw.sensors.rktemp0.temp1=33.89 degC (GPU)

full dmesg:

OpenBSD 6.7-beta (GENERIC.MP) #0: Fri Apr 24 18:24:05 CEST 2020
me@myself:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4058992640 (3870MB)
avail mem = 3861295104 (3682MB)
mainbus0 at root: Pine64 Pinebook Pro
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: 512KB 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
agintc0 at mainbus0 sec shift 3:4 nirq 288 nredist 6 ipi: 0, 1: 
"interrupt-controller"
agintcmsi0 at agintc0
syscon0 at mainbus0: "qos"
syscon1 at mainbus0: "qos"
syscon2 at mainbus0: "qos"
syscon3 at mainbus0: "qos"
syscon4 at mainbus0: "qos"
syscon5 at mainbus0: "qos"
syscon6 at mainbus0: "qos"
syscon7 at mainbus0: "qos"
syscon8 at mainbus0: "qos"
syscon9 at mainbus0: "qos"
syscon10 at mainbus0: "qos"
syscon11 at mainbus0: "qos"
syscon12 at mainbus0: "qos"
syscon13 at mainbus0: "qos"
syscon14 at mainbus0: "qos"
syscon15 at mainbus0: "qos"
syscon16 at mainbus0: "qos"
syscon17 at mainbus0: "qos"
syscon18 at mainbus0: "qos"
syscon19 at mainbus0: "qos"
syscon20 at mainbus0: "qos"
syscon21 at mainbus0: "qos"
syscon22 at mainbus0: "qos"
syscon23 at mainbus0: "qos"
syscon24 at mainbus0: "qos"
syscon25 at mainbus0: "power-management"
"power-controller" at syscon25 not configured
syscon26 at mainbus0: "syscon"
"io-domains" at syscon26 not configured
rkclock0 at mainbus0
rkclock1 at mainbus0
syscon27 at mainbus0: "syscon"
"io-domains" at syscon27 not configured
"usb2-phy" at syscon27 not configured
"usb2-phy" at syscon27 not configured
rkemmcphy0 at syscon27
"pcie-phy" at syscon27 not configured
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
pwmreg0 at mainbus0
rkdrm0 at mainbus0
drm0 at rkdrm0
"pmu_a53" at mainbus0 not configured
"pmu_a72" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
"xin24m" at mainbus0 not configured
simplebus0 at mainbus0: "amba"
"dma-controller" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
rkpcie0 at mainbus0
rkpcie0: link training timeout
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, mmc high-speed, dma
sdhc0 at mainbus0
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc2 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
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
ehci1 at mainbus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci1 at mainbus0: version 1.0
rkdwusb0 at mainbus0: "usb"
xhci0 at rkdwusb0, xHCI 1.10
usb2 at xhci0: USB revision 3.0
uhub2 at usb2 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
rkdwusb1 at mainbus0: "usb"
xhci1 at rkdwusb1, xHCI 1.10
usb3 at xhci1: USB revision 3.0
uhub3 at usb3 

Re: Make Rockchip RK3399 eMMC faster

2020-04-23 Thread Dave Polaschek
I’ve got a PineBook Pro, but haven’t managed to install OpenBSD on it. The 
networking on the linux that came installed on it cannot connect to openbsd.org 
or github.com (connection times our) so I haven’t managed to make an installer 
SD I can run on it. I *can* connect to those domains from my iOS devices on the 
same network, but I haven’t tried a different network, and I can’t write an SD 
card from my iOS devices...

I haven’t touched OpenBSD since 4.something, but theoretically have more time 
for poking at it now. If someone can hold my hand to get me a working install, 
I’ll be happy to run some tests.

-DaveP


> On Apr 23, 2020, at 14:56, Mark Kettenis  wrote:
> 
> Probably good if this was tested on the pinebook pro.