From owner-freebsd-arm@freebsd.org Wed Aug 15 20:44:55 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EDE7106FF88 for ; Wed, 15 Aug 2018 20:44:55 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 86AEB7AA73 for ; Wed, 15 Aug 2018 20:44:54 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id e5011398; Wed, 15 Aug 2018 22:44:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=nepH2egrnd6bza1Y4PEdpefhjvI=; b=LkWYoroWoHyPsZ1lv1mZXjxUbVoq 7RSn17HGpJuB8kXxIzLfN7O2Po6PJ6PFliXC9EBiSlZtKAHy+y2M9jruHmndYoSF 5oLv717vcK2G2lTVrmW6iEDuYdS3rEXkbkEZmPRxbJhsu+js0E8MHkpkuQEdGm1a Dn311n5waSa5GXQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=n+GXPI6iH79+MYgyrwVNcswM49jCvV85SX5+a1U1ho7/3n0xktYYsmi2 nGIvnkOjVUM/9XluKVSzrrtaIIvVTBeEOZZ+M1edlQGpEltqbqFVz+IwZ/ZJwc3X goORWAYh/lEMAItT3vHtoggV5sE2SH/lDxWf1t8RtRWNE8CY6V8= Received: from knuckles.blih.net (global-5-53.nat-1.net.cam.ac.uk [131.111.5.53]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 821f1ff6 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 15 Aug 2018 22:44:51 +0200 (CEST) Date: Wed, 15 Aug 2018 22:44:49 +0200 From: Emmanuel Vadot To: Greg V Cc: Ganbold Tsagaankhuu , freebsd-arm Subject: Re: Rockchip RK3399 (ROCKPro64) boots to multiuser Message-Id: <20180815224449.98b920836c2c7f8610449835@bidouilliste.com> In-Reply-To: <1534362095.3897.1@hraggstad.unrelenting.technology> References: <1533577708.4175.0@hraggstad.unrelenting.technology> <1534253037.1656.0@hraggstad.unrelenting.technology> <20180815105602.b106e1f55a3f839880b1b60e@bidouilliste.com> <1534362095.3897.1@hraggstad.unrelenting.technology> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:44:55 -0000 On Wed, 15 Aug 2018 22:41:34 +0300 Greg V wrote: >=20 >=20 > On Wed, Aug 15, 2018 at 5:30 PM, Ganbold Tsagaankhuu=20 > wrote: > >=20 > >=20 > > On Wed, Aug 15, 2018 at 4:56 PM, Emmanuel Vadot=20 > > wrote: > >> On Tue, 14 Aug 2018 21:30:11 +0800 > >> Ganbold Tsagaankhuu wrote: > >>=20 > >> > Greg, > >> > > >> > On Tue, Aug 14, 2018 at 9:23 PM, Greg V=20 > >> wrote: > >> > > >> > > > >> > > > >> > > On Tue, Aug 14, 2018 at 2:01 PM, Ganbold Tsagaankhuu=20 > >> > >> > > wrote: > >> > > > >> > >> Greg, > >> > >> > >> > >> On Tue, Aug 7, 2018 at 1:48 AM, Greg V=20 > >> > >> > >> wrote: > >> > >> > >> > >>> Hi, > >> > >>> > >> > >>> I managed to boot FreeBSD on the Rockchip RK3399 SoC (Pine64=20 > >> ROCKPro64 > >> > >>> board): > >> > >>> > >> > >>>=20 > >> https://gist.github.com/myfreeweb/5f5b9e56f9a0fd1d63a46c34886f5ad1 > >> > >>> > >> > >>> As with the ROCK64, boot is over the network. To boot, dd=20 > >> ayufan's > >> > >>> ubuntu image onto an sdcard and Ctrl-C the linux boot on the=20 > >> kernel > >> > >>> selection screen. U-Boot on SPI flash is not available yet. > >> > >>> > >> > >>> Unfortunately, performance is very disappointing ? I think the=20 > >> big > >> > >>> cluster's default frequency is very low. > >> > >>> (Everything runs faster if cpuset to the LITTLE cores.) > >> > >>> > >> > >>> Looks like we'll need a driver for the "rockchip,rk808" PMIC=20 > >> to make > >> > >>> cpufreq_dt work? > >> > >>> Also my attempt at the clock driver is very incomplete ;) > >> > >>> > >> > >> > >> > >> Can you change the patches according to style(9) for=20 > >> phabricator review ( > >> > >> https://reviews.freebsd.org) and send them to me? > >> > >> I think full files should be fine too. > >> > >> > >> > > > >> > > My patches are rather incomplete and janky, don't do anything=20 > >> with them. > >> > > manu@ got a ROCKPro64 recently https://twitter.com/manuvadot/ > >> > > status/1027152057051041793 so you can expect proper versions of=20 > >> these > >> > > "soon" :) > >> > > > >> > > >> > > >> > I meant to say that we can rather use your patches if no one did=20 > >> it yet. > >> > > >> > Emmanuel, > >> > > >> > Do you have proper patches yet? > >>=20 > >> No and I'm not in a hurry to put everything up for RK3399 so close=20 > >> to > >> freeze. > >=20 > > Yes, I agree. > >=20 > >=20 > >> But if you want to clean them and put this in a review be my guest, > >> I'll review them. > >=20 > > Ok, I will see if I'll have some time to polish it unless someone=20 > > else will do it. > >=20 > > thanks, > >=20 > > Ganbold >=20 > Alright everyone, good news ? I managed to reclock the CPU!!! >=20 > The patch is now at https://reviews.freebsd.org/D16732 Thanks a lot !! I'll have a deeper look when I'm back from BSDCam. > (and I think the style is more correct now. Though it's really fscking=20 > silly that the style doesn't like making "table-like" structures look=20 > like tables, i.e. with one-line "rows".) > > Plus the hack you need to reclock the CPU right now at=20 > https://gist.github.com/myfreeweb/88cb9340652f56498f4be770c77b9d61 >=20 > (the hack allows cpufreq_dt to deal with clock only, no voltage ?=20 > since we don't have all the drivers for voltage.) Are you able to switch to any frequency with that ? I would expect the cpu to hang if the voltage is too low or too high. (I encounter that on RK3328) > BTW, the sysctl cpufreq interface is a bit funny with big.LITTLE: > dev.cpu.4/5 do not have any freq stuff, it's all on dev.cpu.0 ? and=20 > it displays only the LITTLE frequencies: >=20 > dev.cpu.0.freq_levels: 1512/-1 1416/-1 1200/-1 1008/-1 816/-1 600/-1=20 > 408/-1 > dev.cpu.0.freq: 1512 >=20 > To maximize the big frequency, I need to set *that* to a big number=20 > e.g. dev.cpu.0.freq=3D2000 ? that results in 1512/1992. > Setting 1512 there (which is what powerd does in this situation, since=20 > it does not have any info about big) results in 1512/1608 ? quite=20 > underclocked on the big cores. --=20 Emmanuel Vadot