I recently got my hands on a PinePhone Pro and tried to run OpenBSD on it. 
Installation went well but as expected most components are still missing 
drivers 
so far.

>From my experiment with OpenBSD 7.3-current (GENERIC.MP) #2182:

- Both on-board EMMC and sdcard are detected, OpenBSD at least can boot from 
  sdcard using towboot
- Default kernel stuck at setting up ochi during boot, have to disable ohci to
  continue. USB port is not powered after kernel boot.
- LCD screen lights up during kernel boot, but no content on display despite
  the following log:

        rkdrm0 at mainbus0
        drm0 at rkdrm0

- All 6 CPU cores are detected and run fine with MP kernel
- Temperature information reported by rktemp looks reasonable

  hw.sensors.rktemp0.temp0=41.11 degC (CPU)
  hw.sensors.rktemp0.temp1=39.38 degC (GPU)

- Connect the phone to a power source yieled the following message, I don't 
  think the host mode part is right in this situation

  fusbtc0: attached (source)
  fusbtc0: connected in host mode

- Built in wlan adapter is detected, no firmware provided by OpenBSD, loading 
  the one I used on Linux made it possible to read the MAC address and bring 
  bwfm0 up, but still cannnot scan for network.

  (with brcmfmac43455-sdio.bin as firmware aka cyfmac43455-sdio.bin)

  bwfm0 at sdmmc0 function 1

- Power off does not work, system halt but LCD is still on, proper system power 
  off likely depends on having a PMIC driver, which I'm trying to write
- Most components connnected over IIC are detected, including the RK8180 PMIC 
  and touch screen

More hardware info:

# sysctl hw

(serialno/uuid removed)

hw.machine=arm64
hw.model=ARM Cortex-A53 r0p4
hw.ncpu=6
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:ec1fd27f6f300fe2,sd1:
hw.diskcount=2
hw.sensors.rktemp0.temp0=41.11 degC (CPU)
hw.sensors.rktemp0.temp1=39.38 degC (GPU)
hw.cpuspeed=600
hw.setperf=20
hw.vendor=Unknown
hw.product=Unknown Product
hw.physmem=4088885248
hw.usermem=4088868864
hw.ncpufound=6
hw.allowpowerdown=1
hw.perfpolicy=auto
hw.smt=0
hw.ncpuonline=6
hw.power=1


# usbdevs -vvv
Controller /dev/usb0:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub0
         port 01: 0000.0500 power
Controller /dev/usb1:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub1
         port 01: 0000.0500 power
Controller /dev/usb2:
addr 01: 0000:0000 Generic, xHCI root hub
         super speed, self powered, config 1, rev 1.00
         driver: uhub2
         port 01: 0000.02a0 power Rx.detect
         port 02: 0000.02a0 power Rx.detect

A strange kernel panic I encountered when loading firmware:

bwfm0 at sdmmc0 function 1
manufacturer 0x02d0, product 0xa9bf at sdmmc0 function 2 not configured
manufacturer 0x02d0, product 0xa9bf at sdmmc0 function 3 not configured
panic: attempt to access user address 0x0 from EL1
Stopped at      panic+0x164:    cmp     w21, #0x0
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*124239  45911      0     0x14000      0x200    0K sdmmc1
db_enter() at panic+0x160
panic() at kdata_abort+0x17c 
do_el0_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at sdmmc_mem_sd_init+0x2c8
sdmmc_mem_sd_init() at sdmmc_mem_init+0xac
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.
ddb{0}> trace
db_enter() at panic+0x160
panic() at kdata_abort+0x17c
do_el0_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at handle_el1h_sync+0x6c
handle_el1h_sync() at sdmmc_mem_sd_init+0x2c8
sdmmc_mem_sd_init() at sdmmc_mem_init+0xac
sdmmc_mem_init() at sdmmc_init+0x8c
sdmmc_init() at sdmmc_card_attach+0x88
sdmmc_card_attach() at sdmmc_discover_task+0x48
sdmmc_discover_task() at sdmmc_task_thread+0x140
sdmmc_task_thread() at proc_trampoline+0x14
ddb{0}>


