Question: driving ADV7511 on a custom zynq board in Linux

I have built and tested the adv7511 reference design on zc702 board, include block design and drivers.  runs good and the resulotion can adjust byself.

Now, I designed a new zynq(7z045) board, also use an adv7511 to implement a HDMI port like zc702 design. however, the I2C bus of ADV7511 is connected to PL io directly, which are bridged by a I2C mux chip in ZC702.

So, can I still use the old driver to drive ADV7511?

if yes, how to modify the device tree?

if no, where can I find the reference design matched my board?

thanks for any reply. 

  • 0
    •  Analog Employees 
    on Apr 14, 2021 9:25 AM


    The same driver can be used, without changes. All you have to do is to update the devicetree accordingly.

    Are you using this I2C mux: ?- Each channel of an I2C mux can be treated as an independent I2C bus (parent) so, ADV7511 will be a child of one of the channels.


  • Hi, Sorry to ask help again, I still can not make HDMI work well, the monitor always show "no cable connected"

    I set HDMI output at 1280x720 in bootargs, and the frequency of VIO_CLK/HSYNC/VSYNC at PL side are 75Mhz/45KHz/60Hz(measured using OSC) , however the pix clock output by ADV7511 is about 49.75Mhz.

    the OS/driver setting adv7511 via I2C unsuccessfully? but the edid info looks like right.

    In one of my tests, I plugin out HDMI cable then plugin in again, the OS shows setting adv7511 failed. see the attached picture.

    Could you give some advise? here is the boot log.


    CPU: Zynq 7z045
    Silicon: v3.1
    DRAM: ECC disabled 1008 MiB
    MMC: sdhci@e0100000: 0, sdhci@e0101000: 1
    Loading Environment from SPI Flash... SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB
    *** Warning - bad CRC, using default environment

    In: serial@e0001000
    Out: serial@e0001000
    Err: serial@e0001000
    Net: ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id

    Warning: ethernet@e000b000 (eth0) using random MAC address - 82:35:76:1d:d9:c7
    eth0: ethernet@e000b000
    Hit any key to stop autoboot: 0
    Zynq> setenv bootargs console=ttyPS0,115200 earlyprintk root=mtd:jffs2 rw rootfstype=jffs2 video=HDMI-A-1:1280x720-32 rootwait
    Zynq> boot
    SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB
    device 0 offset 0xe20000, size 0x4e0000
    SF: 5111808 bytes @ 0xe20000 Read: OK
    ## Loading kernel from FIT Image at 10000000 ...
    Using 'conf@system-top.dtb' configuration
    Verifying Hash Integrity ... OK
    Trying 'kernel@1' kernel subimage
    Description: Linux kernel
    Type: Kernel Image
    Compression: uncompressed
    Data Start: 0x10000104
    Data Size: 4454184 Bytes = 4.2 MiB
    Architecture: ARM
    OS: Linux
    Load Address: 0x00008000
    Entry Point: 0x00008000
    Hash algo: sha1
    Hash value: 0110d2536e8ae2f9f7ed0c9d66f05db2b7ff9d73
    Verifying Hash Integrity ... sha1+ OK
    ## Loading fdt from FIT Image at 10000000 ...
    Using 'conf@system-top.dtb' configuration
    Verifying Hash Integrity ... OK
    Trying 'fdt@system-top.dtb' fdt subimage
    Description: Flattened Device Tree blob
    Type: Flat Device Tree
    Compression: uncompressed
    Data Start: 0x1043f92c
    Data Size: 16731 Bytes = 16.3 KiB
    Architecture: ARM
    Hash algo: sha1
    Hash value: b0c11a7887b1c0968d977e4276739323be0d120a
    Verifying Hash Integrity ... sha1+ OK
    Booting using the fdt blob at 0x1043f92c
    Loading Kernel Image ... OK
    Loading Device Tree to 1fff8000, end 1ffff15a ... OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0x0
    Linux version 4.14.0 (zynq@zynq-VirtualBox) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #8 SMP PREEMPT Mon Apr 12 16:25:53 CST 2021
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt: Machine model: xlnx,zynq-7000
    bootconsole [earlycon0] enabled
    Memory policy: Data cache writealloc
    cma: Reserved 128 MiB at 0x37000000
    random: fast init done
    percpu: Embedded 16 pages/cpu @ef7ea000 s32972 r8192 d24372 u65536
    Built 1 zonelists, mobility grouping on. Total pages: 256512
    Kernel command line: console=ttyPS0,115200 earlyprintk root=mtd:jffs2 rw rootfstype=jffs2 video=HDMI-A-1:1280x720-32 rootwait
    PID hash table entries: 4096 (order: 2, 16384 bytes)
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 880816K/1032192K available (6144K kernel code, 293K rwdata, 2336K rodata, 1024K init, 157K bss, 20304K reserved, 131072K cma-reserved, 114688K highmem)
    Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
    lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
    pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    .text : 0xc0008000 - 0xc0700000 (7136 kB)
    .init : 0xc0a00000 - 0xc0b00000 (1024 kB)
    .data : 0xc0b00000 - 0xc0b49740 ( 294 kB)
    .bss : 0xc0b4f1b8 - 0xc0b766d4 ( 158 kB)
    Preemptible hierarchical RCU implementation.
    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
    Tasks RCU enabled.
    RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    efuse mapped to f0802000
    slcr mapped to f0804000
    L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C-310 erratum 769419 enabled
    L2C-310 enabling early BRESP for Cortex-A9
    L2C-310 full line of zeros enabled for Cortex-A9
    L2C-310 ID prefetch enabled, offset 1 lines
    L2C-310 dynamic clock gating enabled, standby mode enabled
    L2C-310 cache controller enabled, 8 ways, 512 kB
    L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
    zynq_clock_init: clkc starts at f0804100
    Zynq clock init
    sched_clock: 64 bits at 349MHz, resolution 2ns, wraps every 4398046511103ns
    clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x50b8812b92, max_idle_ns: 440795208269 ns
    Switching to timer-based delay loop, resolution 2ns
    clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 511938261 ns
    timer #0 at f080c000, irq=17
    Console: colour dummy device 80x30
    Calibrating delay loop (skipped), value calculated using timer frequency.. 699.99 BogoMIPS (lpj=3499999)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x100000 - 0x100060
    Hierarchical SRCU implementation.
    smp: Bringing up secondary CPUs ...
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    smp: Brought up 1 node, 2 CPUs
    SMP: Total of 2 processors activated (1399.99 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 512 (order: 3, 32768 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
    zynq-pinctrl 700.pinctrl: zynq pinctrl initialikyPS0] enabled
    console [ttyPS0] enabled
    bootconsole [earlycon0] disabled
    bootconsole [earlycon0] disabled
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <>
    PTP clock support registered
    FPGA manager framework
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm_global_timer
    NET: Registered protocol family 2
    TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    UDP hash table entries: 512 (order: 2, 16384 bytes)
    UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    NET: Registered protocol family 1
    hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
    workingset: timestamp_bits=30 max_order=18 bucket_order=0
    jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    JFS: nTxBlock = 7905, nTxLock = 63243
    bounce: pool size: 64 pages
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
    dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
    xilinx-vdma 7e200000.dma: Xilinx AXI VDMA Engine Driver Probed!!
    xilinx-vdma 7e210000.dma: unable to request IRQ 0
    xilinx-vdma 7e210000.dma: dma_async_device_register: device has no channels!
    xilinx-vdma 7e210000.dma: Xilinx AXI VDMA Engine Driver Probed!!
    brd: module loaded
    loop: module loaded
    m25p80 spi0.0: found s25fl256s1, expected n25q512a
    m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
    5 ofpart partitions found on MTD device spi0.0
    Creating 5 MTD partitions on "spi0.0":
    0x000000000000-0x000000e00000 : "boot"
    0x000000e00000-0x000000e20000 : "bootenv"
    0x000000e20000-0x000001300000 : "kernel"
    0x000001300000-0x000001f00000 : "jffs2"
    0x000001f00000-0x000001f10000 : "data"
    MACsec IEEE 802.1AE
    libphy: Fixed MDIO Bus: probed
    tun: Universal TUN/TAP device driver, 1.6
    libphy: MACB_mii_bus: probed
    macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 27 (00:0a:35:00:1e:53)
    Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    usbcore: registered new interface driver usb-storage
    usbcore: registered new interface driver usbserial
    usbcore: registered new interface driver usbserial_generic
    usbserial: USB Serial support registered for generic
    usbcore: registered new interface driver ftdi_sio
    usbserial: USB Serial support registered for FTDI USB Serial Device
    chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
    ULPI transceiver vendor/product ID 0x0424/0x0007
    Found SMSC USB3320 ULPI transceiver.
    ULPI integrity check: passed.
    ci_hdrc ci_hdrc.0: EHCI Host Controller
    ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    i2c /dev entries driver
    adv7511 0-0039: 0-0039 supply avdd not found, using dummy regulator
    adv7511 0-0039: 0-0039 supply dvdd not found, using dummy regulator
    adv7511 0-0039: 0-0039 supply pvdd not found, using dummy regulator
    adv7511 0-0039: 0-0039 supply bgvdd not found, using dummy regulator
    adv7511 0-0039: 0-0039 supply dvdd-3v not found, using dummy regulator
    IR NEC protocol handler initialized
    IR RC5(x/sz) protocol handler initialized
    IR RC6 protocol handler initialized
    IR JVC protocol handler initialized
    IR Sony protocol handler initialized
    IR SANYO protocol handler initialized
    IR Sharp protocol handler initialized
    IR MCE Keyboard/mouse protocol handler initialized
    IR XMP protocol handler initialized
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (1.1.1)
    gspca_main: v2.14.0 registered
    cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f0dde000 with timeout 10s
    Xilinx Zynq CpuIdle Driver started
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    mmc0: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using ADMA
    ledtrig-cpu: registered to indicate activity on CPUs
    hidraw: raw HID events driver (C) Jiri Kosina
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
    NET: Registered protocol family 17
    Registering SWP/SWPB emulation handler
    mmc0: mmc_select_hs200 failed, error -74
    Console: switching to colour frame buffer device 160x45
    axi-hdmi 43c30000.axi_hdmi_tx: fb0: frame buffer device
    [drm] Initialized axi_hdmi_drm 1.0.0 20120930 for 43c30000.axi_hdmi_tx on minor 0
    asoc-simple-card amba_pl:adv7511_hdmi_snd: spdif-hifi <-> 43c50000.axi_spdif_tx mapping ok
    hctosys: unable to open rtc device (rtc0)
    ALSA device list:
    0: new MMC card at address 0001
    mmcblk0: mmc0:0001 R1J57L 27.5 GiB
    mmcblk0boot0: mmc0:0001 R1J57L partition 1 16.0 MiB
    mmcblk0boot1: mmc0:0001 R1J57L partition 2 16.0 MiB
    mmcblk0rpmb: mmc0:0001 R1J57L partition 3 128 KiB
    mmcblk0: p1 p2
    random: crng init done
    VFS: Mounted root (jffs2 filesystem) on device 31:3.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    INIT: version 2.88 booting
    Starting udev
    udevd[915]: starting version 3.2.2
    udevd[916]: starting eudev-3.2.2
    EXT4-fs (mmcblk0p2): recovery complete
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Tue Apr 13 08:05:29 UTC 2021
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting internet superserver: inetd.
    INIT: Entering runlevel: 5
    Configuring network interfaces... done.
    Starting Dropbear SSH server: dropbear.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done
    Starting tcf-agent: OK

    PetaLinux 2018.2 zkb_peta /dev/ttyPS0

    zkb_peta login: root
    root@zkb_peta:~# macb e000b000.ethernet eth0: link up (100/Full)

    root@zkb_peta:~# cat /sys/devices/so
    soc0/ software/
    root@zkb_peta:~# cat /sys/devices/soc0/amba_pl/
    40000000.irq_f2p/ 43c10000.axi_ps2_ctrl/ 43c40000.axi_dmac/ 7e210000.dma/ modalias subsystem/
    41600000.i2c/ 43c20000.axi_clkgen/ 43c50000.axi_spdif_tx/ amba_pl:adv7511_hdmi_snd/ of_node/ uevent
    43c00000.xadc_wiz/ 43c30000.axi_hdmi_tx/ 7e200000.dma/ driver_override power/
    root@zkb_peta:~# hexdump /sys/devices/soc0/amba_pl/43c30000.axi_hdmi_tx/drm/card0/card0-HDMI-A-1/edid
    0000000 ff00 ffff ffff 00ff d109 8026 5445 0000
    0000010 1c02 0301 4780 7828 912e a741 4e55 25a0
    0000020 500c 2554 806b 8081 c081 0081 c0a9 00b3
    0000030 c0d1 0101 0101 5e56 a000 a0a0 5029 202f
    0000040 0035 8fc4 0021 1a00 0000 ff00 4100 4a31
    0000050 3030 3131 3030 3931 200a 0000 fd00 3200
    0000060 1e4c 1b5a 0a00 2020 2020 2020 0000 fc00
    0000070 4200 6e65 2051 4450 3233 3030 0a51 8201
    0000080 0302 f125 9050 221f 2021 1405 1304 1112
    0000090 0203 0701 2306 0709 8307 0001 6700 0c03
    00000a0 1000 3800 0132 001d 5172 1ed0 6e20 5528
    00000b0 ba00 2189 0000 8c1e d00a 208a 2de0 1010
    00000c0 963e ba00 2189 0000 8c18 d00a 2090 3140
    00000d0 0c20 5540 ba00 2189 0000 8c18 d00a 2090
    00000e0 3140 0c20 5540 c400 218f 0000 0018 0000
    00000f0 0000 0000 0000 0000 0000 0000 0000 ee00

  • finally the project work well after replacing the resistor on PIN28 R_EXT, somebody made mistaske using a 88ohm resistor at here....

Reply Children
No Data