I am working on building a modular system with Jetson TX2 where you can exchange different camera modules connected to the CSI port (after power-down, of course). My implementation will be based on how the OV5693 camera EEPROM (included with TX2 Dev Kit) interact with the plugin-manager and bootloader (cboot) to overlay the required device-tree nodes.
I can see from the cboot log that it reads the module EEPROM (24C02) that is connected to camera’s I2C bus addressed 0x54. I extracted its content using i2cdump and found that it uses the same EEPROM format as documented in https://developer.nvidia.com/embedded/dlc/tx1-tx2-module-eeprom-layout. (see below)
I assume that the cboot reads a string related to the part number and creates a device-tree node, then plugin-manager takes that node and match it with a pre-configured matching pattern. In this case it’s "ids = “3326-*” found on tegra186-quill-camera-plugin-manager.dtsi.
I would like to implement a similar scheme for my custom-made camera board with an EEPROM. However, this whole process is not well documented. I am also not sure whether I had the correct assumption, so I want to make sure I fully understand the plugin-manager before going any further. What I essentially need is either
- source code for cboot / nvtboot
- documentation of the plugin-manager
For the source code, I tried to locate it on https://nv-tegra.nvidia.com/gitweb/, but only found U-boot.
Bootlog
[0001.174] I> Welcome to Cboot
---
[0001.846] I> Find /i2c@3180000’s alias i2c2
[0001.850] I> Reading eeprom i2c=2 address=0x54
[0001.854] I> Enablindtb (bin_type 1)
[0003.373] I> Kernel DTB @ 0x92000000
---
[0003.504] I> Updated bootarg info to DTB
[0003.508] E> "plugin-manager" doesn’t exist, creating
---
[0003.582] I> create_pm_ids: id: 3326-1000-100-M, len: 15
---
[0003.622] E> "module@0x57" doesn’t exist, creating
[0003.627] I> Adding plugin-manager/ids/3326-1000-100=/i2c@3180000:module0x70000000] to /memory
---
U-Boot 2016.07-g9c3b9a4 (Mar 01 2018 - 20:41:10 -0800)
---
Starting kernel ...
---
[ 0.138901] Initializing plugin-manager
[ 0.138953] Plugin module not found
---
[ 0.146099] node /plugin-manager/fragment-e3326@0 match with board 3326-*
---
OV5693 camera’s EEPROM from TX2 Dev Kit
Name Value Start Size Comment
uint16 version 1 0h 2h Board ID, EEPROM format version.
uint16 size 7 2h 2h Length of board ID data; no longer supported.
uint16 board_no 3326 4h 2h board ID
uint16 sku 1000 6h 2h 1000 is the Jetson TX1/TX2 SKU
ubyte fab 1 8h 1h
char rev 77 'M' 9h 1h single capital letter, the manufacturing major revision
char minor_rev 0 Ah 1h single decimal digit, the manufacturing minor revision
ubyte mem_type 255 Bh 1h
ubyte pwr_cfg 255 Ch 1h
ubyte misc_cfg 255 Dh 1h
ubyte modem_cfg 255 Eh 1h
ubyte touch_cfg 255 Fh 1h
ubyte disp_cfg 255 10h 1h
ubyte rework_lvl 0 11h 1h
uint16 sno 6691 12h 2h serial no.?
char assetf1[30] 699-83326-1000-100 M.0 14h 1Eh Product Part Number*, used for asset tracking.
ubyte wifi_mac[6] FF:FF:FF:FF:FF:FF 32h 6h Factory default Wi-Fi MAC address.
ubyte bt_mac[6] FF:FF:FF:FF:FF:FF 38h 6h Factory default BT MAC address.
ubyte second_wifi_mac[6]FF:FF:FF:FF:FF:FF 3Eh 6h Secondary Wi-Fi MAC address.
ubyte eth_mac[6] FF:FF:FF:FF:FF:FF 44h 6h Factory default Gigabit Ethernet MAC address.
char assetf2[15] 0325017206691 4Ah Fh Asset tracking number, a unique string corresponding to the number on the device’s identifying sticker. A character string padded with 0x00 or 0xFF characters.
ubyte reserved[61] 59h 3Dh Reserved for future use.
char cust_block_sig[4] "FFFF" 96h 4h Block signature; stands for "NVIDIA Configuration Block."
uint16 cust_block_len 65535 9Ah 2h Length of this struct from block signature to end. Value is subject to change.
char cust_type_sig[2] "FF" 9Ch 2h Format of following MAC address data: "MAC address, field format version 1."
uint16 cust_ver 65535 9Eh 2h Version.
ubyte cust_wifi_mac[6] FF:FF:FF:FF:FF:FF A0h 6h Vendor-specified Wi-Fi MAC address.
ubyte cust_bt_mac[6] FF:FF:FF:FF:FF:FF A6h 6h Vendor-specified Wi-Fi MAC address.
ubyte cust_eth_mac[6] FF:FF:FF:FF:FF:FF ACh 6h Vendor-specified Gigabit Ethernet MAC address. Last field in the struct whose length is in bytes 154-155.
ubyte cust_reserved[77] B2h 4Dh Reserved for future use.
ubyte checksum 17h FFh 1h CRC-8 computed for bytes 0-254.