Search FAQs on the left to see if your question has been answered. Click on the dropdown to view all of the documents associated with the product. If you can't find your question, click on Ask a Question

Example of how to configure the ADV7612 on the EVAL-ADV7612-7511/EVAL-ADV7612-7511P using 7-bit I2C addresses

As we have mentioned on EngineerZone, some embedded software/tools use 7-bit I2C addresses and some embedded software/tools use 8-bit I2C addresses.

For example, the register configuration tool for ADV7612 (AVES) and the associated configuration scripts use 8-bit I2C addresses. Since the slave address registers (HDMI SLAVE ADDRESS, CP SLAVE ADDRESS, etc.) expect/contain 8-bit I2C addresses, this results in a script that's easy to read/understand.

On the other hand, the U-Boot bootloader and Linux typically use 7-bit I2C addresses. Since the slave address registers (HDMI SLAVE ADDRESS, CP SLAVE ADDRESS, etc.) still expect/contain 8-bit I2C addresses, this results in a script that's a little more difficult to read/understand.

In order to demonstrate this principle, we wanted to provide an example of how to configure the ADV7612 on the EVAL-ADV7612-7511/EVAL-ADV7612-7511P using U-Boot and 7-bit I2C addresses.

We started with the ADV7612 I2C writes in the "6-1d" script of ADV7612-VER.3.0c.txt (found in the ADV7612 design support files page on EngineerZone).

We created this table to help keep track of 8-bit addresses and 7-bit addresses:

Map 8-bit I2C address 7-bit I2C address
IO Map 0x98 0x4C
CEC Map 0x80 0x40
INFOFRAME Map 0x7C 0x3E
DPLL Map 0x4C 0x26
KSV Map 0x64 0x32
EDID Map 0x6C 0x36
HDMI Map 0x68 0x34
CP Map 0x44 0x22

Then we converted these writes from script format to U-boot command format and 7-bit addresses (notice that address being addressed is the 7-bit I2C address for the sake of U-Boot but the data being written into the slave address registers is the 8-bit I2C address).

i2c mw 4C FF 80
i2c mw 4C F4 80
i2c mw 4C F5 7C
i2c mw 4C F8 4C
i2c mw 4C F9 64
i2c mw 4C FA 6C
i2c mw 4C FB 68
i2c mw 4C FD 44
i2c mw 4C 01 06
i2c mw 4C 02 F5
i2c mw 4C 03 42
i2c mw 4C 05 28
i2c mw 4C 0B 44
i2c mw 4C 0C 42
i2c mw 4C 14 7F
i2c mw 4C 15 80
i2c mw 4C 19 83
i2c mw 4C 33 40
i2c mw 22 BA 01
i2c mw 32 40 81
i2c mw 34 9B 03
i2c mw 34 00 08
i2c mw 34 02 03
i2c mw 34 83 FC
i2c mw 34 6F 0C
i2c mw 34 85 1F
i2c mw 34 87 70
i2c mw 34 8D 04
i2c mw 34 8E 1E
i2c mw 34 1A 8A
i2c mw 34 57 DA
i2c mw 34 58 01
i2c mw 34 03 98
i2c mw 34 75 10
i2c mw 34 90 04
i2c mw 34 91 1E

Now before you do these writes in U-Boot for the EVAL-ADV7612-7511/EVAL-ADV7612-7511P, you will need to make sure the BF524 pin going to the ADV7612 RESET# pin is driven high (gpio set ph0) and the BF524 pin going to the ADV7612 CS# pin is driven low (gpio clear ph1).

So here's what it looks like when we run U-Boot on the EVAL-ADV7612-7511/EVAL-ADV7612-7511P and enter these commands:

************

U-Boot 2013.07 (ADI-2014R1) (Dec 15 2015 - 18:26:23)

CPU:   ADSP bf524-0.2 (Detected Rev: 0.2) (spi flash boot)
Board: ADI BF526 EZ-Board board
       Support: http://blackfin.uclinux.org/
