Change I2C bus for video communication

190 views
Skip to first unread message

bremenpl

unread,
Nov 21, 2014, 3:14:21 AM11/21/14
to beagl...@googlegroups.com
Hello there,
I have created a shield for BeagleBone Black on which I have a HDMI output connected to a dataframer, which goes to the LCD pins of the BeagleBone Black. Ive tried to copy the functionality of an onboard video circuit. For that I used the chip used in BeagleBoneMx (TFP410PAPG4).

The problem now is that the MCU communicates via I2C with the on board HDMI framer (TDA19988) using I2C bus 0. That bus is not available on the headers of the board, so I have connected my external framer using I2C bus 1.

I face 2 problems:

- How to make changes in the system configuration to tell the MCU to either talk to connected devices through HDMI using I2C-1 instead of I2C-0, or to talk to both?

- Second thing, with this modification, will I be abble to still use i2C-1 bus for userspace applications? I have more devices connected to that bus.

I would really aprichiate any help regarding this matter, I really dont know where is the config file for this.



Robert Nelson

unread,
Nov 21, 2014, 9:47:58 AM11/21/14
to Beagle Board
On Fri, Nov 21, 2014 at 2:14 AM, bremenpl <brem...@gmail.com> wrote:
Hello there,
I have created a shield for BeagleBone Black on which I have a HDMI output connected to a dataframer, which goes to the LCD pins of the BeagleBone Black. Ive tried to copy the functionality of an onboard video circuit. For that I used the chip used in BeagleBoneMx (TFP410PAPG4).

The problem now is that the MCU communicates via I2C with the on board HDMI framer (TDA19988) using I2C bus 0. That bus is not available on the headers of the board, so I have connected my external framer using I2C bus 1.

I face 2 problems:

- How to make changes in the system configuration to tell the MCU to either talk to connected devices through HDMI using I2C-1 instead of I2C-0, or to talk to both?


 

- Second thing, with this modification, will I be abble to still use i2C-1 bus for userspace applications? I have more devices connected to that bus.

Regards,

--

Bremenpl

unread,
Nov 21, 2014, 11:01:43 AM11/21/14
to beagl...@googlegroups.com
I am not very good at tree overlays, but from the one you have provided me i believe i would be abble to reduce it only to modify the LCD pins (I also need to disable mcasp, because I only use video and the pins for mcasp are used as other peripherals). I thing I tried to find the place in this code that turns off the I2C-0 and turns on I2C-1 but I couldnt.

In this part:
hdmi {
                compatible = "tilcdc,slave";
                i2c = <&i2c0>;
                pinctrl-names = "default", "off";
                pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
                pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;

                panel-info {
                    bpp = <16>;
                    ac-bias = <255>;
                    ac-bias-intrpt = <0>;
                    dma-burst-sz = <16>;
                    fdd = <16>;
                    sync-edge = <1>;
                    sync-ctrl = <1>;
                    raster-order = <0>;
                    fifo-th = <0>;
                    invert-pxl-clk;
                };
            };


