--- wikisrc/ports/evbarm/allwinner.mdwn 2018/05/06 11:29:50 1.87
+++ wikisrc/ports/evbarm/allwinner.mdwn 2018/11/17 11:13:16 1.93
@@ -45,7 +45,7 @@ NetBSD supports many boards based on All
# Supported hardware
-Please refer to the [SUNXI kernel config](https://nxr.netbsd.org/xref/src/sys/arch/evbarm/conf/SUNXI) for the most up-to-date list of supported hardware.
+Please refer to the [32-bit](https://nxr.netbsd.org/xref/src/sys/arch/evbarm/conf/SUNXI) or [64-bit](https://nxr.netbsd.org/xref/src/sys/arch/evbarm/conf/GENERIC64) kernel configs for the most up-to-date list of supported hardware.
@@ -56,7 +56,8 @@ Please refer to the [SUNXI kernel config
- Audio codec | Yes | Supported on sun4i, sun5i, sun6i, sun7i, sun8i-h2+, sun8i-h3, sun50i-h5 |
+ Audio codec | Yes | Supported on sun4i, sun5i, sun6i, sun7i, sun8i-h2+, sun8i-h3, sun50i-h5, sun50i-a64 |
+ CAN controller | Yes | |
Crypto engine | - | |
CSI | - | |
DMA | Yes | |
@@ -67,7 +68,7 @@ Please refer to the [SUNXI kernel config
GPIO | Yes | |
GPU | - | |
I2C | Yes | |
- I2S/PCM | - | |
+ I2S/PCM | Experimental | |
IR transceiver | - | |
NAND | Yes | |
P2WI/RSB | Yes | |
@@ -76,9 +77,9 @@ Please refer to the [SUNXI kernel config
RTC | Yes | |
SATA | Yes | |
SD/MMC | Yes | |
- SMP | Yes | 32-bit only. Uses PSCI support in firmware |
+ SMP | Yes | PSCI |
SPDIF | - | |
- SPI | - | |
+ SPI | Yes | |
Thermal sensors | Yes | |
Touch screen | Yes | |
UART | Yes | |
@@ -93,7 +94,9 @@ Please refer to the [SUNXI kernel config
- Download or build **armv7.img** (32-bit) or **arm64.img** (64-bit) from NetBSD -current
- Write the image to disk: **dd if=armv7.img of=/dev/rld0d bs=1m conv=sync**
-- Install a board-specific U-Boot (2017.07 or later) from pkgsrc to the SD card: **dd if=/usr/pkg/share/u-boot/<boardname>/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync**
+- Install a board-specific U-Boot (2017.07 or later) from pkgsrc to the SD card
+ (the `u-boot-sunxi-with-spl` are part of `sysutils/u-boot-` packages):
+ **dd if=/usr/pkg/share/u-boot/<boardname>/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync**
# Tips and tricks
@@ -104,3 +107,29 @@ On some television models, the borders o
setenv video-mode sunxi:1280x720-24,overscan_x=32,overscan_y=20
saveenv
reset
+
+## Pinebook function keys
+
+The sleep (Fn+Esc), home (Fn+F1), volume down (Fn+F3), volume up (Fn+F4), and mute (Fn+F5) keys on the keyboard are mapped to uhid(4) devices.
+
+Create the following config file:
+
+[[!template id=filecontent name="/etc/usbhidaction.conf" text="""
+Consumer:Consumer_Control.Consumer:Volume_Up 1
+ mixerctl -n -w outputs.master++
+Consumer:Consumer_Control.Consumer:Volume_Down 1
+ mixerctl -n -w outputs.master--
+Consumer:Consumer_Control.Consumer:Mute 1
+ mixerctl -n -w outputs.mute++
+Consumer:Consumer_Control.Consumer:AC_Home 1
+ /etc/powerd/scripts/hotkey_button AC_Home pressed
+Generic_Desktop:System_Control.Generic_Desktop:System_Sleep 1
+ /etc/powerd/scripts/sleep_button System_Sleep pressed
+"""]]
+
+Then start two copies of usbhidaction:
+
+[[!template id=programlisting text="""
+# /usr/bin/usbhidaction -c /etc/usbhidaction.conf -f /dev/uhid0 -i -p /var/run/usbhidaction-uhid0.pid
+# /usr/bin/usbhidaction -c /etc/usbhidaction.conf -f /dev/uhid1 -i -p /var/run/usbhidaction-uhid1.pid
+"""]]