Full log from power up:

U-Boot TPL 2021.10 (Oct 04 2021 - 15:09:26)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2021.10 (Oct 04 2021 - 15:09:26 +0000)
Trying to boot from SPI
NOTICE:  BL31: v2.6(release):
NOTICE:  BL31: Built : 00:00:00, Jan  1 1980


Tow-Boot 2021.10 (Oct 04 2021 - 15:09:26 +0000)004 [variant: spi]

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 PinePhonePro
DRAM:  3.9 GiB
PMIC:  RK8180 (on=0x80, off=0x10)
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from SPIFlash... SF: Detected gd25lq128e with page size 256 
Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Pine64 PinePhonePro
Net:   No ethernet found.
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Please press [ESCAPE] or [CTRL+C] to enter the boot menu.
Creating menu...
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
Scanning disk m...@fe310000.blk...
Disk m...@fe310000.blk not ready
Scanning disk m...@fe320000.blk...
Scanning disk m...@fe330000.blk...
Found 6 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootaa64.efi
219050 bytes read in 37 ms (5.6 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Booting /efi\boot\bootaa64.efi
disks: sd0* sd1
>> OpenBSD/arm64 BOOTAA64 1.18
boot> 
booting sd0a:/bsd: 10625552+2504232+292520+843464 
[792195+91+1216848+729496]=0x13b2240
[ using 2739408 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.3-current (GENERIC.MP) #2182: Thu Jul  6 15:02:37 MDT 2023
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4088885248 (3899MB)
avail mem = 3883520000 (3703MB)
random: good seed from bootblocks
mainbus0 at root: Pine64 PinePhonePro
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2, SYSTEM_SUSPEND
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
cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16
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
cpu1: CRC32,SHA2,SHA1,AES+PMULL,ASID16
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
cpu2: CRC32,SHA2,SHA1,AES+PMULL,ASID16
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
cpu3: CRC32,SHA2,SHA1,AES+PMULL,ASID16
cpu4 at mainbus0 mpidr 100: ARM Cortex-A72 r0p2
cpu4: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu4: 1024KB 64b/line 16-way L2 cache
cpu4: CRC32,SHA2,SHA1,AES+PMULL,ASID16
cpu5 at mainbus0 mpidr 101: ARM Cortex-A72 r0p2
cpu5: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu5: 1024KB 64b/line 16-way L2 cache
cpu5: CRC32,SHA2,SHA1,AES+PMULL,ASID16
efi0 at mainbus0: UEFI 2.8
efi0: Das U-Boot rev 0x20211000
smbios0 at efi0: SMBIOS 3.0
smbios0: vendor U-Boot version "2021.10" date 10/01/2021
smbios0: Unknown Unknown Product
apm0 at mainbus0
agintc0 at mainbus0 sec shift 3:3 nirq 288 nredist 6 ipi: 0, 1, 2: 
"interrupt-controller"
agintcmsi0 at agintc0
syscon0 at mainbus0: "qos"
syscon1 at mainbus0: "qos"
syscon2 at mainbus0: "qos"
syscon3 at mainbus0: "qos"
syscon4 at mainbus0: "qos"
syscon5 at mainbus0: "qos"
syscon6 at mainbus0: "qos"
syscon7 at mainbus0: "qos"
syscon8 at mainbus0: "qos"
syscon9 at mainbus0: "qos"
syscon10 at mainbus0: "qos"
syscon11 at mainbus0: "qos"
syscon12 at mainbus0: "qos"
syscon13 at mainbus0: "qos"
syscon14 at mainbus0: "qos"
syscon15 at mainbus0: "qos"
syscon16 at mainbus0: "qos"
syscon17 at mainbus0: "qos"
syscon18 at mainbus0: "qos"
syscon19 at mainbus0: "qos"
syscon20 at mainbus0: "qos"
syscon21 at mainbus0: "qos"
syscon22 at mainbus0: "qos"
syscon23 at mainbus0: "qos"
syscon24 at mainbus0: "qos"
syscon25 at mainbus0: "power-management"
"power-controller" at syscon25 not configured
syscon26 at mainbus0: "syscon"
"io-domains" at syscon26 not configured
rkclock0 at mainbus0
rkclock1 at mainbus0
CRU_CLKGATE_CON6: 0x00000060
syscon27 at mainbus0: "syscon"
"io-domains" at syscon27 not configured
"mipi-dphy-rx0" at syscon27 not configured
"usb2phy" at syscon27 not configured
"usb2phy" at syscon27 not configured
rkemmcphy0 at syscon27
rktcphy0 at mainbus0
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
syscon28 at mainbus0: "syscon"
syscon29 at mainbus0: "syscon"
"fit-images" at mainbus0 not configured
rkdrm0 at mainbus0
drm0 at rkdrm0
"pmu_a53" at mainbus0 not configured
"pmu_a72" at mainbus0 not configured
agtimer0 at mainbus0: 24000 kHz
"xin24m" at mainbus0 not configured
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma
sdhc0 at mainbus0
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc2 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
ehci0 at mainbus0
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
"usb" at mainbus0 not configured
ehci1 at mainbus0
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
"usb" at mainbus0 not configured
"debug" at mainbus0 not configured
"debug" at mainbus0 not configured
"debug" at mainbus0 not configured
"debug" at mainbus0 not configured
"debug" at mainbus0 not configured
"debug" at mainbus0 not configured
rkdwusb0 at mainbus0: "usb"
xhci0 at rkdwusb0, xHCI 1.10
usb2 at xhci0: USB revision 3.0
uhub2 at usb2 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
"dp" at mainbus0 not configured
"saradc" at mainbus0 not configured
rkiic0 at mainbus0
rkclock_set_parent: 0x00000089
rkclock_set_frequency(rkclock1, 137, 19200000)
rkclock_set_parent: 0x000000ab
iic0 at rkiic0
"sony,imx258" at iic0 addr 0x1a not configured
"realtek,rt5640" at iic0 addr 0x1c not configured
rkiic1 at mainbus0
iic1 at rkiic1
"goodix,gt917s" at iic1 addr 0x14 not configured
"sensortek,stk3311" at iic1 addr 0x48 not configured
com0 at mainbus0: dw16550, 64 byte fifo
com1 at mainbus0: dw16550, 64 byte fifo
com1: console
com2 at mainbus0: dw16550, 64 byte fifo
"spi" at mainbus0 not configured
rktemp0 at mainbus0
rkiic2 at mainbus0
iic2 at rkiic2
"rockchip,rk818" at iic2 addr 0x1c not configured
fanpwr0 at iic2 addr 0x40: SYR827, 1.00 VDC
fanpwr1 at iic2 addr 0x41: SYR828, 1.00 VDC
rkiic3 at mainbus0
iic3 at rkiic3
fusbtc0 at iic3 addr 0x22
"invensense,mpu6500" at iic3 addr 0x68 not configured
rkpwm0 at mainbus0
rkpwm1 at mainbus0
"video-codec" at mainbus0 not configured
"iommu" at mainbus0 not configured
"video-codec" at mainbus0 not configured
"iommu" at mainbus0 not configured
"rga" at mainbus0 not configured
"efuse" at mainbus0 not configured
"dma-controller" at mainbus0 not configured
"dma-controller" at mainbus0 not configured
"watchdog" at mainbus0 not configured
"rktimer" at mainbus0 not configured
rkiis0 at mainbus0
rkvop0 at mainbus0: RK3399 VOPL
"iommu" at mainbus0 not configured
rkvop1 at mainbus0: RK3399 VOPB
"iommu" at mainbus0 not configured
"isp0" at mainbus0 not configured
"iommu" at mainbus0 not configured
"iommu" at mainbus0 not configured
"mipi" at mainbus0 not configured
"gpu" at mainbus0 not configured
"opp-table-0" at mainbus0 not configured
"opp-table-1" at mainbus0 not configured
"opp-table-2" at mainbus0 not configured
"adc-keys" at mainbus0 not configured
"battery" at mainbus0 not configured
"opp-table1b" at mainbus0 not configured
pwmbl0 at mainbus0
gpioleds0 at mainbus0: no LEDs
gpiokeys0 at mainbus0: "Power"
gpiokeys1 at mainbus0: "ring-indicator"
simpleaudio0 at mainbus0
simpleamp0 at mainbus0
"sdio-pwrseq" at mainbus0 not configured
"vibrator" at mainbus0 not configured
"vcc-sysin" at mainbus0 not configured
"vcc5v0-host-regulator" at mainbus0 not configured
"vcc5v0-typec-regulator" at mainbus0 not configured
"vcc3v3-sys" at mainbus0 not configured
"vcc-4g-5v" at mainbus0 not configured
"vcc-4g" at mainbus0 not configured
"vcc1v8-codec-regulator" at mainbus0 not configured
"vcc1v8-lcd" at mainbus0 not configured
"vcc2v8-lcd" at mainbus0 not configured
"vcc1v8-s3" at mainbus0 not configured
"typec-extcon" at mainbus0 not configured
"led-controller" at mainbus0 not configured
"binman" at mainbus0 not configured
"dfi" at mainbus0 not configured
rkrng0 at mainbus0: ver 1
"dmc" at mainbus0 not configured
"config" at mainbus0 not configured
bwfm0 at sdmmc0 function 1
manufacturer 0x02d0, product 0xa9bf at sdmmc0 function 2 not configured
manufacturer 0x02d0, product 0xa9bf at sdmmc0 function 3 not configured
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Apacer, SD32G, 0060> removable
sd0: 29580MB, 512 bytes/sector, 60579840 sectors
scsibus1 at sdmmc2: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, A3A442, 0000> removable
sd1: 118000MB, 512 bytes/sector, 241664000 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (ec1fd27f6f300fe2.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
cpu0: regulator not implemented
rkdrm0: no display interface ports configured
bwfm0: failed loadfirmware of file brcmfmac43455-sdio.pine64,pinephone-pro.bin
Automatic boot in progress: starting file system checks.
/dev/sd0a (ec1fd27f6f300fe2.a): file system is clean; not checking
/dev/sd0l (ec1fd27f6f300fe2.l): file system is clean; not checking
/dev/sd0d (ec1fd27f6f300fe2.d): file system is clean; not checking
/dev/sd0f (ec1fd27f6f300fe2.f): file system is clean; not checking
/dev/sd0g (ec1fd27f6f300fe2.g): file system is clean; not checking
/dev/sd0h (ec1fd27f6f300fe2.h): file system is clean; not checking
/dev/sd0k (ec1fd27f6f300fe2.k): file system is clean; not checking
/dev/sd0j (ec1fd27f6f300fe2.j): file system is clean; not checking
/dev/sd0e (ec1fd27f6f300fe2.e): file system is clean; not checking
pf enabled
starting network
reordering: ld.so libc libcrypto sshd.
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
starting local daemons: cron.
Sun Jul  9 12:49:40 UTC 2023
reorder_kernel: failed -- see /usr/share/relink/kernel/GENERIC.MP/relink.log

OpenBSD/arm64 (vm.my.domain) (console)

login: root
Password:
Last login: Sun Jul  9 12:35:19 on console
OpenBSD 7.3-current (GENERIC.MP) #2182: Thu Jul  6 15:02:37 MDT 2023

<--- cut --->

Reply via email to