Clock: VCO: 300 MHz, Core: 300 MHz, System: 100 MHz
RAM:   32 MiB
SF: Detected M25P80 with page size 64 KiB, total 1 MiB
In:    serial
Out:   serial
Err:   serial
KGDB:  [on serial] ready
Hit any key to stop autoboot:  0
SF: Detected M25P80 with page size 64 KiB, total 1 MiB
ERROR: attempting read past flash size (0x100000)
## No ldr image at address 0x00100000
bfin> gpio set ph0
gpio: pin ph0 (gpio 32) value is 1
bfin> gpio clear ph1
gpio: pin ph1 (gpio 33) value is 0
bfin> i2c mw 4C FF 80
bfin> i2c mw 4C F4 80
bfin> i2c mw 4C F5 7C
bfin> i2c mw 4C F8 4C
bfin> i2c mw 4C F9 64
bfin> i2c mw 4C FA 6C
bfin> i2c mw 4C FB 68
bfin> i2c mw 4C FD 44
bfin> i2c mw 4C 01 06
bfin> i2c mw 4C 02 F5
bfin> i2c mw 4C 03 42
bfin> i2c mw 4C 05 28
bfin> i2c mw 4C 0B 44
bfin> i2c mw 4C 0C 42
bfin> i2c mw 4C 14 7F
bfin> i2c mw 4C 15 80
bfin> i2c mw 4C 19 83
bfin> i2c mw 4C 33 40
bfin> i2c mw 22 BA 01
bfin> i2c mw 32 40 81
bfin> i2c mw 34 9B 03
bfin> i2c mw 34 00 08
bfin> i2c mw 34 02 03
bfin> i2c mw 34 83 FC
bfin> i2c mw 34 6F 0C
bfin> i2c mw 34 85 1F
bfin> i2c mw 34 87 70
bfin> i2c mw 34 8D 04
bfin> i2c mw 34 8E 1E
bfin> i2c mw 34 1A 8A
bfin> i2c mw 34 57 DA
bfin> i2c mw 34 58 01
bfin> i2c mw 34 03 98
bfin> i2c mw 34 75 10
bfin> i2c mw 34 90 04
bfin> i2c mw 34 91 1E

Now, if we want to read/dump the IO Map in U-Boot, we type this:

