You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not too familiar with the process of contributing it to this project as patches. I would appreciate any help in that regard!
Can you open a PR with those changes at https://github.com/linux-surface/kernel? Ideally you should also submit them upstream to the kernel mailing lists (if you do that I can also pull the patches in from there if you send me the lkml link or CC me).
I'm not too familiar with the process of contributing it to this project as patches. I would appreciate any help in that regard!
Can you open a PR with those changes at https://github.com/linux-surface/kernel? Ideally you should also submit them upstream to the kernel mailing lists (if you do that I can also pull the patches in from there if you send me the lkml link or CC me).
Thanks!
Will open a PR soon. I need to clean up the code I have and write up a documentation about its quirks!
@toorajtaraz May I ask how you figured out handling the GPIO mappings? The only public documentation I can find is the kernel sourve itself.
I went with educated guesses. Looking at all OV drivers I won't believe any of them are written by hand. The ov5693.c and ov13858.c that I looked at were mostly boilerplate code.
I assumed that regulators need to be turned on, reset and the clock set. I played around with them and added random delays here and there until it worked. As for ov5693, it was mostly complete. Very minor changes were required.
Finally the intel_skl_int3472_discrete would just fail upon seeing GPIO types it didn't recognize. This just seemed super weird to me. The essential pins were already recognized, avdd, vdd, clock and more. So I figured maybe I should just skip over them. The front camera had all of its pins properly assigned and recognized but 0x10 for what I'm guessing is the IR and 0x08 for the rear camera was unknown. Currently I'm treating 0x08 as an extra regulator pin. Seems to be working but I'm not 100 percent sure. I will experiment more with it.
Also it's worth mentioning that I dumped and decompiled the acpi tables. That was very helpful!
I'll try to document exactly what I did so that others can improve upon it and complete what is left!
Reacted by Heechul Ryu, Maximilian Luz, Ferenc Géczi and lachietg
The front and back cameras initialize reliably in qcam, but there are still a few issues:
Both cameras are flipped upside down
The image is super noisy and washed out
The back camera appears to be stuck focused at infinity (probably needs a lens driver)
As for the IR camera: Its model is listed as VD55G0 in the wiki, and the DSDT lists its hardware ID as SMO55F0. This sensor is not supported by the kernel, so it looks like we'll have to write a driver from scratch.
The front and back cameras initialize reliably in qcam, but there are still a few issues:
* Both cameras are flipped upside down
* The image is super noisy and washed out
* The back camera appears to be stuck focused at infinity (probably needs a lens driver)
As for the IR camera: Its model is listed as VD55G0 in the wiki, and the DSDT lists its hardware ID as SMO55F0. This sensor is not supported by the kernel, so it looks like we'll have to write a driver from scratch.
I just got the lens driver to work, but libcamera doesn't seem to have an autofocus algorithm for ipu6 yet. Raw lens focus values can be set via v4l2-ctl.
The ACPI tables on my SP9 report that the cameras are mounted normally, not upside down. A driver quirk is probably needed to fix the camera orientation for specific hardware IDs.
I just got the lens driver to work, but libcamera doesn't seem to have an autofocus algorithm for ipu6 yet. Raw lens focus values can be set via v4l2-ctl.
The ACPI tables on my SP9 report that the cameras are mounted normally, not upside down. A driver quirk is probably needed to fix the camera orientation for specific hardware IDs.
The rotation is annoying, as the ipu-bridge.c code should solve it by checking the SSDB buffer in ACPI for a field describing the camera's orientation and then building the necessary firmware properties for v4l2 to automatically detect and correct it. That that's not happening suggests that the SSDB buffer is different -_-
Activity
Ferenc- commentedon Oct 10, 2025
Wow, hats off!
I think the best way to start would be to open a PR, and even if you can only post a patch here, then many would gladly take a look.
toorajtaraz commentedon Oct 10, 2025
Now the rear camera is also working. I might look into the IR later if I have the time!
qzed commentedon Oct 10, 2025
@toorajtaraz Nice work!
Can you open a PR with those changes at https://github.com/linux-surface/kernel? Ideally you should also submit them upstream to the kernel mailing lists (if you do that I can also pull the patches in from there if you send me the lkml link or CC me).
qzed commentedon Oct 10, 2025
@djrscally maybe this is interesting for you as well.
petm5 commentedon Oct 10, 2025
@toorajtaraz May I ask how you figured out handling the GPIO mappings? The only public documentation I can find is the kernel sourve itself.
toorajtaraz commentedon Oct 10, 2025
Thanks!
Will open a PR soon. I need to clean up the code I have and write up a documentation about its quirks!
toorajtaraz commentedon Oct 10, 2025
I went with educated guesses. Looking at all OV drivers I won't believe any of them are written by hand. The ov5693.c and ov13858.c that I looked at were mostly boilerplate code.
I assumed that regulators need to be turned on, reset and the clock set. I played around with them and added random delays here and there until it worked. As for ov5693, it was mostly complete. Very minor changes were required.
Finally the intel_skl_int3472_discrete would just fail upon seeing GPIO types it didn't recognize. This just seemed super weird to me. The essential pins were already recognized, avdd, vdd, clock and more. So I figured maybe I should just skip over them. The front camera had all of its pins properly assigned and recognized but 0x10 for what I'm guessing is the IR and 0x08 for the rear camera was unknown. Currently I'm treating 0x08 as an extra regulator pin. Seems to be working but I'm not 100 percent sure. I will experiment more with it.
Also it's worth mentioning that I dumped and decompiled the acpi tables. That was very helpful!
I'll try to document exactly what I did so that others can improve upon it and complete what is left!
toorajtaraz commentedon Oct 11, 2025
Here is my PR with the patch if anyone is interested!
@petm5 I hope you can successfully get it working! It's good enough for zoom meetings, which is all I need it for. :D
petm5 commentedon Oct 14, 2025
@toorajtaraz Thank you for your PR! It really helped me create my own patchset, which you can find here: petm5/linux@6.16.9...petm5:linux:sp9-camera-enablement
The front and back cameras initialize reliably in qcam, but there are still a few issues:
As for the IR camera: Its model is listed as
VD55G0in the wiki, and the DSDT lists its hardware ID asSMO55F0. This sensor is not supported by the kernel, so it looks like we'll have to write a driver from scratch.djrscally commentedon Oct 14, 2025
Oh good job @toorajtaraz! I missed this a few days ago, but I'll take a look at the PR tomorrow. Congratulations :)
toorajtaraz commentedon Oct 14, 2025
@petm5 I'm glad you got it working!
Regarding the IR camera I came to the same conclusion!
toorajtaraz commentedon Oct 14, 2025
@djrscally Perfect! I look forward to hearing your thoughts!
derkrasseleo commentedon Oct 15, 2025
Is there a way to test this on fedora?
petm5 commentedon Oct 15, 2025
I just got the lens driver to work, but libcamera doesn't seem to have an autofocus algorithm for ipu6 yet. Raw lens focus values can be set via v4l2-ctl.
The ACPI tables on my SP9 report that the cameras are mounted normally, not upside down. A driver quirk is probably needed to fix the camera orientation for specific hardware IDs.
djrscally commentedon Oct 16, 2025
The rotation is annoying, as the ipu-bridge.c code should solve it by checking the SSDB buffer in ACPI for a field describing the camera's orientation and then building the necessary firmware properties for v4l2 to automatically detect and correct it. That that's not happening suggests that the SSDB buffer is different -_-
pythonpoet commentedon Nov 1, 2025
I got it working for a short moment on a Surface Pro 8. but now ov5693 (camera sensor) has no power anymore!