[RFC 0/2] BCM283x Camera Receiver driver

Hans Verkuil hverkuil at xs4all.nl
Thu Aug 31 07:18:24 PDT 2017


On 30/08/17 13:04, Dave Stevenson wrote:
> On 30 August 2017 at 11:45, Hans Verkuil <hverkuil at xs4all.nl> wrote:
>> On 30/08/17 11:40, Dave Stevenson wrote:
>>> Hi Hans.
>>>
>>> On 28 August 2017 at 15:15, Hans Verkuil <hverkuil at xs4all.nl> wrote:
>>>> Hi Dave,
>>>>
>>>> What is the status of this work? I ask because I tried to use this driver
>>>> plus my tc358743 on my rpi-2b without any luck. Specifically the tc358843
>>>> isn't able to read from the i2c bus.
>>>
>>> I was on other things until last week, but will try to get a V2 sorted
>>> either this week or early next.
>>> The world moved on slightly too, so there are a few more updates
>>> around fwnode stuff that I ought to adopt.
>>>
>>>> This is probably a bug in my dts, if you have a tree somewhere containing
>>>> a working dts for this, then that would be very helpful.
>>>
>>> Almost certainly just pin ctrl on the I2C bus. The default for i2c0 is
>>> normally to GPIOs 0&1 as that is exposed on the 40 pin header
>>> (physical pins 27&28). The camera is on GPIOs 28&29 (alt0) for the
>>> majority of Pi models (not the Pi3, or the early model B).
>>
>> Yep, that was the culprit!
> 
> Great. I like easy ones :-)
> 
>> I now see the tc, but streaming doesn't work yet. I'm not getting any
>> interrupts in the unicam driver.
> 
> What resolution were you streaming at? There are a couple of things
> that come to mind and I don't have solutions for yet.
> Firstly the TC358743 driver assumes that all 4 CSI lanes are
> available, whilst the Pi only has 2 lanes exposed. IIRC 1080P30 RGB
> just trickles over into wanting 3 lanes with the default link
> frequencies and you indeed don't get anything if one or more lane is
> physically not connected.
> Secondly was the FIFOCTL register set via state->pdata.fifo_level that
> we discussed before. The default is 16, which is too small for some of
> the smaller resolutions. 300 seems reasonable. You do get frames in
> that situation, but they're generally corrupt.
> I'm intending to try and make the TC358743 more flexible than just
> accepting >720P, and if I can support multiple link frequencies then
> so much the better as 1080P50 UYVY should be just possible on 2 lane,
> however the lower resolutions are unlikely to work due to FIFO
> underflow.

Found the cause: bcm2835-rpi.dtsi had csi power-domains entries that
I missed. So the csi wasn't powered on :-)

After adding that it now works!

Regards,

	Hans




More information about the linux-rpi-kernel mailing list