Change I2C bus for video communication

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.

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?

Well change the bus used:

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

- 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,

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).

The non-audio varient is here:

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

Regards,

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:

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:

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:

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.

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

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")

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

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

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

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.

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: The IP Address for eth0 is: 10.10.10.37 The IP Address for usb0 is: 192.168.7.2 beaglebone login:

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…

why are you still pointing to the "tda998x" driver?

https://github.com/beagleboard/linux/blob/3.8/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt#L16

Regards,

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>;
};

Chooses the tfp410 driver...

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

Verfiy:
https://github.com/derekmolloy/boneDeviceTree/tree/master/docs

Regards,