Skip to contentSkip to conversation

Front camera on pinephone

DISCUSSION Pavel Machek 3 participants 4 messages Jan 16, 2024 – Jan 24, 2024 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi!

In 6.8-rc0, driver for gc2145 (front camera on pinephone) was merged, but we don't have corresponding dts entries. Does anyone have setup where they can fix it easily?

[If you have hints how to set-up pinephone for kernel development, that would be welcome. Currently I have mobian with rather old 6.1 kernel on it, and lack of keyboard/ethernet makes things tricky.]

Best regards,
Pavel

Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
#1 lore raw

Hello Pavel,

Isn't this simply the case of picking the gc2145 bits from Megis tree?

https://megous.com/git/linux/tree/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi?h=orange-pi-5.10#n410

[For the pinephone kernel development there's the option of building the kernel using envkernel.sh in postmarketOS with https://wiki.postmarketos.org/wiki/Compiling_kernels_with_envkernel.sh which has some automation for building a kernel and pushing it to a connected device. Ethernet and keyboard are replaced by ssh and usb-networking in this case]

Greetings,
Martijn

Quoted 12 lines · Pavel Machek

Hi!

In 6.8-rc0, driver for gc2145 (front camera on pinephone) was merged, but we don't have corresponding dts entries. Does anyone have setup where they can fix it easily?

[If you have hints how to set-up pinephone for kernel development, that would be welcome. Currently I have mobian with rather old 6.1 kernel on it, and lack of keyboard/ethernet makes things tricky.]

Best regards,
Pavel

#2 lore raw

Hi!

Quoted 3 lines

Isn't this simply the case of picking the gc2145 bits from Megis tree?

https://megous.com/git/linux/tree/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi?h=orange-pi-5.10#n410

Well, that, adjusting dts bits to the new driver, testing and submitting the patch. And it looks someone did the work and patches are floating around. GOod :-).

I'm fighting with kexec crashing as soon as I pass dtb. Do I need to modify the dtb somehow?

Best regards,
Pavel

#3 lore raw
In reply to Pavel Machek

Am 16.01.24 um 09:05 schrieb Pavel Machek:

Quoted 3 lines

[If you have hints how to set-up pinephone for kernel development, that would be welcome. Currently I have mobian with rather old 6.1 kernel on it, and lack of keyboard/ethernet makes things tricky.]

So far I'm mostly using "pmbootstrap build --src" [1], which essentially builds the pmOS kernel package but replaces the source with the tree I point at. I keep thinking I should try envkernel.sh [2], which is supposed to set up cross-compiling with the usual make flow. Maybe that'd work with bindeb-pkg?

I don't know how well an unpatched mainline kernel would run, I'm currently using megi's 6.7 tree [3] plus the pmOS patches as the basis for my rtw88_8723cs development [4] (if you look at the history, it's v6.7 -> orangepi-6.7 -> pmos-6.7 -> rtw88_8723cs). I know megi's kernel has some DTS patches but haven't looked too deeply into the changes, maybe some could be upstreamed together with the camera part.

Regards,
Fiona

[1] https://wiki.postmarketos.org/wiki/Pmbootstrap#Building_packages
[2] https://wiki.postmarketos.org/wiki/Compiling_kernels_with_envkernel.sh
[3] https://xff.cz/git/linux/log/?h=orange-pi-6.7
[4] https://github.com/airtower-luna/linux/commits/rtw88_8723cs/