On Sat, Apr 23, 2022 at 04:44:57PM +0000, Joseph wrote:
> Since the PinePhone non-pro based on Allwinner A64 is becoming less
> relevant (is it even sold anymore?) now that the PinePhone Pro based on
> RockChip RK3399S is around, I split off the conversation about it to
> this separate thread with slightly different subject line.
> 
> 
> Hi, thank you for emailing back. Indeed read your previous ML posts
> about the PinePhone.

Hi Joseph,

Thanks for inviting me to this thread in a private email.  I'll try to give
answers to the current state of things for me.   I have a pinephone pro which 
I got as a christmas present from my parents.  I personally want just an ipod
functionality on this without the SIM card used but if it works I won't say
no to 4G networking.

So when I got this it was preinstalled with Linux Manjaro, but there was some
problems with the sound at the time.  I bought a few things such as 2 microSD
cards (1 for another Linux, 1 for OpenBSD trials), I put Mobian Linux on the
one and sound worked well.  But I'm not entirely happy with the way the phone
behaves and I really want to program my own X11 programs for it.

So I got this 3.5mm sound adapter where I was able to put pins on with a 
screwdriver, where I was able to attach my CP2102 UART to USB adapter to.
Here is an image:  

https://blog.centroid.eu/graphics/cp2102-pinout-pinephone-pro.jpg

which turned out to be OMTP layout:

https://en.wikipedia.org/wiki/Phone_connector_(audio)#TRRS_standards

Which confused me a lot and I mailed Crystal if she knew better.  Turns out
I just had to put ground to the mic in this so that it behaves like a CTIA.

This seems to be confirmed on pine64's wiki (under the pinebook pro).

So with linux I could get login:'s with this with cu -l /dev/cuaU0 -s 1500000

