Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2018 09:47:24 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        Mark Millard via freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Banana Pi M3 (armv7/CortexA7) with head -339076 and u-boot 2018.09_3 from ports: what CPU clock speed is it using? More. . .
Message-ID:  <ABD16DEC-B382-444E-9708-E81DA0C6042B@yahoo.com>
In-Reply-To: <20181004152619.b9daf1e395f543aa1621acd9@bidouilliste.com>
References:  <5B9D79C7-306E-45E0-9311-DDA0CC70C4A5@yahoo.com> <20181004152619.b9daf1e395f543aa1621acd9@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-Oct-4, at 6:26 AM, Emmanuel Vadot <manu at bidouilliste.com> =
wrote:


> Hi,
>=20
> On Wed, 3 Oct 2018 12:59:13 -0700
> Mark Millard via freebsd-arm <freebsd-arm at freebsd.org> wrote:
>=20
>> . . .
>=20
>>=20
>> With -r308125 the BPi-M3 would -j4 or -j5 buildworld buildkernel for =
the
>> src.conf settings that I use in about 9.5 hours. (=46rom my =
2016-Nov-05
>> list E-mail.)
>>=20
>> [The BPi-M3 has heat sinks, a case, and a fan.]
>>=20
>> I've not done such builds in a long time and I've not recorded times
>> when I have. But having updated to -r339076 based and the modern
>> 2018.09 u-boot context has the BPi-M3 just finished building
>> lib/clang/libclang/AST/ materials after about 19 hours. top
>> indicates swap has 1740M Total and Free. (My top modifications
>> indicate the Max Observed Active Mem as 922M so far.)

FYI on how long it took and what was built:

It took around 36 hours to complete the buildworld buildkernel --and
that was for:

make[1]: "/usr/src/Makefile.inc1" line 341: SYSTEM_COMPILER: Determined =
that CC=3Dcc matches the source tree.  Not bootstrapping a =
cross-compiler.
make[1]: "/usr/src/Makefile.inc1" line 346: SYSTEM_LINKER: Determined =
that LD=3Dld matches the source tree.  Not bootstrapping a cross-linker.

but I currently build for cortexA53 based on WITH_CLANG_FULL=3D
WITH_CLANG_EXTRAS=3D but WITHOUT_LLDB=3D WITHOUT_BINUTILS_BOOTSTRAP=3D
WITHOUT_BINUTILS=3D and no GCC/GNUCXX. I'm implicitly using
WITH_LLVM_TARGET_ALL=3D so far.

>> . . .
>=20
> There is two problem for cpufreq on BanapiM3
>=20
> 1) The current DTS (from linux 4.18) doesn't have the regulator define
> for switching voltage, this is fixed in later version.
> 2) A83T is a multi cluster ARM cpu, and this cause problem when
> switching frequency, I don't know exactly what's happening but =
removing
> the other cluster from the dts and I don't have any problem switching
> frequency.
>=20
> . . .
> In the meantime you can use
> https://people.freebsd.org/~manu/sun8i-a83t-bananapi-m3.dtb
>=20
> This is the DTB from Linux 4.20 (or what 4.20 will be) with one of the
> cluster removed. Setting the freq with sysctl dev.cpu.0.freq=3DXXXX or
> using powerd works. Simply put it in the /dtb directory of the FAT
> partition.

That file seems to have helped when put in the ufs /boot/dtb/
directory. When /etc/rc.conf sets powerd_enable=3D"YES" the boot
then cleanly reports:

Starting powerd.


Thanks.



FYI:

I had not looked at it at the time but prior to this change it
was reporting the following. It still is reporting this after
the change.

gpio1: <Allwinner GPIO/Pinmux controller> mem 0x1f02c00-0x1f02fff irq 33 =
on simplebus0
gpiobus1: <OFW GPIO bus> on gpio1
axp8xx_pmu0: <X-Powers AXP813 Power Management Unit> at addr 0x746 irq =
35 on iicbus0
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator dldo2
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator dldo4
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo1
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo2
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo3

Putting your sun8i-a83t-bananapi-m3.dtb on just the msdosfs
parition in a dtb directory and rebooting did not change the
behavior. For example there was no:

dev.cpu.0.freq_levels: 1200/-1 1128/-1 1008/-1 912/-1 864/-1 720/-1 =
600/-1 480/-1

But instead replacing the file in the ufs /boot/dtb/ did create
such on the next boot. That is consistent with the what the boot
text reports for where it gets the file:

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...              =20
/boot/dtb/sun8i-a83t-bananapi-m3.dtb size=3D0x702a
Loaded DTB from file 'sun8i-a83t-bananapi-m3.dtb'.

(Not /boot/msdos/dtb/ .)

If some stage before the kernel needs that .dtb I still may
not have copies in all the correct places or other such issues.

I still do not find thermal/temperature material in
the sysctl -a output. (I'd guess that this is expected.)

Whatever the details, the BPi-M3 is operational and I
no longer have my old hacks involved (that were from the
transition period). It is nice to get rid of them.

Thanks again for the improvements.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ABD16DEC-B382-444E-9708-E81DA0C6042B>