hardkernel/linux — pull request #45 by rzk (2014-05-05 20:07:41+00:00)
Title: Preliminary support for s5k4ecgx 5Mp camera sensor

Hello,

This is a preliminary support for CSI camera, *dont merge it before testing*, pull request is created only to gather debugging info.

Recently I've been busy trying to bring this up, after having conversation with FIMC driver authors I've finally figured everything out and this should work, however, doing experiments, I killed my s5k4ecgx camera and I can't test these last changes that were suggested by them.

I hope somebody with this camera could try running this and post dmesg logs.

To get this working you need:
1. cp firmware/s5k4ecgx.bin /your/rootfs/lib/firmware/
2. build kernel using modified odroidx2_defconfig
3. start the system, you should have something like this:
```
[ 2.326740] s5p-fimc exynos4-fimc.0: sclk_fimc rate is 176000000
[ 2.337412] s5p-fimc exynos4-fimc.0: start latency exceeded, new value 583 ns
[ 2.344522] s5p-fimc exynos4-fimc.0: state restore latency exceeded, new value 15875 ns
[ 2.352443] s5p-fimc exynos4-fimc.0: stop latency exceeded, new value 667 ns
[ 2.359458] s5p-fimc exynos4-fimc.0: state save latency exceeded, new value 3375 ns
[ 2.359522] s5p-fimc exynos4-fimc.1: sclk_fimc rate is 176000000
[ 2.373026] s5p-fimc exynos4-fimc.1: start latency exceeded, new value 417 ns
[ 2.380194] s5p-fimc exynos4-fimc.1: state restore latency exceeded, new value 15250 ns
[ 2.388231] s5p-fimc exynos4-fimc.1: stop latency exceeded, new value 500 ns
[ 2.395213] s5p-fimc exynos4-fimc.1: state save latency exceeded, new value 2625 ns
[ 2.395276] s5p-fimc exynos4-fimc.2: sclk_fimc rate is 176000000
[ 2.408783] s5p-fimc exynos4-fimc.2: start latency exceeded, new value 458 ns
[ 2.415928] s5p-fimc exynos4-fimc.2: state restore latency exceeded, new value 15333 ns
[ 2.423952] s5p-fimc exynos4-fimc.2: stop latency exceeded, new value 500 ns
[ 2.430925] s5p-fimc exynos4-fimc.2: state save latency exceeded, new value 2417 ns
[ 2.433544] s5p-fimc exynos4-fimc.3: sclk_fimc rate is 176000000
[ 2.444504] s5p-fimc exynos4-fimc.3: start latency exceeded, new value 500 ns
[ 2.451648] s5p-fimc exynos4-fimc.3: state restore latency exceeded, new value 15042 ns
[ 2.481136] s5p-fimc exynos4-fimc.3: stop latency exceeded, new value 625 ns
[ 2.488271] s5p-fimc exynos4-fimc.3: state save latency exceeded, new value 3500 ns
[ 2.488799] s5p-fimc-md: Registered fimc.0.m2m as /dev/video10
[ 2.488971] s5p-fimc-md: Registered fimc.0.capture as /dev/video11
[ 2.489160] s5p-fimc-md: Registered fimc.1.m2m as /dev/video12
[ 2.489326] s5p-fimc-md: Registered fimc.1.capture as /dev/video13
[ 2.489486] s5p-fimc-md: Registered fimc.2.m2m as /dev/video14
[ 2.489645] s5p-fimc-md: Registered fimc.2.capture as /dev/video15
[ 2.489804] s5p-fimc-md: Registered fimc.3.m2m as /dev/video16
[ 2.489962] s5p-fimc-md: Registered fimc.3.capture as /dev/video17
[ 2.489974] s5p-mipi-csis.0: csis0 sd: s5p-mipi-csis.0
[ 2.548697] s5p-fimc exynos4-fimc.0: state restore latency exceeded, new value 15959 ns
[ 2.558870] s5k4ecgx: FW version check failed!
[ 2.563253] s5p-fimc-md: Failed to acquire subdev s5k4ecgx, deferring probe
```
This means that FIMC and CSI insterface brought up, but camera did not answer (NAK) on I2C bus. If you'll have a working camera (that I lack right now), you will, hopefully, have a table showing FIMC<->CSI routing.

Next after getting FIMC linked to CSI is getting FIMC-IS working, it is already sort-of working in 3.14, but lacks the firmware, which, I believe, can be copied from android BSPs. With that we will be able to run simple ioctls to FIMC-IS and have it detect faces/etc.video functions.

Best Regards,
Dmitriy Beykun