On Wed, Aug 14, ioh wrote:
> > > > > > > I have been able to successfully install OpenBSD Current Aug 06
> > > > > > > 2019 on the Olimex Teres laptop.  It has very similar hardware to
> > > > > > > the PineBook, arm64 allwinner, etc.  I used 
> > > > > > > u-boot-sunxi-with-spl.bin
> > > > > > > from u-boot v2019.07 (teres_i_defconfig) and Arm Trusted Firmware
> > > > > > > v2.1.
> > > 
> > > I took the latest linux v5.3-rc4 and added some basic ehci0 and
> > > ohci0 nodes. I built the dtb with musl-cross-make and by running
> > > make dtbs in the linux source tree:
> > > 
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts 
> > > b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> > > index 1069e7012c9c..a8596d742d68 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> > > @@ -100,6 +100,11 @@
> > >         status = "okay";
> > >  };
> > > 
> > > +&ehci0 {
> > > +       phys = <&usbphy 0>;
> > > +       status = "okay";
> > > +};
> > > +
> > >  &ehci1 {
> > >         status = "okay";
> > >  };
> > > @@ -153,6 +158,11 @@
> > >         status = "okay";
> > >  };
> > > 
> > > +&ohci0 {
> > > +       phys = <&usbphy 0>;
> > > +       status = "okay";
> > > +};
> > > +
> > >  &ohci1 {
> > >         status = "okay";
> > >  };

I tracked down my keyboard issues to the firmare I was using in
the hardware. I reflashed the keyboard from Olimex's sources and
now it is correctly picked up in dmesg.
To recap: keyboard, trackpad, display, usb, internal emmc and
external mmc, and battery info all work. I have not checked sound.
Backlight adjustment doesn't work yet, internal wifi card is not
detected (no driver), and anything I haven't mentioned I haven't
checked yet.

Here is `sysctl hw` output:
hw.machine=arm64
hw.model=ARM Cortex-A53 r0p4
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:78c8c133b33f74fe,sd1:
hw.diskcount=2
hw.sensors.axppmic0.temp0=54.24 degC
hw.sensors.axppmic0.volt0=4.11 VDC (battery voltage)
hw.sensors.axppmic0.current0=0.00 A (battery charging current)
hw.sensors.axppmic0.current1=0.00 A (battery discharging current)
hw.sensors.axppmic0.amphour0=6.16 Ah (battery maximum capacity), OK
hw.sensors.axppmic0.amphour1=6.16 Ah (battery current capacity), OK
hw.sensors.axppmic0.indicator0=On (ACIN), OK
hw.sensors.axppmic0.indicator1=Off (VBUS)
hw.sensors.axppmic0.indicator2=On (battery present), OK
hw.sensors.axppmic0.indicator3=Off (battery charging)
hw.sensors.axppmic0.percent0=96.00% (battery percent), OK
hw.product=Olimex A64 Teres-I
hw.physmem=2018328576
hw.usermem=2018316288
hw.ncpufound=4
hw.allowpowerdown=1
hw.ncpuonline=4

Here is dmesg:
OpenBSD 6.6-beta (GENERIC.MP) #178: Wed Aug 14 19:05:18 MDT 2019
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 2018328576 (1924MB)
avail mem = 1928777728 (1839MB)
mainbus0 at root: Olimex A64 Teres-I
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.7
efi0: Das U-Boot rev 0x20190700
apm0 at mainbus0
psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
"osc24M_clk" at mainbus0 not configured
"osc32k_clk" at mainbus0 not configured
"pmu" at mainbus0 not configured
"sound" at mainbus0 not configured
"sound_spdif" at mainbus0 not configured
"spdif-out" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
simplebus0 at mainbus0: "soc"
sxisyscon0 at simplebus0
sxiccmu0 at simplebus0
sxipio0 at simplebus0: 103 pins
ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1: "interrupt-controller"
sxirtc0 at simplebus0
sxiccmu1 at simplebus0
sxipio1 at simplebus0: 13 pins
sxirsb0 at simplebus0
axppmic0 at sxirsb0 addr 0x3a3: AXP803
"bus" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"video-codec" at simplebus0 not configured
sximmc0 at simplebus0
sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
sximmc1 at simplebus0
sdmmc1 at sximmc1: 4-bit, sd high-speed, mmc high-speed, dma
sximmc2 at simplebus0
sdmmc2 at sximmc2: 8-bit, sd high-speed, mmc high-speed, dma
"eeprom" at simplebus0 not configured
"phy" at simplebus0 not configured
ehci0 at simplebus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at simplebus0: version 1.0
ehci1 at simplebus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci1 at simplebus0: version 1.0
"dai" at simplebus0 not configured
"codec" at simplebus0 not configured
com0 at simplebus0: ns16550, no working fifo
sxitwi0 at simplebus0
iic0 at sxitwi0
"gpu" at simplebus0 not configured
"pwm" at simplebus0 not configured
"hdmi-phy" at simplebus0 not configured
"interrupt-controller" at simplebus0 not configured
"codec-analog" at simplebus0 not configured
"watchdog" at simplebus0 not configured
gpio0 at sxipio0: 32 pins
gpio1 at sxipio0: 32 pins
gpio2 at sxipio0: 32 pins
gpio3 at sxipio0: 32 pins
gpio4 at sxipio0: 32 pins
gpio5 at sxipio0: 32 pins
gpio6 at sxipio0: 32 pins
gpio7 at sxipio0: 32 pins
gpio8 at sxipio1: 32 pins
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
"backlight" at mainbus0 not configured
"gpio-keys" at mainbus0 not configured
"leds" at mainbus0 not configured
"usb1-vbus" at mainbus0 not configured
"wifi_pwrseq" at mainbus0 not configured
"audio-amplifier" at mainbus0 not configured
simplefb0 at mainbus0: 1366x768, 32bpp
wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 16-way L2 cache
manufacturer 0x024c, product 0xb723 at sdmmc1 function 1 not configured
scsibus0 at sdmmc2: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Micron, R1J56L, 0000> SCSI2 0/direct removable
sd0: 14080MB, 512 bytes/sector, 28835840 sectors
uhub4 at uhub1 port 1 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" 
rev 2.00/85.36 addr 2
urtwn0 at uhub4 port 1 configuration 1 interface 0 "Realtek 802.11n NIC" rev 
2.00/0.00 addr 3
urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address 84:16:f9:1d:70:5c
umass0 at uhub4 port 2 configuration 1 interface 0 "SanDisk Corporation U3 
Cruzer Micro" rev 2.00/0.10 addr 4
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SanDisk, U3 Cruzer Micro, 3.27> SCSI2 0/direct 
removable serial.078154061628C371C0DF
sd1: 1959MB, 512 bytes/sector, 4013710 sectors
uvideo0 at uhub4 port 3 configuration 1 interface 0 "Generic USB2.0 PC CAMERA" 
rev 2.00/1.00 addr 5
video0 at uvideo0
uhidev0 at uhub4 port 4 configuration 1 interface 0 "Olimex Ltd. TERES 
Keyboard+Touchpad" rev 1.10/0.01 addr 6
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub4 port 4 configuration 1 interface 1 "Olimex Ltd. TERES 
Keyboard+Touchpad" rev 1.10/0.01 addr 6
uhidev1: iclass 3/1
ums0 at uhidev1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (78c8c133b33f74fe.a) swap on sd0b dump on sd0b

Thanks for your help bringing OpenBSD to the Olimex Teres laptop.

-- 
ioh

Reply via email to