[libcamera-devel] MS Surface Go camera not working

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jan 3 12:54:29 CET 2020


Hello Olivier,

On Fri, Jan 03, 2020 at 09:29:43AM +0100, Olivier Fauchon wrote:
> Hi Laurent, 
> 
> Thanks for your feedback.
> 
> 1/ Camera drivers 
> 
> I found ov2740 and imx135 sensors drivers in a LG G3 Kernel sources: 
> 
> https://github.com/daeiron/LG_G3_Kernel/blob/master/drivers/media/platform/msm/
> camera_v2/sensor/ov2740.c 
> https://github.com/daeiron/LG_G3_Kernel/blob/master/drivers/media/platform/msm/
> camera_v2/sensor/imx135.c 
> 
> The first job is to 'port' these drivers to the Linux Kernel, right ? 

Correct. Note that the above drivers are likely not the best candidates
to start from. For the IMX135, [1] looks better as it uses the V4L2
subdev API already. For the OV2740 a quick search didn't turn up a V4L2
subdev driver, and the above link doesn't contain any sensor register
settings, so you'll need to dig more. There's also no leaked datasheet
that I could easily find :-(

[1] https://elixir.bootlin.com/linux/v4.14/source/drivers/staging/media/atomisp/i2c/imx/imx.c

> 2/ ACPI Binding
> 
> Do you have an example of a ChromeOS  "CIO2 ACPI device entry"  that works ? 
> I'd like to understand what is missing in MS ACPI tables first.

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/refs/heads/release-R79-12607.B/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi

The sources are scattered across a few files but they shouldn't be too
difficult to navigate. You will notice how the _DSD is populated with
data that ressemble the DT bindings commonly used to describe cameras
(see Documentation/devicetree/bindings/media/video-interfaces.txt and
Documentation/devicetree/bindings/graph.txt in the Linux kernel
sources).

> Can I 'patch' my ACPI tables to add these missing entries ?
> At least for testing/developpement stage ...

You can patch the DSDT to start with, yes. It will be more than adding
missing entries, you will likely need to rewrite the description of the
CIO2 and the sensors completely.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list