Is I2C-0 equal to I2C-1 on the pinout header and is I2C-1 (in software_ equal to I2C-2? That would make sense. Could you please point me out either there ahs to be anything else changed for HDMI to work? All I got left is I2C and i dont know either thats all. You havent answered me about the question about using the bus for other purposses, did you mean that it is possible? When I think of it now, there are at least 3 devices on the I2C-0 (power controller, HDMI, eeprom i think).

W dniu 2014-11-21 o 15:47, Robert Nelson pisze:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/qQTZm20XGoo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Bremenpl

Robert Nelson

unread,
Nov 21, 2014, 11:06:42 AM11/21/14
to Beagle Board
On Fri, Nov 21, 2014 at 10:04 AM, Bremenpl <brem...@gmail.com> wrote:
> I am not very good at tree overlays, but from the one you have provided me i
> believe i would be abble to reduce it only to modify the LCD pins (I also
> need to disable mcasp, because I only use video and the pins for mcasp are
> used as other peripherals). I thing I tried to find the place in this code
> that turns off the I2C-0 and turns on I2C-1 but I couldnt.

The non-audio varient is here:

https://github.com/beagleboard/linux/blob/3.8/firmware/capes/cape-boneblack-hdmin-00A0.dts#L94

Bremenpl

unread,
Nov 21, 2014, 11:13:37 AM11/21/14
to beagl...@googlegroups.com
Thank you, i will try to use this overlay. You are probably in US, thats
a pitty for me because there is a big time difference which brings
longer help delay :P.

W dniu 2014-11-21 o 17:06, Robert Nelson pisze:
Bremenpl

Bremenpl

unread,
Nov 24, 2014, 1:57:13 AM11/24/14
to beagl...@googlegroups.com
Hello again,
I am just trying to export the compiled .dtbo file but I have to
unexport the residing hdmi overlay. When I do that with echo i get
kernel panic and my ssh session is lost. I would like to comment out the
export at boot but I dont know where to find the place I should do it in
console image. In the regular image its in uEnv.txt file at the
additional usb partition. Could you help me with this please?

W dniu 2014-11-21 o 17:06, Robert Nelson pisze:
Bremenpl

Bremenpl

unread,
Nov 24, 2014, 2:45:32 AM11/24/14
to beagl...@googlegroups.com
I have found the uEnv.txt file in boot directory but for a long time now
I cannot find where are the .dtbo files stored in console image of
debian. I am putting my .dtbo file in /lib/firmware but when trying to
echo its name to slots it doesnt want to pick it up from there.

W dniu 2014-11-21 o 17:06, Robert Nelson pisze:
Bremenpl

Bremenpl

unread,
Nov 24, 2014, 4:25:55 AM11/24/14
to beagl...@googlegroups.com
Okay, I have managed to load the tree overlay by hand from /lib/firmware/. What was wrong was that I havent followed the naming style. I have changed the name of .dtbo file to BB-BONELT-HDMIN1-00A0.dtbo and I could load the tree overlay by hand. Although, the overlay didnt want to load automatically after placing an apropriate line in uEnv.txt.

root@beaglebone:/sys/devices/bone_capemgr.9# dmesg | grep .dtbo
[    0.680671] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BB-BONELT-HDMIN1-00A0.dtbo
[    0.680686] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BB-BONELT-HDMIN1-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[    0.994941] bone-capemgr bone_capemgr.9: failed to load firmware 'BB-BONELT-HDMIN1-00A0.dtbo'
[    1.013699] bone-capemgr bone_capemgr.9: slot #4: Requesting firmware 'cape-bone-2g-emmc1.dtbo' for board-name 'Bone-LT-eMMC-2G', version '00A0'
[    1.013715] bone-capemgr bone_capemgr.9: slot #4: dtbo 'cape-bone-2g-emmc1.dtbo' loaded; converting to live tree
[  102.139293] bone-capemgr bone_capemgr.9: slot #8: Requesting part number/version based 'BB-BONELT-HDMIN1-00A0.dtbo
[  102.139310] bone-capemgr bone_capemgr.9: slot #8: Requesting firmware 'BB-BONELT-HDMIN1-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  102.142979] bone-capemgr bone_capemgr.9: slot #8: dtbo 'BB-BONELT-HDMIN1-00A0.dtbo' loaded; converting to live tree


I am not sure if I turned off the standard HDMI overlay, I just commented the enables lines in uEnv.txt, now my slots file looks like this:

root@beaglebone:/sys/devices/bone_capemgr.9# cat slots
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN


I have loaded the HDMIN1 tree overlay by hand, because it failed to load at boot. I dont know if thats the case but I got no visual on the monitor connected to my external hdmi circuit. I have tried changing and the recompiling it for both I2C1 and I2C2 as I was not sure whats the proper naming style. The I2C 1 in software is I2C2 on header (that is the bus i am connected to using hdmi socket).

i2c = <&i2c1>;

I dont know now either the problem lies in the hardware I have created or the wrongly configured software. I would really aprichiate any help in this matter. I have copied the circuit for HDMI nearly fully from HDMI circuit for Beaglebone Mx so it seems to be correct. I have also soldered everything really carefully.

I would really really aprichiate some more help.


W dniu 2014-11-21 o 17:06, Robert Nelson pisze:
On Fri, Nov 21, 2014 at 10:04 AM, Bremenpl <brem...@gmail.com> wrote:

-- 
Bremenpl

Jason Lange

unread,
Nov 24, 2014, 4:47:17 AM11/24/14
to Beagle Board

I am not sure if I turned off the standard HDMI overlay, I just commented the enables lines in uEnv.txt, now my slots file looks like this:

root@beaglebone:/sys/devices/bone_capemgr.9# cat slots
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN


You have disabled the HDMI overlays, if they were loaded the relevant slots (5 and 6) would start with " ff:P-O-L" as it does for slot 4.  (I believe the "L" stands for "Loaded")

Jason Lange

unread,
Nov 24, 2014, 4:49:58 AM11/24/14
to Beagle Board
If you want to load a custom cape at boot you need to follow these instructions:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Loading_custom_capes

Bremenpl

unread,
Nov 24, 2014, 4:50:03 AM11/24/14
to beagl...@googlegroups.com
In that case after the disabling I have enabled my module by hand (BB-BONELT-HDMIN1):

root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots

 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 9: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONELT-HDMIN1

But i still get no visual on the attached monitor :(. The monitor is in standby so he doesnt get any signal.

W dniu 2014-11-24 o 10:46, Jason Lange pisze:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/qQTZm20XGoo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Bremenpl

Jason Lange

unread,
Nov 24, 2014, 4:56:23 AM11/24/14
to Beagle Board
On Mon, Nov 24, 2014 at 1:52 AM, Bremenpl <brem...@gmail.com> wrote:
In that case after the disabling I have enabled my module by hand (BB-BONELT-HDMIN1):

root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 9: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONELT-HDMIN1


But i still get no visual on the attached monitor :(. The monitor is in standby so he doesnt get any signal.

:(
I wish you the best of luck.
It's 2am here so I'm going to bed.
 

Bremenpl

unread,
Nov 24, 2014, 4:59:09 AM11/24/14
to beagl...@googlegroups.com
Thanks for help with the boot loading of tree overlay, it works. But monitor still doesnt display anything :/. At least I know its not because of loading after boot.

W dniu 2014-11-24 o 10:56, Jason Lange pisze:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/qQTZm20XGoo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Bremenpl

Bremenpl

unread,
Nov 24, 2014, 6:25:07 AM11/24/14
to beagl...@googlegroups.com
Some update on the progress:
I figured out that I have switched SDA and SCL lines for the monitor connection through HDMI. I have flipped that to proper position and I can see additional devices on the bus:

root@beaglebone:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- 4a 4b -- -- -- --
50: 50 -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- 61 -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                        
root@beaglebone:~#


0x20 - I/O expander
0x61 - external DAC
0x68 - RTC clock

0x20, 0x37, 0x3a, 0x4a, 0x4b and 0x50 appear after I connect the monitor ro hdmi connector.

I think I have figured out that I have to put i2c = <&i2c2>; in the overlay file, as I think it reffers to the hardware number.

Now when I boot BeagleBone Black in the debug console I see:

.
.
.
Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.338954] omap2_mbox_probe: platform not supported
[    0.493953] tps65217-bl tps65217-bl: no platform data provided
[    0.558115] bone-capemgr bone_capemgr.9: slot #0: No cape found
[    0.595223] bone-capemgr bone_capemgr.9: slot #1: No cape found
[    0.632332] bone-capemgr bone_capemgr.9: slot #2: No cape found
[    0.662506] bone-capemgr bone_capemgr.9: bone: Invalid signature '825a93cf' at slot 3
[    0.670687] bone-capemgr bone_capemgr.9: slot #3: No cape found
[    0.689417] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[    0.751741] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[    0.763488] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[    0.770796] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
Loading, please wait...
systemd-fsck[210]: rootfs: clean, 21580/111104 files, 121672/444160 blocks
systemd-fsck[326]: dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
systemd-fsck[326]: /dev/mmcblk0p1: 138 files, 31622/49047 clusters
[    6.224809] libphy: PHY 4a101000.mdio:01 not found
[    6.229881] net eth0: phy 4a101000.mdio:01 not found on slave 1
[   10.703450] dummy 1-0034: Error -121 writing to cec:0xff
[   10.740063] tda998x 1-0070: Error -121 reading from 0xa
[   10.781054] tda998x 1-0070: Error -121 writing to 0xa
[   10.837748] tda998x 1-0070: Error -121 reading from 0xa
[   10.861162] tda998x 1-0070: Error -121 writing to 0xa
[   10.917824] tda998x 1-0070: Error -121 reading from 0x1
[   10.941245] tda998x 1-0070: Error -121 writing to 0x1
[   10.972464] tda998x 1-0070: Error -121 reading from 0x1
[   11.003772] tda998x 1-0070: Error -121 writing to 0x1
[   11.029803] tda998x 1-0070: Error -121 writing to REG_CURPAGE
[   11.065182] tda998x 1-0070: Error -121 writing to 0x200
[   11.095575] tda998x 1-0070: Error -121 writing to 0x201
[   11.128734] tda998x 1-0070: Error -121 writing to 0x202
[   11.165874] tda998x 1-0070: Error -121 writing to 0x203
[   11.189995] tda998x 1-0070: Error -121 writing to 0x204
[   11.217379] tda998x 1-0070: Error -121 writing to 0x205
[   11.230326] tda998x 1-0070: Error -121 writing to 0x20e
[   11.242030] tda998x 1-0070: Error -121 writing to 0x211
[   11.253725] tda998x 1-0070: Error -121 writing to 0x207
[   11.260694] tda998x 1-0070: Error -121 writing to 0x208
[   11.271538] tda998x 1-0070: Error -121 writing to 0x209
[   11.284844] tda998x 1-0070: Error -121 writing to 0x20a
[   11.294595] tda998x 1-0070: Error -121 writing to 0x206
[   11.305084] tda998x 1-0070: Error -121 writing to REG_CURPAGE
[   11.313653] tda998x 1-0070: Error -121 reading from 0x0
[   11.319751] tda998x 1-0070: Error -121 reading from 0x2
[   11.328249] tilcdc 4830e000.fb: no encoders/connectors found
[   11.334233] tilcdc 4830e000.fb: failed to initialize mode setting

Debian GNU/Linux 7 beaglebone ttyO0

default username:password is [debian:temppwd]

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

The IP Address for eth0 is: 10.10.10.37
The IP Address for usb0 is: 192.168.7.2
beaglebone login:


There are some errors regarding reading data from TDA chip. When i placed i2c1 in the tree overlay file it just said one line about hdmi i2c problem.

Looking forward to your answer.
-- 
Bremenpl

bremenpl

unread,
Nov 24, 2014, 6:47:16 AM11/24/14
to beagl...@googlegroups.com
I wonder, Maybe there has to be more software changed than only tree overlay for i2c? I am using the chip that BeagleboneMx used. It doesnt use hotplug and CEC for example...

Robert Nelson

unread,
Nov 24, 2014, 2:56:06 PM11/24/14
to Beagle Board

Bremenpl

unread,
Nov 24, 2014, 3:10:42 PM11/24/14
to beagl...@googlegroups.com
Do I have to place this part:

dvicape {
    compatible = "ti,tilcdc,tfp410";
    i2c = <&i2c2>;
    pinctrl-names = "default";
    pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
    powerdn-gpio = <&gpio2 31 0>;
};

In the overlay file you have provided me erlier instead of HDMI part? Or do I have to get rid of more? I am not sure which parts exacly can go.

W dniu 2014-11-24 o 20:55, Robert Nelson pisze:
-- 
Bremenpl

Robert Nelson

unread,
Nov 24, 2014, 3:12:55 PM11/24/14
to Beagle Board
On Mon, Nov 24, 2014 at 2:13 PM, Bremenpl <brem...@gmail.com> wrote:
> Do I have to place this part:
>
> dvicape {
> compatible = "ti,tilcdc,tfp410";
> i2c = <&i2c2>;
> pinctrl-names = "default";
> pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
> powerdn-gpio = <&gpio2 31 0>;
> };
>
> In the overlay file you have provided me erlier instead of HDMI part? Or do
> I have to get rid of more? I am not sure which parts exacly can go.

> compatible = "ti,tilcdc,tfp410";

Chooses the tfp410 driver...

Bremenpl

unread,
Nov 24, 2014, 3:31:28 PM11/24/14
to beagl...@googlegroups.com
This is the output on debug serial now:

.
.
.Starting kernel ...


Uncompressing Linux... done, booting the kernel.
[    0.338981] omap2_mbox_probe: platform not supported
[    0.493971] tps65217-bl tps65217-bl: no platform data provided
[    0.558187] bone-capemgr bone_capemgr.9: slot #0: No cape found
[    0.595295] bone-capemgr bone_capemgr.9: slot #1: No cape found
[    0.632402] bone-capemgr bone_capemgr.9: slot #2: No cape found
[    0.669512] bone-capemgr bone_capemgr.9: slot #3: No cape found
[    0.688174] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[    0.749856] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[    0.761544] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[    0.768813] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
Loading, please wait...
systemd-fsck[205]: rootfs: clean, 21581/111104 files, 122520/444160 blocks
systemd-fsck[290]: dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
systemd-fsck[290]: /dev/mmcblk0p1: 138 files, 31622/49047 clusters
[    6.507830] tilcdc 4830e000.fb: no encoders/connectors found
[    6.513806] tilcdc 4830e000.fb: failed to initialize mode setting


There is still no visual. It says:
... tilcdc..
Does that mean hes not using the driver for tfp410?
Also, could you please confirm either the I2C2 in the tree overlay is the I2C2 on the header? I am still not certain.

W dniu 2014-11-24 o 21:12, Robert Nelson pisze:
-- 
Bremenpl

Robert Nelson

unread,
Nov 24, 2014, 3:36:51 PM11/24/14
to Beagle Board

Bremenpl

unread,
Nov 24, 2014, 3:40:35 PM11/24/14
to beagl...@googlegroups.com
I know those sheets. Even thought it says that pinumux is I2C2, in the
software for i2ctools i reffer to nr 1 not nr 2. Thats why I am confused.

W dniu 2014-11-24 o 21:36, Robert Nelson pisze:
Bremenpl

Bremenpl

unread,
Nov 24, 2014, 3:50:15 PM11/24/14
to beagl...@googlegroups.com
is the tilcdc part correct?

W dniu 2014-11-24 o 21:36, Robert Nelson pisze:
Bremenpl

bremenpl

unread,
Nov 25, 2014, 2:29:58 AM11/25/14
to beagl...@googlegroups.com
This is my current overlay file:
http://pastie.org/private/j91tplpqnhymvvig1pc0rw

Can you please tell me either there is still anything wrong? I Still cant get the video to work :(
Reply all
Reply to author
Forward
0 new messages