So I needed to get OpenBSD installer going.  What I did was I built u-boot for
arm, with another patch that I found somewhere (I can't remember where now)
from Martijn Braam with the subject:  
        "[PATCH] rockchip: Add initial support for the PinePhone Pro"
I have the file for this still on my computer but the mail eludes me where I
found this (I thought it was from pine64's wiki).  Anyhow that worked and i
followed the rockchip 3399 instructions from OpenBSD's install file to get
this on the microsd card.

With this I was able to boot into the installer seeing kernel dmesg at
1500000 and then reconnecting cu at 115200 to see the console.  bwfm(4) was
detected but I couldn't make it work, so I got an adapter of USB-C to USB-A and
attaching a powered USB hub to it where I added an axen(4) ethernet adapter,
and that allowed me to do a netinstall over HTTP.

So I'm gonna post the dmesg, see you after it:

---------->
OpenBSD 7.1 (GENERIC.MP) #1623: Mon Apr 11 21:43:05 MDT 2022
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4089053184 (3899MB)
avail mem = 3887673344 (3707MB)
random: good seed from bootblocks
mainbus0 at root: Pine64 Pinebook Pro
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2
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.9
efi0: Das U-Boot rev 0x20220400
apm0 at mainbus0
agintc0 at mainbus0 sec shift 3:3 nirq 288 nredist 6 ipi: 0, 1: 
"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
syscon27 at mainbus0: "syscon"
"io-domains" at syscon27 not configured
"usb2phy" at syscon27 not configured
"usb2phy" at syscon27 not configured
rkemmcphy0 at syscon27
"pcie-phy" at syscon27 not configured
rktcphy0 at mainbus0
rktcphy1 at mainbus0
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
pwmreg0 at mainbus0
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
rkpcie0 at mainbus0
rkpcie0: PHY PLL lock timeout
rkpcie0: link training timeout
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, mmc 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
ohci0 at mainbus0: version 1.0
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
ohci1 at mainbus0: version 1.0
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
rkdwusb1 at mainbus0: "usb"
xhci1 at rkdwusb1rktcphy1: timeout waiting for PMA
, xHCI 1.10
usb3 at xhci1: USB revision 3.0
uhub3 at usb3 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
iic0 at rkiic0
escodec0 at iic0 addr 0x11
rkiic1 at mainbus0
iic1 at rkiic1
com0 at mainbus0: dw16550, 64 byte fifo
com1 at mainbus0: dw16550, 64 byte fifo
com1: console
"spi" at mainbus0 not configured
rktemp0 at mainbus0
rkrng0 at mainbus0
rkiic2 at mainbus0
iic2 at rkiic2
rkpmic0 at iic2 addr 0x1b: RK808
rkpmic0: can't read register 0x2f
rkpmic0: can't read register 0x2f
rkpmic0: can't write register 0x2f
rkpmic0: can't read register 0x33
rkpmic0: can't read register 0x33
rkpmic0: can't write register 0x33
rkpmic0: can't read register 0x38
rkpmic0: can't read register 0x38
rkpmic0: can't write register 0x38
rkpmic0: can't read register 0x3b
rkpmic0: can't read register 0x3d
rkpmic0: can't read register 0x3f
rkpmic0: can't read register 0x3f
rkpmic0: can't write register 0x3f
rkpmic0: can't read register 0x41
rkpmic0: can't read register 0x41
rkpmic0: can't write register 0x41
rkpmic0: can't read register 0x43
rkpmic0: can't read register 0x43
rkpmic0: can't write register 0x43
rkpmic0: can't read register 0x45
rkpmic0: can't read register 0x45
rkpmic0: can't write register 0x45
rkpmic0: can't read register 0x47
rkpmic0: can't read register 0x47
rkpmic0: can't write register 0x47
rkpmic0: can't read register 0x49
rkpmic0: can't read register 0x49
rkpmic0: can't write register 0x49
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
cwfg0 at iic3 addr 0x62: failed to initialize device
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
"iommu" at mainbus0 not configured
"iommu" at mainbus0 not configured
simpleaudio0 at mainbus0
"edp" at mainbus0 not configured
"gpu" at mainbus0 not configured
"opp-table0" at mainbus0 not configured
"opp-table1" at mainbus0 not configured
"opp-table2" at mainbus0 not configured
pwmbl0 at mainbus0
"battery" at mainbus0 not configured
simplepanel0 at mainbus0
gpiokeys0 at mainbus0: "Lid"
gpiokeys1 at mainbus0: "Power"
gpioleds0 at mainbus0: "power", "standby"
"sdio-pwrseq" at mainbus0 not configured
simpleaudio1 at mainbus0
simpleamp0 at mainbus0
"vcc-sysin" at mainbus0 not configured
"vcc-12v" at mainbus0 not configured
"vcc3v3-sys" at mainbus0 not configured
"vcc5v0-usb-regulator" at mainbus0 not configured
"vcc-0v9" at mainbus0 not configured
"vcc1v8-s3" at mainbus0 not configured
"vcc3v0-sd" at mainbus0 not configured
"vcc3v3-panel" at mainbus0 not configured
"vcc3v3-ssd" at mainbus0 not configured
"vcc5v0-otg" at mainbus0 not configured
"vbus-5vout" at mainbus0 not configured
"vcca0v9-s3" at mainbus0 not configured
gpiocharger0 at mainbus0: "mains"
usb4 at ohci0: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
usb5 at ohci1: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
audio0 at simpleaudio1
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SN128, 0080> removable
sd0: 121942MB, 512 bytes/sector, 249737216 sectors
fusbtc0: attached (sink)
fusbtc0: connected in device mode
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
fusbtc0: can draw 500 mA
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 (63e3a0cc58b889bf.a) swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
rkpmic0: can't read RTC
WARNING: bad clock chip time
WARNING: CHECK AND RESET THE DATE!
rkpmic0: can't read register 0x33
cpu0: regulator not implemented
rkdrm0: no display interface ports configured
bwfm_sdio_buf_write: error 35
bwfm0: address 14:13:33:0f:4e:29
rkpmic0: can't write register 0x10
rkpmic0: can't write register 0x10
rkpmic0: can't write RTC
WARNING: can't update clock chip time
<----------

Note: why it says pinebook pro here is beyond me, I must have screwed something
up in building u-boot.

This is with rkanxdp(4) disabled because it hangs on boot.  I'm not going to
give you my eeprom -p but I have it, just to let you know.

The bwfm0 works with having renamed the raspberry pi firmware file in 
/etc/firmware.  Though it has trouble associating (I guess i got the bad
version of the bwfm(4) driver, I do intend to patch it.

The RK818 post I sent was regarding the rkpmic(4) driver but i'm stalled on it.
What I need to do is perhaps boot the phone in Linux and compare device
addresses for the driver because as it is the RK818 doesn't want any registers
written or read, so it's useless to mainly everyone.  Without this the phone
can really be used sparingly as it gets hot quickly.

That's my status update for you Joseph (and others who may be interested).

Finally I'm interested in sharing back code to whoever wants it so that this
device gets supported, I believe in Open Source.

Best Regards,
-peter

Reply via email to