Hi Francescodario, Em Sun, 3 May 2020 09:19:55 +0000 Francescodario Cuzzocrea <francescodario.cuzzocrea@xxxxxxxxxxxxxx> escreveu: > Hi ! > > Thanks for this, it is very appreciated !! > > I have a bay trail 2in1 (namely, the acer aspire swtich 10 sw5-012, > with an OV2722 module, so supported by the driver) on top of which I > run android-x86-q so I would be able to help a bit with testing the > driver. > > I tried to pull in your changes on top of my 5.7-rc2 here : > https://gitlab.com/lineageos-x86/android_kernel_common/-/commits/5.7-media > > but I did not understood how to correctly enable the driver. > According > to Kconfig help, there is still the hardcoded switch between ISP2401 > and ISP2400, so for my Bay Trail tablet I should set : > > # > CONFIG_VIDEO_ATOMISP_ISP2401 is not set > > but settings this breaks compilation with : > > ERROR: modpost: > "ia_css_configure_sc"[drivers/staging/media/atomisp/atomisp.ko] > undefined! I'll double check and address this issue. > > Looking at commit history, I noticed that the driver should be able to > recognize at runtime the ISP version, Not yet. There are simply too many places there with checks for ISP2400 or ISP2401. I got rid of most of them, but there are 4 header files that contain ISP-version specific information, whose are used by several parts of the driver. Getting rid of it would require more work. > so what I tried next was to set > CONFIG_VIDEO_ATOMISP_ISP2401=y, and the compilation went fine. > I was able to boot the kernel (and I also added both > shisp_2400b0_v21.bin and shisp_2401a0_v21.bin from an android tablet > dump). > > The kernel booted fine, the ov2722 module is loaded, but according to > dmesg it is not able to initialize the hardware : > https://pastebin.com/VBMD1bau (transcribing the relevant messages from pastebin below) > ov2722 i2c-INT33FB: 00: gmin: initializing atomisp module subdev data.PMIC ID 1 > ov2722 i2c-INT33FB: 00: supply V1P2A not found, using dummy regulator > ov2722 i2c-INT33FB: 00: supply VPROG4B not found, using dummy regulator > ov2722 i2c-INT33FB: 00: supply Regulator1p8v not found, using dummy regulator > ov2722 i2c-INT33FB: 00: supply Regulator2p8v not found, using dummy regulator > ov2722 i2c-INT33FB: 00: unable to set PMC rate 1 > ov2722 i2c-INT33FB: 00: camera pdata: port: 0 lanes: 1 order: 00000000 > ov2722 i2c-INT33FB: 00: read from offset 0x300a error -121 > ov2722 i2c-INT33FB: 00: sensor_id_high = 0xffff > ov2722 i2c-INT33FB: 00: ov2722_detect err s_config. > ov2722 i2c-INT33FB: 00: sensor power-gating failed That's the same that happened with the tests we've done so far: it is not finding the regulators. I'm currently seeking for a solution to that. Usually, regulator data comes via OpenFirmware/Device Tree. However, ACPI BIOS store this on a different way. Some (missing) code would need to get the relevant parameters from the BIOS and setup the regulators. Btw, could you please send me a tarball with the output of your BIOS ACPI tables? You can get it with: $ sudo acpidump |bzip2 > acpi.log.bz2 Thanks, Mauro