GPIO supported devices

2019-06-21 Thread Kihaguru Gathura
Hi,

Which of the following devices actually have gpio working with
OpenBSD-ARM64 or ARMv7 platform.

I have done alot with the RPI's but gpio doesn't work there. I need to
control external devices for machine control.

I understand security is in OpenBSD priority list but maybe there is a
specific device that currently works with GPIO. any pointers to this
is highly appreciated.



Re: GPIO supported devices

2019-06-21 Thread Mark Kettenis
> From: Kihaguru Gathura 
> Date: Fri, 21 Jun 2019 12:41:35 +0300
> 
> Hi,
> 
> Which of the following devices actually have gpio working with
> OpenBSD-ARM64 or ARMv7 platform.
> 
> I have done alot with the RPI's but gpio doesn't work there. I need to
> control external devices for machine control.
> 
> I understand security is in OpenBSD priority list but maybe there is a
> specific device that currently works with GPIO. any pointers to this
> is highly appreciated.

Boards with Allwinner "sunxi" SoCs have working gpio(4) support, where
there is more or less proper protection against accidentally
configuring and using gpio pins that are actually in use by other
devices.

There are both ARMv7 and ARMv8 variants, but you're probably better
off picking a board based on the Allwinner A64 as OpenBSD/arm64 sees
more development than OpenBSD/armv7.  Currently OpenBSD/armv7 does not
support SMP for example.  Probably best to avoid the Allwinner H5 for
now as we have seen stability issues with various H5 boards.

The NanoPi A64 board is attractively priced, but the the onboard WiFi
chip isn't supported.  The Pine64 Pine A64 boards are also a
reasonable choice.



ROCKPro64 firmware

2019-06-21 Thread Mark Kettenis
I've finally managed to build a properly working (and fully open
source) firmware for the ROCKPro64.  The firmware consists of two
files, which can be downloaded from:

  https://sibelius.home.xs4all.nl/firmware/rk3399-rockpro64/idbloader.img
  https://sibelius.home.xs4all.nl/firmware/rk3399-rockpro64/u-boot.itb

In order to use this firmware you'll have to write it to a uSD card or
an eMMC module with the following commands:

  # dd if=idbloader.img of=/dev/sdXc seek=64
  # dd if=u-boot.itb of=/dev/sdXc seek=16384

Note that if you flashed a firmware to the onboard SPI flash, you'll
have to erase it first or disable the SPI flash with a jumper wire
connecting pins 23 and 25.

Also note that the firmware overlaps with the msdos partition in the
default OpenBSD/arm64 disk layout.  Therefore you can't have the
firmware and the OpenBSD boot/root filesystems on the same device
without running through additional hoops.  Ultimately the goal is to
make it possible to put this firmware in SPI flash, but I haven't
looked into that yet.

This firmware uses a more standard serial speed of 115200, which means
you can use almost any USB TTL serial cable.  DVFS is supported so you
can use sysctl hw.setperf to control to clock speed of the CPUs.  But
be aware that without a fan the board will probably overheat if you
run it at the highest supported clock speed.

At some point this should land in the official u-boot-aarch64
packages.  But since this build relies on a fairly large patch set
that hasn't landed upstream yet, this may take some time.

Cheers,

Mark