summaryrefslogtreecommitdiff
path: root/wiki/GMSL_Camera_Setup.wiki
blob: b13b5d2d73188f1ff6156ae520289a430b85f9b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
h1. GMSL Camera Setup

h2. Details on system configuration

[[GMSL Configuration]]

h2. Open issues and testing

[[GMSL Cameras Open Issues and testing]]

h2. Software support

h3. External Patches:

h4. Cogent Patches:

https://github.com/CogentEmbedded/meta-rcar/blob/v2.23.0/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0030-Gen3-LVDS-cameras.patch

h4. NXP Patches:

https://community.nxp.com/docs/DOC-158531

h3. Linux kernel

A base branch is available at

* git://jmondi.org/linux-gen3#gmsl/base

The base branch includes VIN and mux support from Niklas' branch git://git.ragnatech.se/linux#vin/mux+gmsl
with the ""max9286: More cleanups and fixes" series from Laurent on top.
vin/mux+gmsl contains the GMSL link stabilization series from Niklas: [PATCH 0/4] GMSL link stabilization.

On top of this branch, some developers branch are available:

* git://jmondi.org/linux-gen3#gmsl/devel/jacopo
  Fixes sent out as "[PATCH v2 0/5] v4l: max9286: Additional fixes" + sensor configuration + link status monitoring

* git://jmondi.org/linux-gen3#gmsl/devel/jacopo-i2c-bcast
  gmsl/devel/jacopo branch with on top implementation of broadcast transmission of SEREN command to max9271 serializers

h3. Config

Configuration file for Linux-v4.13-rc5 available here: ("linux-v4.13-max9286.config":../../wiki/GMSL_Camera_Setup/linux-v4.13-max9286.config)

h1. I2C configuration

