# JETSON TX2/Cyclone 10GX Custom board Debug Journal
## **CHIMERA**: **C**o-processors' **H**eterogeneity **I**ntegration for smart ca**MERA**s
"Si la perfection n'était pas chimérique, elle n'aurait pas tant de succès." -Napoléon Bonaparte.
**Known Issues:**
- <s>Jetson TX2 seems not to be booting correctly on the MDB, possible reasons:</s>
- <s>No interface seems to be working properly. Tested interfaces: Console through serial (UART), HDMI, Ethernet (always on stand by) and USB.</s>
- <s>Checking the VMC connector (main connector to the TX2 module 50x8 pins) the TX2 seems to be routed differently.</s>
- <s>HDMI interface is not working. GPIO expander I2C interface on the custom board has a different address. Writing to a wrong address does not enable the HDMI_EN_5V0 pin. Modify it on the DTB. </s>
- HDMI interface works, but not on boot. U-boot is not finding the right driver to configure correctly the PCAL6416A.
- <s>SD card is not working correctly. The regulator (vmmc regulator of device mmc2 on the DT is toggling between enable and disable). The system does not boot when SD is plugged in. </s>
- <s>I short-circuited one of the cards while testing :( Never let the solder get near to a shield, some nasty fireworks will start... Being currently repaired.</s>
- <s>CSI-2 MIPI ports may work, but I cannot find a working driver for the 2-lane camera I'm using to test (OV5640). Camera on the devkit (OV5693) is a 4-lane and does not work with current camera. Don't have time to start from scratch or to modify an existing driver... keep searching.</s>
- PCIe x4 Gen2 designs must be programmed before the boot of the TX2 and driver must be re-installed on each boot. Otherwise Linux does not recognize the device.
- <s>USB3.1 Interface is not working. USB hub is not found by the TX2. Not even Linux USB hub is detected.</s>
- DDR3 memory clock on C10GX FPGA has to be programmed. Otherwise, memory is unusuable.
- <s>FAN regulator is not detected on the TX2. Since I2C GPIO expander TCA9539 on address 0x74 is not on board, driver is not able to configure the PWM pin FAN_PWM with PS_VDD_FAN_DISABLE. </s>
- The voltage/current/power monitor INA3221 on our board collides with the address 0x40 on the internal GPU.
**Possible solution:**
- Kernel must have a compiled and modified DTB (Device Tree Binary Blob) adepted to our board.
- Even if GPIOs, interfaces, etc. are not used this must be modified and compiled for a new DTB.
- Nvidia provides an Spreadsheet for JetsonTX2 modules that creates an own DT file ready to be compiled for DTB. Check with Project Service if pinout config is right.
- Check each SOM interface pinout (Pinmux) must be modified to our board.
- The SD card interface is powered through software (SDCARD_PWR_EN) on the TX2. The enable of the chip is toggling. Probably because input signal to SD card detection signal (SDCARD_CD#) is not being driven properly? Check the FET operation (low active). <s>DTB was not modified, supposed to work fine with the microSD configuration.</s> The DTB was modified to test for both logics on the pins. Checking during second week at Project Service in Bergamo...
- PCIe x4 Gen2 is working well with design tested for communication to internal memory and DDR3. However, it can get really hot after some time. Find some termal solution. Also, altera_dma.c driver should be modified and included on the DTB.
- Verify and modify DTB for USB3.0 + USB2.0. The pad and lanes seem not be well configured. There is also no power.
- There are two ways to program the DDR's clock: Either the FPGA has a logical block to initialize the DDR or the Jetson programs it after boot. To select the device that allows the configuration, jumper at CN10 and CN11 must be switched.
- INA3221 slave address an only be modified through hardware. Can we change address 0x40 to 0x43 connecting A0 to SCL (pin 5 to pin 6)?. <s>Change shunt resistor value on the DTB to 40 mOhms.</s>
**Solved issues:**
- Jetson TX2 SoM is now booting correctly. One resistor (R53 on JTAG interface) had a wrong value on the JTAG connector driving a wrong logic value not allowing the board to boot up. Now the **UART** serial console is working correctly.
- Multiple interface are working with minor issues after debugging:
- **Serial** console through UART: Wrong UART port was routed (UART31 from JTAG DBG instead of UART3). This can be modified on the Device Tree from the software side.
- **Ethernet** interface is working fine. SSH allows easy connection to the board.
- Some **I2C** interfaces on the board have to be deactivated (2 of the INA3221 monitors are not on the same address on our board) and others to be modified. The INA3221 for the FPGA supplies is now partially operational (3 buses work: 0.9V, 1.8V IO and 3.v3V STB) from the Jetson TX2. This means we can now plot in real-time CPU,GPU and FPGA. Check next point for th HDMI I2C GPIO expander.
- **HDMI** is now working but not on boot. Because the GPIO was modified from the original board (now using PCAL6416A), the I2C was writing to the wrong device (i2c@3160000 node gpio@20 Port 0 ADD 0x20), with the wrong addresses and the wrong commands. This was bypassed by configurating manually these commands. A driver must be found/made to modify not only addresses on DTB but also configure the device probing.
- **SD Card** is now being detected by the OS. Power sequence was not correct. Power supply was on before inserting the SD causing a bad initialization. Also, SDCARD_PWR_EN whas using the wrong enable logic. This was changed multiple times but it took no effects on the board. One node (regulator@1) on the DTB was overwritting the modification at the gpio, so no modification took effect. Not nice to verify a >15K code DTB to find out this was the issue. SDCARD_WP# was not used and was modified on our Pinmux version.
- **PCIe x4 Gen2** is working flawlessly. Altera driver and FPGA design for memory transfers between JetsonTX2 and Cyclone10GX (DDR3 and OnChip memory) is compiled and mounted using the command <code>sudo ./install cyclone10</code>. A warning is displayed because this driver is mounted outside the DT definition. Check if it can be brought to our DTB.
- **USB3.0** is now working. Two main issues were solved. The logic of pin USB_VBUS_EN1 was inverted, it now uses low-active logic. On the DTB the USB2.0 pad and lanes had to be deactivated for node xusb_padctl@3520000 and USBs PHY had to be defined for our board on node xhci@3530000.
- **PWM FAN** PWM is working disabling the driver on the DTB. Both fan-pwm and regulator@13 nodes are disabled. Enabling manual configuration is done following the instructions of site: https://developer.ridgerun.com/wiki/index.php?title=JetsonTX2/Linux_PWM_Pulse_Width_Modulator#Verify_PWM.
- **IMX219** support has been added to the MIPI 2-lane CSI (CN4). There were many issues with the porting of the IMX219 DTSI (RaspberryCam v2.1) from the Jetson Nano. The differential clock 'mclk' was not set correctly, on the JetsonTX2 it was changed to 'extperiph1'. The parameters in many resolution modes and FPS were not set adequately to the camera we had. The driver was functioning correctly. Test CHIMERA integrality with an OpenCV demo with a simple partition between TX2 and the C10GX.
**Start the camera Quick Start-up Guide for deliverable D4.4**