Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2018 22:41:34 +0300
From:      Greg V <greg@unrelenting.technology>
To:        Ganbold Tsagaankhuu <ganbold@gmail.com>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Rockchip RK3399 (ROCKPro64) boots to multiuser
Message-ID:  <1534362095.3897.1@hraggstad.unrelenting.technology>
In-Reply-To: <CAGtf9xPKe6s16Y=Qo=s6mHogzvLM%2B5=NQCCNUDvTGLQL=6CezA@mail.gmail.com>
References:  <1533577708.4175.0@hraggstad.unrelenting.technology> <CAGtf9xP8qsindy8zu9e%2B1TkRySqp-Sis22LZQ7f=W%2BMkK6rZOg@mail.gmail.com> <1534253037.1656.0@hraggstad.unrelenting.technology> <CAGtf9xM5oZowxFgrTn3CfbM=g5Jd9g3ZgzZJP=m1Tn8ii2kVuA@mail.gmail.com> <20180815105602.b106e1f55a3f839880b1b60e@bidouilliste.com> <CAGtf9xPKe6s16Y=Qo=s6mHogzvLM%2B5=NQCCNUDvTGLQL=6CezA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, Aug 15, 2018 at 5:30 PM, Ganbold Tsagaankhuu=20
<ganbold@gmail.com> wrote:
>=20
>=20
> On Wed, Aug 15, 2018 at 4:56 PM, Emmanuel Vadot=20
> <manu@bidouilliste.com> wrote:
>> On Tue, 14 Aug 2018 21:30:11 +0800
>> Ganbold Tsagaankhuu <ganbold@gmail.com> wrote:
>>=20
>> > Greg,
>> >
>> > On Tue, Aug 14, 2018 at 9:23 PM, Greg V=20
>> <greg@unrelenting.technology> wrote:
>> >
>> > >
>> > >
>> > > On Tue, Aug 14, 2018 at 2:01 PM, Ganbold Tsagaankhuu=20
>> <ganbold@gmail.com>
>> > > wrote:
>> > >
>> > >> Greg,
>> > >>
>> > >> On Tue, Aug 7, 2018 at 1:48 AM, Greg V=20
>> <greg@unrelenting.technology>
>> > >> 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

Alright everyone, good news =97 I managed to reclock the CPU!!!

The patch is now at https://reviews.freebsd.org/D16732

(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

(the hack allows cpufreq_dt to deal with clock only, no voltage =97=20
since we don't have all the drivers for voltage.)

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 =97 and=20
it displays only the LITTLE frequencies:

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

To maximize the big frequency, I need to set *that* to a big number=20
e.g. dev.cpu.0.freq=3D2000 =97 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 =97 quite=20
underclocked on the big cores.
=




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1534362095.3897.1>