* The MAX9271 does appear to expose all traffic received across the GMSL link on it's I2C bus pins.
* There does not appear to be any cross-talk traffic currently.
* 'Bit-errors' have been seen ... most evidently when an address write incorrectly wrote to register 0x00 instead and 'forcefully' changed the MAX9271 address. All following writes were then 'NACKed'.
* This shows that auto-ack from the MAX9286 (which was enabled at that time) *does not* traverse the GMSL link.
* If the delays between bus configuration writes are not long enough - the following write/read can be corrupted with bit errors, or not be present on the bus at all.
** This shows that the delay after configuration writes must be conservative, and therefore at least 5 ms (recommended by the MAX9286 data sheet) rather than 3 ms or less (as suggested by the MAX9271 DS.


h1. I2C address space allocations

h2. The GMSL camera set up uses the I2C-4 bus on the RCar platform. This has the following pre-existing address assignments:

| Address | Physical | Part             | SCL | SDA | Description                                           |
|         | CN29     | EXIO-Connector C | 51  | 53  | MIPI CSI-2 Zebax Connector                            |
| 0x20    | U6       | PCA9654EDTR2G    | 14  | 15  | 8 bit IO Expander                                     |
| 0x68    | U11      | 9FGV0841AKILF    | 10  | 11  | Salvator-X Page 11 : 8 Output PCIe Clock Gen          |
| 0x6a    | U61      | 5P49V5923A       | 9   | 8   | Salvator-X Page 3  : Versaclock5                      |
| 0x70    | U31      | ADV7482WBBCZ     | J8  | K8  | Salvator-X Page 19 : ADV7482 HDMI Receiver            |
| 0x7C    | U58      | MAX9611AUB+      | 6   | 7   | Salvator-X Page 25 : Current Sense Amplifier with ADC |
| 0x7F    | U59      | MAX9611AUB+      | 6   | 7   | Salvator-X Page 25 : Current Sense Amplifier with ADC |

h2. Maxim Expansion Board

| Address | Physical | Part             | SCL | SDA | Description                                           |
| 0x4c    | U1       | MAX9286GTN/V+    | 8   | 7   | MAX9286 GMSL De-serialiser     (MAX9286 A)            |
| 0x6c    | U3       | MAX9286GTN/V+    | 8   | 7   | MAX9286 GMSL De-serialiser     (MAX9286 A)            |
|         |          |                  |     |     |                                                       |
| 0x30    | RDACM20  | OV10635 Default  |     |     | OV10635 Default address |
| 0x40    | RDACM20  | MAX9271 Default  |     |     | MAX9271 Default address |
| 0x50    | RDACM20  | Microcontroller  |     |     | Microcontroller (MCU) Default address |
ref='#n210'>210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
#! /usr/bin/env python3
#===============================
#
# html_task
#
# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
#===============================
import sys
import os
import re

import view
import html_base
from html_base import html
#====================================
#
# periject_html
#
#====================================
class periject_html(html_base.myhtml):

    re_http_url = re.compile(r'(https?://[\w/:%#\$&\?\(\)~\.=\+\-]+)')
    re_blank_line = re.compile(r'\n\n+')

    def __init__(self):
        super().__init__()

    def _link(self, text):
        match = periject_html.re_http_url.search(text)
        if not match:
            return text

        a = html("a", {"href": match.group(), "target": "_blank"})
        return match.string[:match.start()] + \
               a.text(match.group()) + \
               match.string[match.end():]

    #--------------------
    # task_commit_bsp
    #--------------------
    def task_commit_bsp(self, v):
        cnt = 0
        with html("table"):
            for b in self.bsp_list():
                bsp_list = v.get_data(b)
                if (not bsp_list):
                    continue
                with html("tr"):
                    html("th").print(b)
                    with html("td"):
                        cnt += self.print_commit_bsp(bsp_list)
        return cnt

    #--------------------
    # task_status
    #--------------------
    def task_status(self, v):
        dir		= os.path.dirname(v.file)
        assignee	= v.get_data("assignee")
        status		= v.get_data("status")
        team		= v.get_data("team")

        if (not len(assignee)):
            assignee = "NoAssignee"

        with html("table", {"border":"1"}):
            with html("tr"):
                html("th").print("file")
                html("th").print("status")
                html("th").print("team")
                html("th").print("assignee")
                html("th").print("key")

            with html("tr"):
                html("td").print(os.path.relpath(v.file, self.top()))
                html("td").print(html("a", {"target":"summary",
                                            "href":self.relpath("html/{}.html".format(status), dir)}).text(status))
                html("td").print(html("a", {"target":"summary",
                                            "href":self.relpath("html/{}.html".format(team), dir)}).text(team))
                html("td").print(html("a", {"target":"summary",
                                            "href":self.relpath("html/{}.html".format(assignee), dir)}).text(assignee))
                html("td").print(v.get_data("key"))

    #--------------------
    # _task_relation
    #--------------------
    def _task_relation(self, relationship, v, item):

        current_dir = os.path.dirname(v.file)
        related_file = v.get_related_file(relationship[item])

        if (not os.path.exists(related_file)):
            with html("tr"):
                html("td").print(item)
                html("td").print("Unknown({})".format(related_file))
            return

        rv = view.viewer([related_file])
        rv.set_data(related_file)
        with html("tr"):
            html("td").print(item)
            html("td").print(html("a", {"href":
                                        self.relpath_y2h(related_file, current_dir)}).text(rv.get_data("title")))

    #--------------------
    # task_relation
    #--------------------
    def task_relation(self, v):

        relationships = v.get_data("relationships")
        if (not relationships):
            return

        current_dir = os.path.dirname(v.file)

        with html("table", {"border":"1"}):
            for relationship in relationships:
                if ("parent" in relationship):
                    self._task_relation(relationship, v, "parent")
                if ("depends" in relationship):
                    self._task_relation(relationship, v, "depends")
                if ("blocks" in relationship):
                    self._task_relation(relationship, v, "blocks")

    #--------------------
    # task_head
    #--------------------
    def task_head(self, v):

        with html("table"):
            with html("tr"):
                with html("td"):
                    self.task_status(v)
                with html("td"):
                    self.task_relation(v)

    #--------------------
    # task_commit
    #--------------------
    def task_commit(self, v):

        has_bsp = 0
        for b in self.bsp_list():
            if (v.get_data(b)):
                has_bsp = 1
                break
        upstream = v.get_data("upstream")

        with html("table", {"border":"1"}):
            with html("tr"):
                if (has_bsp):
                    html("th").print("BSP")
                if (upstream):
                    html("th").print("upstream")
            with html("tr"):
                if (has_bsp):
                    with html("td"):
                        self.task_commit_bsp(v)
                if (upstream):
                    with html("td"):
                        self.task_commit_upstream(v)

    #--------------------
    # _task_comments
    #--------------------
    def _task_comments(self, v):

        if isinstance(v, list):
            with html("ul"):
                for comment in v:
                    with html("li"):
                        self._task_comments(comment)

        elif isinstance(v, dict):
            for key, value in v.items():
                html("p").print(self._link(key))
                with html("p"):