UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
4,098 Views
Registered: ‎09-02-2018

PetaLinux hangs on custom Ultra96 platform

Hi,

 

I'm trying to investigate a problem with a PetaLinux build for a custom platform (more details bellow) created for the Ultra96 board.

 

I successfully built PetaLinux for the new hardware platform, but the when I try to boot from SD card the boots hangs.

 

After some tries, I managed to get a boot log on the 3 pin UART (J6) connector. To do this, I interrupted U-Boot's automatic boot and executed the following commands:

 

ZynqMP> setenv bootargs console=ttyPS0 loglevel=8 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
ZynqMP> boot

 

This sets the kernel console to ttyPS0 (which is the 3 pin UART connector).

 

The boot gets hang, always at the same point, after the kernel founds a new serial port:

[    2.059935] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.068028] 80060000.serial: ttyS2 at MMIO 0x80061000 (irq = 46, base_baud = 6249993) is a 16550A
[ <-- displayed with 4-5 sec delay

Now, I'm not sure what could be the problem, but I came up with 2 theories so far:

  • there is a problem with this serial port - unlikely, as the official BSP (which works) also has this serial port (it is an AXI UART 16550 routed to the low speed header of the Ultra96)
  • or, the hang is caused by an another problem, but the kernel log gets redirected to ttyS2 (or another) and we don't see the rest of the log - this may happen, as normally, without the console=ttyPS0 parameter, the ttyPS0 get's enabled immediately after the above line are logged. Sample log:
    ...
    [    1.386856] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    1.388605] 80060000.serial: ttyS2 at MMIO 0x80061000 (irq = 45, base_baud = 6249993) is a 16550A
    [    1.389260] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 39, base_baud = 6249993) is a xuartps
    [    1.389548] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 40, base_baud = 6249993) is a xuartps
    [    2.391023] console [ttyPS0] enabled
    [    2.394843] [drm] Initialized

 

Can somebody help me investigate this? In case the log just gets redirected, how could I force it to remain on ttyPS0? In case of an another problem, how should I start investigating it?

 

---

Full boot log

 

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.2   Oct 13 2018  -  12:45:22
PMUFW:  v1.0


U-Boot 2018.01 (Oct 13 2018 - 15:06:31 +0300) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level:       EL2
Chip ID:        zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Model: ZynqMP ZCU100 RevC
Board: Xilinx ZynqMP
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
U-BOOT for xilinx-ultra96-reva-2018_2