bfin> i2c md 4C 0 100
0000: 08 06 f5 42 62 28 a0 40 14 00 90 44 42 1e 0f 1e    ...Bb(.@...DB...
0010: 00 00 81 0d 7f 80 43 5a 34 83 02 00 00 00 00 00    ......CZ4.......
0020: f0 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030: 88 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00    ...@............
0040: 20 30 08 00 00 00 00 00 00 00 00 00 00 00 00 00     0..............
0050: 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00    ................
0060: 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00    .....@..........
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00b0: 00 00 00 00 00 00 00 43 e0 00 00 08 0f ff 00 00    .......C........
00c0: 00 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 02 07 20 23 fd 40 00 00 2d 15 f1 5f 40 00 00 00    .. #.@..-.._@...
00e0: 00 00 04 00 01 00 00 00 04 00 20 41 00 00 00 00    .......... A....
00f0: 00 00 00 00 80 7c 00 00 4c 64 6c 68 00 44 00 00    .....|..Ldlh.D..

Note: You can see the slave addresses registers on the bottom row in 8-bit format.

Now, if we want to read/dump the CEC Map in U-Boot, we type this:
bfin> i2c md 40 0 100
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0010: 00 00 13 57 00 00 00 00 00 00 00 00 00 00 00 00    ...W............
0020: 00 00 00 00 00 00 00 10 ff 0f 3e 07 00 0f bb 0e    ..........>.....
0030: ae 10 c7 0c ef 0b e2 0d fb 08 64 06 d1 09 f6 02    ..........d.....
0040: 19 05 3e 06 4b 03 ac 0c 96 02 00 e0 00 01 0c 03    ..>.K...........
0050: 25 04 32 00 00 00 00 00 00 00 00 00 00 00 00 00    %.2.............
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0070: 00 00 00 00 00 00 00 00 6d 8f 82 04 0d 70 42 41    ........m....pBA
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

If we want to read/dump the INFOFRAME map, we type this:

bfin> i2c md 3E 0 100
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

If we want to read/dump the DPLL map in U-Boot, we type this:

bfin> i2c md 26 0 100
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0080: 80 20 80 02 02 0a 0a 0a f8 66 fc 13 f8 15 de 86    . .......f......
0090: c1 91 82 70 00 00 00 00 ff 0f ff 00 00 00 00 00    ...p............
00a0: 00 02 02 ff ff ff f8 66 fc 13 f8 15 de 86 c1 91    .......f........
00b0: 82 70 ff 0f ff 01 00 00 00 00 00 00 00 6f 02 fa    .p...........o..
00c0: c0 98 80 00 30 02 03 00 00 00 00 00 40 0a 96 00    ....0.......@...
00d0: 25 23 e1 ae ff e1 05 00 00 1b 04 00 00 00 00 00    %#..............
00e0: 00 00 00 00 06 06 00 00 00 00 00 00 00 00 00 00    ................
00f0: 00 00 00 00 00 00 00 00 00 0d f8 0f e1 00 00 00    ................

Now if we want to read/dump the KSV map in U-Boot, we type this:

bfin> i2c md 32 0 100
0000: ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00    ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040: 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0050: 00 00 10 00 00 00 10 00 00 00 10 00 00 00 10 00    ................
0060: 00 f0 00 f0 00 f0 00 f0 00 f0 00 f0 00 f0 00 f0    ................
0070: 00 00 01 00 00 00 00 00 00 88 04 00 00 00 00 00    ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

Now if we want to read/dump the EDID map in U-Boot, we type this:

bfin> i2c md 36 0 100
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

Now if we want to read/dump the HDMI map in U-Boot, we type this:

bfin> i2c md 34 0 100
0000: 08 00 03 98 20 00 00 00 00 1f ff 1f ff 04 8f 1f    .... ...........
0010: 25 7d 02 7f 3f ff ff 00 00 00 8a 18 00 07 00 01    %}..?...........
0020: 00 00 00 01 00 00 00 00 00 00 00 0b 00 0b 00 03    ................
0030: 00 03 3f f3 3f f3 00 00 00 00 00 00 02 00 39 63    ..?.?.........9c
0040: 00 40 00 0f 05 00 0f 00 00 00 00 00 40 00 3b 63    .@..........@.;c
0050: 00 00 00 00 00 00 58 da 01 a3 00 00 00 00 00 00    ......X.........
0060: 0f 0f 00 00 00 00 00 00 00 00 00 00 a2 00 04 0c    ................
0070: 02 00 04 00 00 10 03 00 00 00 00 07 ff 00 00 00    ................
0080: 00 00 00 fc 00 1f 00 70 38 0b 20 0f a3 04 1e 0f    .......p8. .....
0090: 04 1e 0f 0b 20 0f 00 c0 ff a3 ff 03 00 02 00 00    .... ...........
00a0: 00 07 00 00 16 16 16 00 00 f0 00 f0 00 f0 00 00    ................
00b0: 00 00 00 00 00 00 00 00 00 00 02 00 00 03 c3 00    ................
00c0: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00e0: 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 82    ................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

And if we want to read/dump the CP map in U-Boot, we type this:

bfin> i2c md 22 0 100
0000: 00 00 00 00 00 00 00 00 00 02 01 00 00 07 4c 99    ..............L.
0010: 29 64 08 00 7a b1 05 b9 27 08 00 20 b7 a7 fa 93    )d..z...'.. ....
0020: 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ...............
0030: 00 00 00 00 00 09 00 00 00 00 80 80 00 00 00 00    ................
0040: 5c 02 3b d4 03 33 00 00 00 00 00 00 00 00 00 00    \.;..3..........
0050: c0 00 40 00 00 00 00 08 00 00 00 00 01 00 00 00    ..@.............
0060: 00 00 20 00 00 00 00 00 f0 04 00 00 10 00 00 00    .. .............
0070: 00 00 00 10 04 01 00 ff ff ff ff 05 c0 00 00 00    ................
0080: 00 c0 04 00 0c 03 0b 00 00 00 20 40 00 00 00 40    .......... @...@
0090: 00 40 00 00 00 00 00 f0 00 00 00 00 00 00 00 00    .@..............
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00    ..............`.
00b0: 00 3f ff 00 00 f9 31 20 00 00 01 00 00 18 00 12    .?....1 ........
00c0: 00 00 00 39 44 91 00 00 00 2c 00 60 38 00 e0 00    ...9D....,.`8...
00d0: 00 00 00 00 00 00 00 00 00 00 00 19 64 12 c5 78    ............d..x
00e0: 00 00 00 00 00 00 41 00 00 00 00 00 00 00 42 44    ......A.......BD
00f0: 01 40 04 d4 50 00 00 15 03 33 80 00 02 0d 00 38    .@..P....3.....8
bfin>

************

I hope this helps!

-Matt

Comments
Anonymous
Related