Hit any key to stop autoboot:  0 
ZynqMP> setenv bootargs console=ttyPS0 loglevel=8 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
ZynqMP> boot
Device: sdhci@ff160000
Manufacturer ID: 58
OEM: 4444
Name: DDINC 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7003900 bytes read in 513 ms (13 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000108
     Data Size:    6960376 Bytes = 6.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   0aa6616d8883794f34dfcf9149245dfa6e4b67ab
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106a3704
     Data Size:    41602 Bytes = 40.6 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   2dae7512ad62e745d731838a360447634c36e968
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106a3704
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff2000, end 0000000007fff281 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP Sat Oct 13 15:12:10 EEST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] On node 0 totalpages: 519936
[    0.000000]   DMA zone: 7165 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 519936 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe6b000 s46488 r8192 d31336 u86016
[    0.000000] pcpu-alloc: s46488 r8192 d31336 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: console=ttyPS0 loglevel=8 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768660K/2079744K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48940K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] irq-xilinx: /amba_pl@0/interrupt-controller@80010000: num_irq=3, edge=0x0
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1710236356, max_idle_ns: 440795202549 ns
[    0.000004] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511099ns
[    0.008323] Console: colour dummy device 80x25
[    0.012594] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.99 BogoMIPS (lpj=399999)
[    0.022953] pid_max: default: 32768 minimum: 301
[    0.027647] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.034208] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.042022] ASID allocator initialised with 65536 entries
[    0.047278] Hierarchical SRCU implementation.
[    0.051876] EFI services will not be available.
[    0.056243] zynqmp_plat_init Platform Management API v1.0
[    0.061584] zynqmp_plat_init Trustzone version v1.0
[    0.066532] smp: Bringing up secondary CPUs ...
[    0.071214] Detected VIPT I-cache on CPU1
[    0.071256] CPU1: Booted secondary processor [410fd034]
[    0.071568] Detected VIPT I-cache on CPU2
[    0.071586] CPU2: Booted secondary processor [410fd034]
[    0.071877] Detected VIPT I-cache on CPU3
[    0.071895] CPU3: Booted secondary processor [410fd034]
[    0.071938] smp: Brought up 1 node, 4 CPUs
[    0.103354] SMP: Total of 4 processors activated.
[    0.108027] CPU features: detected feature: 32-bit EL0 Support
[    0.113825] CPU: All CPU(s) started at EL2
[    0.117898] alternatives: patching kernel code
[    0.123021] devtmpfs: initialized
[    0.130796] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.140335] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.152746] xor: measuring software checksum speed
[    0.197417]    8regs     :  2303.000 MB/sec
[    0.237446]    8regs_prefetch:  2053.000 MB/sec
[    0.281818]    32regs    :  2830.000 MB/sec
[    0.321849]    32regs_prefetch:  2381.000 MB/sec
[    0.326273] xor: using function: 32regs (2830.000 MB/sec)
[    0.331722] pinctrl core: initialized pinctrl subsystem
[    0.337486] NET: Registered protocol family 16
[    0.342728] cpuidle: using governor menu
[    0.347048] vdso: 2 pages (1 code @ ffffff8008a46000, 1 data @ ffffff8008de4000)
[    0.354247] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.361588] DMA: preallocated 256 KiB pool for atomic allocations
[    0.398039] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.405403] ARM CCI_400_r1 PMU driver probed
[    0.409916] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.430505] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.505036] raid6: int64x1  gen()   401 MB/s
[    0.577129] raid6: int64x1  xor()   446 MB/s
[    0.649175] raid6: int64x2  gen()   688 MB/s
[    0.721182] raid6: int64x2  xor()   603 MB/s
[    0.793208] raid6: int64x4  gen()  1042 MB/s
[    0.865264] raid6: int64x4  xor()   742 MB/s
[    0.937352] raid6: int64x8  gen()   980 MB/s
[    1.009361] raid6: int64x8  xor()   745 MB/s
[    1.081455] raid6: neonx1   gen()   726 MB/s
[    1.153470] raid6: neonx1   xor()   852 MB/s
[    1.225545] raid6: neonx2   gen()  1169 MB/s
[    1.297553] raid6: neonx2   xor()  1207 MB/s
[    1.369616] raid6: neonx4   gen()  1505 MB/s
[    1.441661] raid6: neonx4   xor()  1441 MB/s
[    1.513714] raid6: neonx8   gen()  1652 MB/s
[    1.585772] raid6: neonx8   xor()  1533 MB/s
[    1.589848] raid6: using algorithm neonx8 gen() 1652 MB/s
[    1.595210] raid6: .... xor() 1533 MB/s, rmw enabled
[    1.600142] raid6: using neon recovery algorithm
[    1.606050] SCSI subsystem initialized
[    1.609661] libata version 3.00 loaded.
[    1.613578] usbcore: registered new interface driver usbfs
[    1.618905] usbcore: registered new interface driver hub
[    1.624187] usbcore: registered new device driver usb
[    1.629230] media: Linux media interface: v0.10
[    1.633683] Linux video capture interface: v2.00
[    1.638288] pps_core: LinuxPPS API ver. 1 registered
[    1.643176] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.652271] PTP clock support registered
[    1.656169] EDAC MC: Ver: 3.0.0
[    1.659619] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.666653] FPGA manager framework
[    1.669995] fpga-region fpga-full: FPGA Region probed
[    1.674997] Advanced Linux Sound Architecture Driver Initialized.
[    1.681242] Bluetooth: Core ver 2.22
[    1.684644] NET: Registered protocol family 31
[    1.689039] Bluetooth: HCI device and connection manager initialized
[    1.695357] Bluetooth: HCI socket layer initialized
[    1.700198] Bluetooth: L2CAP socket layer initialized
[    1.705233] Bluetooth: SCO socket layer initialized
[    1.710733] clocksource: Switched to clocksource arch_sys_counter
[    1.716724] VFS: Disk quotas dquot_6.6.0
[    1.720574] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.731610] NET: Registered protocol family 2
[    1.736132] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.743258] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.750055] TCP: Hash tables configured (established 16384 bind 16384)
[    1.756484] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.762392] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.768895] NET: Registered protocol family 1
[    1.773307] RPC: Registered named UNIX socket transport module.
[    1.779041] RPC: Registered udp transport module.
[    1.783705] RPC: Registered tcp transport module.
[    1.788375] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.794780] PCI: CLS 0 bytes, default 128
[    1.799359] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.806686] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.815085] audit: initializing netlink subsys (disabled)
[    1.820366] audit: type=2000 audit(1.764:1): state=initialized audit_enabled=0 res=1
[    1.820700] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.835085] NFS: Registering the id_resolver key type
[    1.839969] Key type id_resolver registered
[    1.844102] Key type id_legacy registered
[    1.848084] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.854753] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.885311] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.892528] io scheduler noop registered
[    1.896398] io scheduler deadline registered
[    1.900647] io scheduler cfq registered (default)
[    1.905306] io scheduler mq-deadline registered
[    1.909804] io scheduler kyber registered
[    1.915228] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.921856] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.928767] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.935684] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.942609] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.949526] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.956446] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.963367] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.970283] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.977279] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.984182] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.991102] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.998025] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    2.004953] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    2.011866] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    2.018793] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    2.025705] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    2.059935] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.068028] 80060000.serial: ttyS2 at MMIO 0x80061000 (irq = 46, base_baud = 6249993) is a 16550A
[    <-- this last character is displayed with a 4-5 sec delay

 

The modifications on the official Ultra96 BSP were:

  • added MIPI CSI-2 RX video pipeline

and later (to enable serial debugging):

  • changed the UART1 of the ZYNQ UltraScale+ back to MIO 0/1 the (routed to the J6 header, which is an UART port with 3.3V logic levels) - the official BSP has UART1 routed to the low speed header through some EMIO pins. (this with 1.8V logic levels, so I can't use it)

Note: I have some timing errors reported in Vivado (Worst Negative Slack = - 0.196 ns, Total Negative Slack = -4.726 ns, Number of Failing Endpoints: 57), which I did not handled yet. I'm not sure if this has something to do with the hang.

 

Attached HDF and device tree files. Let me know if more details are needed.

 

Thanks,

Attila

0 Kudos
31 Replies
Adventurer
Adventurer
4,042 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

This is getting even more strange. To fix the timing violation errors, I adjusted in Vivado one of the AXI clocks (pl_clk2) from 300 MHz to 250 Mhz. The timing errors got fixed, so I rebuilt the PetaLinux. Now the boot gets stuck even earlier, at the initialization of an AXI interrupt controller. Note that the AXI interrupt controller is running from an another clock (pl_clk0) @ 100 Mhz.

Boot log:

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.2   Oct 14 2018  -  11:23:53
PMUFW:  v1.0


U-Boot 2018.01 (Oct 14 2018 - 11:05:16 +0300) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level:       EL2
Chip ID:        zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Model: ZynqMP ZCU100 RevC
Board: Xilinx ZynqMP
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
U-BOOT for xilinx-ultra96-reva-2018_2

Hit any key to stop autoboot:  0 
ZynqMP> setenv bootargs console=ttyPS0 loglevel=8 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
ZynqMP> boot
Device: sdhci@ff160000
Manufacturer ID: 58
OEM: 4444
Name: DDINC 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7006636 bytes read in 514 ms (13 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000108
     Data Size:    6960373 Bytes = 6.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   8c556eddd2e2443f8d08c08baaa4cb6affe66174
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106a3704
     Data Size:    44340 Bytes = 43.3 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   9d57a630c1a6230acfd137caca13793c3fed1858
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106a3704
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff2000, end 0000000007fffd33 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP Sun Oct 14 10:51:59 EEST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] On node 0 totalpages: 519936
[    0.000000]   DMA zone: 7165 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 519936 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe66000 s46488 r8192 d31336 u86016
[    0.000000] pcpu-alloc: s46488 r8192 d31336 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: console=ttyPS0 loglevel=8 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768640K/2079744K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48960K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] irq-xilinx: /amba_pl@0/interrupt-controller@80010000: num_irq=3, edge=0x0

Attached the new HDF archive.

 

Any idea idea what could be the problem?

---

(Update)
Tried two more design, with same result as above:

  • simplified design by removing the AXI UART from the design and moving the output of the AXI Interrupt controller from pl_ps_irq1 to pl_ps_irq0
  • the above design with the frequency of ps_clk2 changed from 250 Mhz to 214 Mhz

 

Thanks,
Attila

0 Kudos
Adventurer
Adventurer
4,019 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Meantime, I found a working design. The key was to use a Clocking Wizard generated clock, instead of the pl_clk2. I'm not sure what was the problem.

0 Kudos
Adventurer
Adventurer
3,924 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

I have this problem again! :(

 

We got the MIPI CSI-2 working with PetaLinux and OV5647:

https://forums.xilinx.com/t5/Video/MIPI-CSI-2-RX-Subsystem-OV5647-problem-on-Ultra96-ZU3EG/m-p/906398 

 

I want to use two cameras, so I added a seconds MIPI CSI-2 RX interface. The design looks like:

Screenshot from 2018-11-05 22-26-29.png

The Implementation and Synthesis are successfully run without error or critical warnings. The timing looks like:

Screenshot from 2018-11-05 22-25-59.png

The PetaLinux project is also built successfully, but when booted:

 

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #10 SMP Sat Nov 3 11:05:05 EET 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe5d000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768056K/2079744K available (10172K kernel code, 806K rwdata, 3332K rodata, 512K init, 2166K bss, 49544K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a70000   ( 10176 KB)
[    0.000000]     .rodata : 0xffffff8008a70000 - 0xffffff8008dc0000   (  3392 KB)
[    0.000000]       .init : 0xffffff8008dc0000 - 0xffffff8008e40000   (   512 KB)
[    0.000000]       .data : 0xffffff8008e40000 - 0xffffff8008f09a00   (   807 KB)
[    0.000000]        .bss : 0xffffff8008f09a00 - 0xffffff8009127338   (  2167 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] irq-xilinx: /amba_pl@0/interrupt-controller@80000000: num_irq=4, edge=0x0

 

 

I tried tweaking the design: lowered the clock freqs, etc. But nothing helps

 

The problem is clearly caused by the PL part. Something makes the system unstable, but is unclear what. How can this kind of problem investigated?

 

Uploaded the Vivado project, PetaLinux project-spec directory and boot files here:

https://drive.google.com/drive/u/0/folders/1fm22oiN7qV--jfKBOFPEFGXT5yxU7e_w

 

Can somebody takes a look on my project?

 

Thanks

Attila

0 Kudos
Adventurer
Adventurer
3,883 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Any ideas?

0 Kudos
Observer soc4video
Observer
3,876 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

Which rootfs are you using?  I found the rootfs generated by petalinux from your project could not generate "/dev/media0" and v4l sub devices.  I tried rootfs from SD card came with Ultra96 and was able to get "/dev/media0" and v4l sub devices from your MIPI 1X boot files.

I did not get  "/dev/media0" and v4l sub devices from your MIPI 2X boot files, only "/dev/video0" was created.

But my Ultra96 did not crash using stock rootfs and your MIPI 2X boot files, see attached log, both video pipelines were successfully probed. 

0 Kudos
Observer soc4video
Observer
3,866 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

My Pi cameras have LEDs and I noticed the LED on OV5647 on J9 had never turned on, the LED on OV5647 on J5 was always on.

When I have Pi OV5647s on Raspberry Pis or Jetson TX/TX2s, the LEDs were turned on only when streaming.

 

The drivers on Raspberry Pis/TX1s/TX2s reset/power on OV5647s when streaming and power down OV5647s when streaming is stopped.

 

It seems there are issues when Ultra96 driver does not reset/power on/off the OV5647, e.g.,

 

I found when I run media-ctl and yavta first time after power cycle, yavta always fails to capture, I had to re-start yavta to capture frames.

 

Also I found I couldn't found "/dev/media0" sometimes with mipi1x  boot files, I had to disconnect OV5647 from Ultra96 and reconnect it to get "/dev/madia0" and sub devices.

 

 

0 Kudos
Adventurer
Adventurer
3,847 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

@soc4video, I'm using the original rootfs from the Ultra96's SD card. I'm doing this because, I did managed to get the (smart) package manager work on the rootfs generated by PetaLinux.

 

Hmm. Did you managed to successfully boot PetaLinux with the MIPI x 2 boot files? On my board the boots gets hung around the point where the boot console is disabled. Could you describe your exact setup (hardware + boot files + rootfs)?

 

I did not had the power cycles problem. Normally the driver does a software reset on the OV5647 before each run.

Note that on the MIPI expansion board I have jumpers connected between CAM_GPIO1 <-> APQ_GPIO12 and CAM_GPIO2 <-> APQ_GPIO13:

jumper_wire.png

 

I did not put any signal on APQ_GPIO12/13, but I observed that the OV5647 is no longer detected if I remove the jumpers. I observed the CAM_GPIO1 and CAM_GPIO2 gets pulled high. The 1.8V <-> 3.3V voltage level converter does this, I think.

 

Thanks!

Observer soc4video
Observer
3,831 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

I used your prebuilt MipiX2 boot files and Ultra96 original rootfs. My hardware setup is shown in attached photo.

The information of the jumpers on MIPI adapter is important. I'll add the jumpers to make sure LEDs on both OV5647s turn on/off when start/stop streaming.

I found it's the states of OV5647's make "/dev/media" and sub devices disappear.

Hopefully I can have "/dev/media" for both OV5647s appear after GPIO jumper changes and I'll be able to stream from both OV5647s.

I did have jumpers on 1-2 and 3-4 of J15, what are your other jumper settings?

I checked MIPI adapter schematics and found CAM_GPIO5~6 are mapped to 2nd OV5647 GPIOs, I was able to have LED on the 2nd OV5647 turned on after installing jumpers on 9-10 and 11-12 of J5.

I got "/dev/media0" "/dev/video0", "/dev/v4l-subdev1~5", but access to "/dev/media0" failed. 

Thanks

20181108_092831.jpg
0 Kudos
Adventurer
Adventurer
3,801 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

HI @soc4video,

 

The problem in your setup, I think, is that both cameras are connected to the same I2C bus: I2C2. The second camera should be connected to the I2C3 bus, like this:

i2c.png

 

When is strange is that I'm not able to boot in PetaLinux with the MIPI x2 images I uploaded. For me, the problem really seems to be caused by the BOOT.BIN file.

 

Can you please double check it for me that the MD5 sum of the files from your boot partition are:

$ md5sum *
6e89ca80cb4dd0739173500a04148c34  BOOT.BIN
3943dc0b191001b000aa0c10c9d735b9  Image
b5084f8058f8933dd709c7b43807b03d  image.ub
3192552643661d7fbdc232c6d62cb602  system.dtb

?

 

Thanks,

Attila

 

 

0 Kudos
Observer soc4video
Observer
3,768 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

I got:

$ md5sum *

6e89ca80cb4dd0739173500a04148c34  BOOT.BIN
1752868cd6f23831598494d860587dc5  boot.zip
3943dc0b191001b000aa0c10c9d735b9  Image
b5084f8058f8933dd709c7b43807b03d  image.ub
3192552643661d7fbdc232c6d62cb602  system.dtb

I'll try J2C jumpers.

Thanks

 

 

0 Kudos
Observer soc4video
Observer
3,739 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

I changed jumpers for CAM2 I2C, still have no luck for the mipix2 design.  My Ultra96 has never hang but the media interface does not work.  The MIPIx1 design seems working reliably, I was able to display OV5647 video on desktop using opencv.

I don't like the I2C MUX design of Ultra96 which mixes user I2Cs and system I2Cs (e.g., PMI).  I'm afraid bugs in custom kernel may cause board damage if the voltages of PMI outputs are misconfigured accidently.

Also it excludes possibilities of accessing I2Cs from user space for development and debugging.   

0 Kudos
Moderator
Moderator
3,732 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs on custom Ultra96 platform

Hi @soc4video,

We are supporting Ultra96 with MIPI camera sensor in 2018.3 petalinux I'm not sure this was tested in 2018.2 release.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer soc4video
Observer
3,724 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@sandeepg,

Will Xilinx have a MIPI camera (e.g. IMX274) reference design for Ultra96 similar to the ZCU102 reference design? When will 2018.3 be released?

Thanks

0 Kudos
Moderator
Moderator
3,686 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs on custom Ultra96 platform

Hi @soc4video,

Design is based on below Hardware.

MIPI adapter: AISTARVISION 2.0  https://www.ebay.com/itm/96Boards-MIPI-Adapter-with-OV5645-auto-focus-camera-board-/252956476095?_trksid=p2385738.m4383.l4275.c10

The above link includes the OV5645 camera sensor. We need OV5640 camera sensor which can be found in the below link

Camera sensor: https://www.e-consystems.com/5MP-MIPI-camera-module.asp

2018.3 release is 2nd week of December 2018.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer soc4video
Observer
3,676 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

I wise the massive popular Pi cameras were selected for the reference design rather than E-consystems' cameras which would need another adapter and long delivery time.  Bluetiger9 already had one OV5647 working for Ultra96 and posted his source code here. 

0 Kudos
Observer soc4video
Observer
3,673 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

I noticed forum web UI is changed I can't edit my posts.
0 Kudos
Moderator
Moderator
3,659 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs on custom Ultra96 platform

Hi @soc4video,

You can use whichever source code and design comfortable you are.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
3,536 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi,

After some testing with bare-metal applications, I found that the M_AXI_HPM0_LPD does not seems to work. At least on my board, with certain designs, any read or write causes the SoC to hang.

So, I changed the MIPI x2 design to use two HPD AXI interfaces-s instead of one HPD and one LPD AXI interface. With this new design:

  • the PetaLinux successfully boots up
  • the two video pipelines are successfully initialized
  • the 1st video pipeline works as expected, I'm able to capture frames
  • the 2nd video pipeline - the MIPI CSI-2 Rx Subsystem driver keeps reporting:
    [  271.680145] xilinx-csi2rxss a0020000.mipi_csi2_rx_subsystem: Stream Line Buffer Full!

Theoretically, the second video pipeline is the exact copy of the first one, so I have no idea yet what could be the problem.

I looked at the register and what I observed is that the Stream Line Buffer Full condition is triggered.

Video Pipeline 2 (/dev/video1) - NOT WORKING:

 

MIPI RX

Core Configuration Register (0x00): 0x00000001
Protocol Configuration Register (0x04): 0x00000009
Core Status Register (0x10): 0x000C0002
Global Interrupt Enable Register (0x20): 0x00000001
Interrupt Status Register (0x24): 0x80060000
Interrupt Enable Register (0x28): 0x803DFFFF
Generic Short Packet Register (0x30): 0x00000000
Clock Lane Information Register (0x3C): 0x00000003
Lane0 Information (0x40): 0x00000020
Lane1 Information (0x44): 0x00000020
Lane2 Information (0x48): 0x00000000
Lane3 Information (0x4C): 0x00000000
Image Information 1 for VC0 (0x60): 0x000C0280
Image Information 2 for VC0 (0x64): 0x0000002A
Image Information 1 for VC1 (0x68): 0x00000000
Image Information 2 for VC1 (0x6C): 0x00000000
Image Information 1 for VC2 (0x70): 0x00000000
Image Information 2 for VC2 (0x74): 0x00000000
Image Information 1 for VC3 (0x78): 0x00000000
Image Information 2 for VC3 (0x7C): 0x00000000
CONTROL (0x00): 0x00000002
INIT (0x08): 0x000186A0
HS_TIMEOUT (0x10): 0x00000000
ESC_TIMEOUT (0x14): 0x00000000
CL_STATUS (0x18): 0x00000018
DL0_STATUS (0x1C): 0xC4050048
DL1_STATUS (0x20): 0xC4D40048
DL2_STATUS (0x24): 0x00000008
DL3_STATUS (0x28): 0x00000008
HS_SETTLE (0x30): 0x00000097

Demosaic
 0x00 = 0x00000081 = ap_start + auto restart
 0x10 (active width) = 0x00000280 = 640
 0x18 (active height) = 0x000001E0 = 480
 0x20 (bayer phase) = 0x00000000

Gamma LUT
 0x00 = 0x00000081 (ap_start + auto restart)
 0x10 (active width) = 0x00000280 = 640
 0x18 (active height) = 0x000001E0 = 480
 0x20 (video format) = 0x00000000 (RGB)

VPSS Color Scape Converter
 0x00 (XV_CSC_AP_CTRL) = 0x00000081 = ap_start + auto restart ?
 0x10 (XV_CSC_INVIDEOFORMAT) = 0x00000000 = RGB ?
 0x18 (XV_CSC_OUTVIDEOFORMAT) = 0x00000000 = RGB ?
 0x20 (XV_CSC_WIDTH) = 0x00000280
 0x28 (XV_CSC_HEIGHT) = 0x000001E0

VPSS Scaler
 0x00000 (h control) = 0xBF ?! wrong ?!
 0x20000 (v control) = 0x00000081 (ap_start + auto restart)

FrameBuffer Write
 0x00 (control) = 0x00000081 (ap_start + auto restart)
 0x04 (global interrupt enable) = 0x00000001 (enabled)
 0x08 (interrupt enable) = 0x00000002 (ap_ready)
 0x0c (interrupt status) = 0x00000000 (none)
 0x10 (width) = 0x00000280 = 640
 0x18 (height) = 0x000001E0 = 480
 0x20 (stride) = 0x00000500 = 1280 bytes
 0x28 (vide format) = 0x0000001C
 0x30 (plane 1 buffer) = 0x6FE00000


Video Pipeline 1 (/dev/video0) - WORKING:

 

MIPI RX

Core Configuration Register (0x00): 0x00000001
Protocol Configuration Register (0x04): 0x00000009
Core Status Register (0x10): 0x19000000
Global Interrupt Enable Register (0x20): 0x00000001
Interrupt Status Register (0x24): 0x80022000
Interrupt Enable Register (0x28): 0x803DFFFF
Generic Short Packet Register (0x30): 0x00000000
Clock Lane Information Register (0x3C): 0x00000003
Lane0 Information (0x40): 0x00000000
Lane1 Information (0x44): 0x00000020
Lane2 Information (0x48): 0x00000000
Lane3 Information (0x4C): 0x00000000
Image Information 1 for VC0 (0x60): 0x1AD60280
Image Information 2 for VC0 (0x64): 0x0000002A
Image Information 1 for VC1 (0x68): 0x00000000
Image Information 2 for VC1 (0x6C): 0x00000000
Image Information 1 for VC2 (0x70): 0x00000000
Image Information 2 for VC2 (0x74): 0x00000000
Image Information 1 for VC3 (0x78): 0x00000000
Image Information 2 for VC3 (0x7C): 0x00000000
CONTROL (0x00): 0x00000002
INIT (0x08): 0x000186A0
HS_TIMEOUT (0x10): 0x00000000
ESC_TIMEOUT (0x14): 0x00000000
CL_STATUS (0x18): 0x00000018
DL0_STATUS (0x1C): 0x5C790048
DL1_STATUS (0x20): 0x5D550009
DL2_STATUS (0x24): 0x00000008
DL3_STATUS (0x28): 0x00000008
HS_SETTLE (0x30): 0x00000097

Demosaic
 0x00 = 0x00000083 = ap_start + ap_done + auto restart
 0x10 (active width) = 0x00000280 = 640
 0x18 (active height) = 0x000001E0 = 480
 0x20 (bayer phase) = 0x00000000

Gamma LUT
 0x00 = 0x00000083 (ap_start + ap_done + auto restart)
 0x10 (active width) = 0x00000280 = 640
 0x18 (active height) = 0x000001E0 = 480
 0x20 (video format) = 0x00000000 (RGB)

VPSS Color Scape Converter
 0x00 (XV_CSC_AP_CTRL) = 0x00000083 (ap_start + ap_done + auto restart)
 0x10 (XV_CSC_INVIDEOFORMAT) = 0x00000000 = RGB ?
 0x18 (XV_CSC_OUTVIDEOFORMAT) = 0x00000000 = RGB ?
 0x20 (XV_CSC_WIDTH) = 0x00000280
 0x28 (XV_CSC_HEIGHT) = 0x000001E0

VPSS Scaler
 0x00000 (h control) = 0x00000083 (ap_start + ap_done + auto restart)
 0x20000 (v control) = 0x00000083 (ap_start + ap_done + auto restart)

FrameBuffer Write
 0x00 (control) = 0x00000083 (ap_start + ap_done + auto restart)
 0x04 (global interrupt enable) = 0x00000001 (enabled)
 0x08 (interrupt enable) = 0x00000002 (ap_ready)
 0x0c (interrupt status) = 0x00000002 (ap_ready)
 0x10 (width) = 0x00000280 = 640
 0x18 (height) = 0x000001E0 = 480
 0x20 (stride) = 0x00000500 = 1280 bytes
 0x28 (vide format) = 0x0000001C
 0x30 (plane 1 buffer) = 0x6FE00000


Thanks,
Attila

 

0 Kudos
Observer soc4video
Observer
3,476 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

I'd like to try on my Ultra96 if you post your BOOT.bin, Image and system.dtb,

Thanks

Adventurer
Adventurer
3,387 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi @soc4video,

I uploaded the boot files here:
https://drive.google.com/open?id=1CLKJywfx5ZiqSBn4ARpuRfsmTE0pPH8c

Let me know if it works or not on your Ultra96.

Thanks,
Attila

0 Kudos
Observer soc4video
Observer
3,367 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

@bluetiger9

I'm still having cam I2C issues.  I found adding jumpers for CAM2 I2C (see attached photo) makes neither CAM1 nor CAM2 I2C working, I could not find out why.

After  I used a oscilloscope to probe I2C signals on Pi cameras, I found the voltages are only 1.8V instead of 3.3V.

I found the I2C 3.3V pull up resistors on MIPI adapter were not installed and the 10K Ohm pull up resisters on Pi cameras do not seem sufficient to pull I2C signals to 3.3V.

I'll have to go to work tomorrow to find and solder the tiny (0402) pull up resisters on MIPI adapter.

I'm wondering why you did not have similar issue. Your OV5647 cameras may have lower pull up resister values.

Thanks

20181118_125636.jpg
0 Kudos
Adventurer
Adventurer
3,362 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi @soc4video,

I have ~1.6V on the I2C pins too (when idle), but I had no problems with the I2C. However, adding the missing pull up resistors may help.

Meantime, I swapped M_AXI_HPM0_FPD with M_AXI_HPM1_FPD. Now is that the 2nd video pipeline is working but the 1st one is producing the "Stream Line Buffer Full!" error.

Thanks,
Attila

0 Kudos
Observer soc4video
Observer
3,317 Views
Registered: ‎11-01-2018

Re: PetaLinux hangs on custom Ultra96 platform

Adding 4.7K pull up resistors definitely helped my MIPI adapter, for the first time I was able to get "/dev/media0", "/dev/media1", "dev/v4l_subdev0~11", "dev/video0" and "dev'video1".

What are the "media-ctl" and "v4l2-ctl" commands needed to start streaming?  

Thanks  

0 Kudos
Adventurer
Adventurer
2,762 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi @sandeepg,

I saw 2018.3 was released. You mentioned earlier, a MIPI CSI-2 reference design for the Ultra96 board will be included.

Can you tell us where to find this reference design?

(I did a search on Google, on the Xilinx website and in the Vivado help, but I was not able to find it)

Thanks,
Attila

0 Kudos
Explorer
Explorer
2,756 Views
Registered: ‎10-21-2015

Re: PetaLinux hangs on custom Ultra96 platform

Hi

https://github.com/Xilinx/hdf-examples/tree/rel-v2018.3/ultra96-zynqmp

You can get vivado design from system.hdf

unzip system.hdf

In tcl console of vivado,  source design_1_bd.tcl

0 Kudos
Explorer
Explorer
2,703 Views
Registered: ‎10-21-2015

Re: PetaLinux hangs on custom Ultra96 platform

Hi

vivado design is like this

mipi_test1.png

xilinx's ov5640 dirvier is not working

https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2018.3/drivers/media/i2c/ov5640.c

digilent's driver is working

https://github.com/Digilent/linux-digilent/blob/pcam/drivers/media/i2c/ov5640.c

The attached pl.dtsi is generated by petalinux

This is  system-user.dtsi for mipi cam

&csiss_port0 {
   /delete-property/ xlnx,cfa-pattern;
    xlnx,video-format = <XVIP_VF_YUV_422>;
};

&csiss_port1 {
   /delete-property/ xlnx,cfa-pattern;
    xlnx,video-format = <XVIP_VF_YUV_422>;
};

&csiss_in {
    data-lanes = <1 2>;
    remote-endpoint =  <&ov5640_out>;
};

&mipi_csi2_rx_0_v_proc_ss_0 {
    compatible = "xlnx,v-vpss-scaler";
};

&scaler_port0 {
    xlnx,video-format = <XVIP_VF_YUV_422>;
};

&scaler_port1 {
    xlnx,video-format = <XVIP_VF_YUV_422>;
};
&amba_pl {
    pcam_clk: pcam_clk {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <12000000>;
    };
    DOVDD: fixed_regulator_DOVDD@0 {
        compatible = "regulator-fixed";
        regulator-name = "DOVDD_reg";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        gpio = <&gpio 37 GPIO_ACTIVE_HIGH>;
        startup-delay-us = <50000>;
        enable-active-high;
    };
};

&i2csw_2 {
    ov5640: camera@3c {
        compatible = "ovti,ov5640";
        reg = <0x3c>;
        clock-names = "xclk";
        clocks = <&pcam_clk>;
        DOVDD-supply = <&DOVDD>; /* 1.8v */
        powerdown-gpios = <&gpio 82 GPIO_ACTIVE_HIGH>; /* this gpio pin should not be connected */

        port {
            ov5640_out: endpoint {
                remote-endpoint = <&csiss_in>;
                clock-lanes = <0>;
                data-lanes = <1 2>;
            };
        };
    };
};
0 Kudos
Visitor johnceni
Visitor
2,591 Views
Registered: ‎09-05-2018

Re: PetaLinux hangs on custom Ultra96 platform

I think this thread is so knowledgeable I am a beginner in this coding world and this type of thread is very important for me.

0 Kudos
Adventurer
Adventurer
2,495 Views
Registered: ‎09-02-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi @hokim,

Took a look on the design from the HDF. 

One thing I observed in the design is that are no Gamma LUT and VPS CSC in the video pipeline. So, I removed from these from my design too and rebuild the Vivado project, then the PetaLinux one. Unfortunately, this does not makes any change in the behaviour, one of my video pipelines work, the other one is not working. I'm really thinking something will be wrong with my Ultra96.

I will try too build it with the your device tree too.

Thanks,
Attila

PS: sorry for the late answer. Just saw your reply today.

0 Kudos
Observer technoaddict67
Observer
1,991 Views
Registered: ‎06-07-2018

Re: PetaLinux hangs on custom Ultra96 platform

Hi Atilla,  Were you able to get the 2nd camera channel working?  Was something wrong with your Ultra96?

 

Best regards

0 Kudos