b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Compute Module IO board and official 7in LCD?

Wed Oct 21, 2015 8:23 pm

Hello everyone, is there a tutorial on getting the official 7in display [1] with the Compute Module?
Simply plugging in the display to DISP0 does not seem to do anything!

And also I'm slightly worried that the IO board is not on the list of supported devices =(.

[1] http://swag.raspberrypi.org/products/ra ... en-display

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Wed Oct 21, 2015 10:14 pm

There's no reason why it shouldn't be supported, I suspect it is just that no one has written it up as yet.

Looking at the CMIO board schematics, in the same way as jumper cables are needed for the cameras, jumpers will be needed to connect I2C pins to CD1_SDA and CD1_SCL on J6 (pins 37 & 39). If you're wanting the same config as on a Pi2 B+, then those want to link to GPIOs 28&29 (J6 pins 1&3). Use the Display1 connector.
Unlike the camera module, there are no extra GPIOs required, just I2C.

You will then need to configure the dt-blob.bin file to include
[email protected]_SDA {
type = "internal";
number = <28>;
};
[email protected]_SCL {
type = "internal";
number = <29>;
};
under the compute module section.

The BCM2835 does support two DSI buses, but the config needed to run that doesn't appear to be present at the moment.
I've copied that from the B+ schematic, but it's just possible you need to use Display0 connector, and CD0_SDA/SCL on J6 pins 45 & 47.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Mon Oct 26, 2015 6:38 pm

With the following pin configurations in the dt-blobs, my RPi-CM refuses to boot:

Code: Select all

      pins_cm {
         pin_config {
            [email protected] {
               polarity = "active_high";
               termination = "pull_down";
               startup_state = "inactive";
               function = "input";
            }; // pin
            [email protected] { function = "uart0";  termination = "no_pulling";    }; // TX uart0
            [email protected] { function = "uart0";  termination = "pull_up"; }; // RX uart0
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CLK
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CMD
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D0
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D1
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D2
            [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D3
         }; // pin_config

         pin_defines {
            [email protected]_SDA {
               type = "internal";
               number = <28>;
            };
            [email protected]_SCL {
               type = "internal";
               number = <29>;
            };
         }; // pin_defines
      }; // pins_cm
As I understand it, dt-blob.bin is for the VideoCore, and VideoCore does not like this particular DTB. None of HDMI, LCD, UART show anything when I plug in the power.

Strangely enough, when it boots ok when SDA and SCL are configured to 3 and 4 (I2C1).

I tested with 44, 45; 28,29; and 2,3, but they all behave the same: boot fails with no output to the screen.

Any thoughts?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 11:56 am

Is that your whole dt-blob.dts that you are compiling, or just a snippet?
If that's the whole thing then I can understand it not working as it is missing part of the framework.
If that's just the CM snippet, then I don't know. Have you got a serial interface that you can hook on to the serial console (GPIOs 145&15)? I'd be surprised if it weren't actually booting, but may have changed the display interface elsewhere (eg to the DSI panel) that isn't working. There is a config.txt option to add extra DT logging (dtdebug=1, and then "sudo vcdbg log msg"), but you need to be able to log in to get to that - either serial console, or add a USB ethernet adapter and hopefully the kernel will find it and start all the services required.

I don't have a display so can't play :(
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 5:18 pm

Ok, the board boots now and I don't know what I did differently. It boots whether I use 28/29 or 2/3.
I suspect there may have been power cycle issues (CPU not resetting correctly).
The snippet of dt-blob.dts I posted above was not the full version. I only copy-and-pasted the CM portion.

Anyhow, back to the problem at hands.
I have simply hooked up the display through the adaptor (22W/15W). I checked the polarity of the ribbon cable.

The display is being powered by the 5V0 and GND from J5. I am using gpio28/29 for SDA/SCL jumped from CD1_SDA and DA1_SCL

Looking in the /dev/input directory, I see 'mice' whether the display is connected or not. So not even the touch interface is being detected.

In the /boot/config.txt I got these:

Code: Select all

start_x=0
gpu_mem=128
enable_dpi_lcd=1
display_default_lcd=1
hdmi_vct=800 480 60 6 0 0 0
disable_overscan=1
dtparam=i2c_arm=off
dtparam=spi=off
Still no sign of life from the screen yet =(

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 5:47 pm

Do I still have to do the followings to enable the screen?

-pin-mux the SDA/SCL lines with a device tree overlay
-load i2c-dev
-enable i2c in config.txt (dtparam=i2c_arm=on)

On RPi2, i2c-dev is not loaded and there is no entry to /dev/i2c* so I don't think this is necessary, but I'd like to get it checked.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 6:01 pm

Here is the output of vcdbg: http://pastebin.com/RKntM0qT

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 9:22 pm

I realized without this line "enable_dpi_lcd=1" in config.txt, the board refuses to boot as I described earlier. No output to the serial console as well.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 9:56 pm

DPI (Digital Parallel Interface) is totally wrong - you have a DSI (Digital Serial Interface) display. display_default_lcd=1 looks dubious too. The fact that you don't need them on a normal Pi means the same should be true on a CM.

You shouldn't need to worry about the I2C at all (beyond specifying DISPLAY_SDA and DISPLAY_SCL in the blob) - the display is on i2c-0 and accessed by the GPU (not the ARM). GPIO 2/3 is i2c-1.

Start with a standard config.txt, add in the updated blob, and take it from there.
If you wish to try confirming the I2C, then you can try:
- add "dtparam=i2c_vc=on" - should get /dev/i2c-0
- use raspigpio to set GPIOs 0&1 back to inputs, and GPIOs 28&29 to alt1 (I2C) ("raspi-gpio set 0 ip", "raspi-gpio set 1 ip", "raspi-gpio set 28 a1", "raspi-gpio set 29 a1", all as sudo)
- check with "i2c-detect -y 0". I believe you should get addresses 0x38 and 0x45 responding.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Tue Oct 27, 2015 11:07 pm

6by9 wrote:DPI (Digital Parallel Interface) is totally wrong - you have a DSI (Digital Serial Interface) display. display_default_lcd=1 looks dubious too. The fact that you don't need them on a normal Pi means the same should be true on a CM.

You shouldn't need to worry about the I2C at all (beyond specifying DISPLAY_SDA and DISPLAY_SCL in the blob) - the display is on i2c-0 and accessed by the GPU (not the ARM). GPIO 2/3 is i2c-1.

Start with a standard config.txt, add in the updated blob, and take it from there.
If you wish to try confirming the I2C, then you can try:
- add "dtparam=i2c_vc=on" - should get /dev/i2c-0
- use raspigpio to set GPIOs 0&1 back to inputs, and GPIOs 28&29 to alt1 (I2C) ("raspi-gpio set 0 ip", "raspi-gpio set 1 ip", "raspi-gpio set 28 a1", "raspi-gpio set 29 a1", all as sudo)
- check with "i2c-detect -y 0". I believe you should get addresses 0x38 and 0x45 responding.
Thanks for the pointer. Yes I realized DPI was completely wrong. Don't know how it got in there.

Setting i2c_vc in the config.txt like you suggested gets me /dev/i2c-0. Unfortunately I only see address 0x45, not 0x38. Am I correct to assume that 0x45 is the display? and 0x38 is the touch input?

Also, here is some config output:

Code: Select all

$ vcgencmd get_config int
audio_pwm_mode=1
audio_sdm_mod_order=2
config_hdmi_boost=5
disable_auto_turbo=1
disable_commandline_tags=2
display_default_lcd=1
dtdebug=1
emmc_pll_core=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
hdmi_force_cec_address=65535
ignore_lcd=1
pause_burst_frames=1
program_serial_random=1
temp_limit=85
I think it's weird to see ignore_lcd=1. I manually changed to 0, and the board doesn't boot (again...).

The display is connected to DISP1, and CD1_SDA/SCL are jumped to gpio28/29.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Wed Oct 28, 2015 12:15 am

b1gtuna wrote:Setting i2c_vc in the config.txt like you suggested gets me /dev/i2c-0. Unfortunately I only see address 0x45, not 0x38. Am I correct to assume that 0x45 is the display? and 0x38 is the touch input?

The display is connected to DISP1, and CD1_SDA/SCL are jumped to gpio28/29.
As it happens, yes 0x45 is the display, and 0x38 is the touchscreen. Don't know why you'd see one and not the other, but I don't know all the details of the display (I'm just looking at the firmware source)

You don't say what firmware you're running. Please make sure it is recent (ideally rpi-update, but I realise that isn't necessarily easy on a CM).
A further look at the firmware history has a commit in mid October to make the display work on Model A and B Pis (ie 26 pin GPIO header) (*). There is now an extra display config entry
[email protected]_I2C_PORT {
type = "internal";
number = <0>;
};
If you're on GPIOs 28&29, you want it set to 0. This may be the critical bit - if that value is missing, then I suspect it is trying I2C port -1!

It also mentions setting "ignore_lcd=0" in config.txt, but I think that shouldn't be necessary on a CM.

If the display initialises correctly, then display_default_lcd will be set automagically, so it shouldn't be needed in config.txt.
Do NOT set enable_dpi_lcd=1.

(*) Reasoning appears to be that the I2C is not connected to the Display port on A&B's, so it has no chance of working without extra wiring. Therefore don't try the I2C chatter by default.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Wed Oct 28, 2015 12:28 am

Code: Select all

[email protected]_I2C_PORT {
type = "internal";
number = <0>;
};
Doh that was exactly it! I guess I need to get in the habit of monitoring RPi Kernel mailing list.
Now my screen is lit up and is looking good.

Now, where and how do I commit critical piece of information? Wiki? DT Overlay? dt-blob.dts?

Thank you very much for all the help to get me here. What a relief.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Wed Oct 28, 2015 10:43 am

Glad we got there. I hadn't synced my tree recently enough when you first posted, so hadn't seen the addition of the new parameter :(

It's not something that you would have seen in the kernel development as this is all in the closed source firmware. The only cryptic public announcement appears to be in https://github.com/Hexxeh/rpi-firmware/ ... 5e88be3484
firmware: dsi display: Fix use on Model A / Model B
See: viewtopic.php?f=108&t=120398
Not that that forum post says much more than "it doesn't work on an A or B" (though it can be made to now, but requires some wiring).

All the official docs on https://www.raspberrypi.org/documentation/ are created from the Github pages at https://github.com/raspberrypi/documentation/.
You can make edits and create a pull request to add useful stuff such as this. I'd suggest it fits under the Compute Module pages, with a link from the Display page. Ideally you'd include 3 DTS files - just display, display and one camera, and display with 2 cameras ;) The two camera version may want to use GPIOs 44&45 for the display, otherwise you have to connect GPIOs 28&29 to two places - that might involve soldering :o

Actually I'd suggest creating an issue now with a link to this thread. Ping @gsh on it just so that he is aware that it is now working, otherwise others may be duplicating effort. I see you've already posted in the display forum, so he may have noticed from there anyway.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Wed Oct 28, 2015 5:32 pm

Cool - opened a new issue [1]

Also PMed @gsh and CC'd you on it. Not sure if that was the right way to get a hold of him though.
Thanks for all the help!

[1] https://github.com/raspberrypi/documentation/issues/278
Last edited by b1gtuna on Wed Oct 28, 2015 6:07 pm, edited 1 time in total.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Wed Oct 28, 2015 5:34 pm

6by9 wrote:Glad we got there. I hadn't synced my tree recently enough when you first posted, so hadn't seen the addition of the new parameter :(

It's not something that you would have seen in the kernel development as this is all in the closed source firmware.
Ya I guess I am glad I decided to ask the question here then. No way I would've figured it out myself alone. It's unfortunate the firmware is closed-source, but as long as the community has people with insights into the inner workings of the Videocore, I think we are good.

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Thu Oct 29, 2015 12:19 am

Here is another quirk I am trying to figure out:

I thought I'd try connecting the display to the disp0 connector (all the succes I had thus far was using the disp1 connector).

What I did and works:
- Jumped CD0_SDA/SCL to GPIO2/3 (I2C1)
- Changed the dt-blob accordingly
- When I boot, the touch interface shows up, and registers input (cat /dev/input/mice) when I touch the screen
- The screen backlight turns off when left unused for a few minutes. And I can wake it up by touching the screen or moving the USB mouse

Problem:
- Screen only shows bright white blank screen.

So apart from no picture on the screen, a lot of things are working on disp0.

I realized all other RPi boards use only disp1 to expose the DSI. So I wasn't able to find a reference devicetree structure for disp0. I am suspecting it could be a VC quirk, in which case an insight from people who have access to the firmware would be really helpful!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Thu Oct 29, 2015 11:42 am

b1gtuna wrote:Here is another quirk I am trying to figure out:

I thought I'd try connecting the display to the disp0 connector (all the succes I had thus far was using the disp1 connector).
<snip>
I realized all other RPi boards use only disp1 to expose the DSI. So I wasn't able to find a reference devicetree structure for disp0. I am suspecting it could be a VC quirk, in which case an insight from people who have access to the firmware would be really helpful!
Not going to work. Currently the DSI interface to use is hardcoded in the display driver as being "1".

I suspect that making it configurable may be on Pi Tower's list of things to do, but not a particularly high priority - CM with multiple displays is going to be a very small market compared to the display on normal Pis. Addressing it would be fun anyway as the X support doesn't currently do HDMI and LCD simultaneously, let alone 2xLCDs.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Jojo84
Posts: 5
Joined: Wed Nov 04, 2015 4:39 pm

Re: Compute Module IO board and official 7in LCD?

Mon Nov 09, 2015 4:02 pm

The two camera version may want to use GPIOs 44&45 for the display, otherwise you have to connect GPIOs 28&29 to two places - that might involve soldering :o
Hi,

could you please explain this a little bit more in detail? I already managed to connect (and use :P ) one camera and one display on the CMIO.
Camera is connected to CAM0, display is connected to DISP1.
Jump wires connections are:
- CD0_SDA -> GPIO0
- CD0_SCL -> GPIO1
- CAM0_IO1 -> GPIO2
- CAM0_IO0 -> GPIO3

- CD1_SDA -> GPIO28
- CD1_SCL -> GPIO29
- CAM1_IO1 -> GPIO30
- CAM1_IO0 -> GPIO31

Now I like to add another camera, but I just dont know, how to jump-wire it :oops: . As I understand the CMIO schematic the I2C lines of CAM0/1 and DISP0/1 are directly coupled. Could you please describe what to do in such case?

Thanks alot in advance!

Jojo

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Wed Nov 11, 2015 4:21 am

Sorry I only have 1 camera adaptor, so I can't work on configuring the dual cameras :(. I'd expect we have to stack up the I2C lines of the display.

I also created a pull-request for the work that's been done so far [1]. Feel free to check it out!

[1] https://github.com/adam-lee/documentati ... display.md

Jojo84
Posts: 5
Joined: Wed Nov 04, 2015 4:39 pm

Re: Compute Module IO board and official 7in LCD?

Wed Nov 11, 2015 11:12 am

b1gtuna wrote:Sorry I only have 1 camera adaptor, so I can't work on configuring the dual cameras :(. I'd expect we have to stack up the I2C lines of the display.

I also created a pull-request for the work that's been done so far [1]. Feel free to check it out!

[1] https://github.com/adam-lee/documentati ... display.md
Thank you for the link. I have display and one camera working, too. With the difference, that I had the camera connected to CAM0 (not CAM1) and in addition I had to swap the jump wires. As I saw it was working, I was keeping my hands off of it :lol: .

I don't understand the problem at all. I know, that there seems to be a problem, but I just can not grab it due to a lack of knowledge :( .
What we know is that we can get two cameras working (w/o display).
We also know, that we can get one camera and one display working.
The two I2C-buses are hard-wired between CAM0-DISP0 and CAM1-DISP1. So for 2C1D (I just invented this abbreviation for two cameras and one display :lol: ) we'd "just" need to merge 2C0D and 1C1D. One I2C bus would be used for both one camera and the display.
I tried editing my dts file to get a combination of the 2C0D configuration from the tutorial and the original RPi configuration, where the display and the camera are also connected to the same I2C bus. But I only managed to put my CM into a non-bootable state :oops: .


EDIT:
I am very sorry for bothering you guys... I just got it working. I had a look at the dts file for 1C1D from b1gtuna and saw, that it should also support 2C1D. I applied the changes and voilà... CM is still booting, display is working and cameras are detected on both CAM0 and CAM1 (atm I can test only one cam, because of a missing adapter...). Wiring is the same as in the 2C0D tutorial.
Sorry again.
Thanks and Cheers!

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Thu Nov 12, 2015 6:35 pm

Jojo84 wrote:
b1gtuna wrote:Sorry I only have 1 camera adaptor, so I can't work on configuring the dual cameras :(. I'd expect we have to stack up the I2C lines of the display.

I also created a pull-request for the work that's been done so far [1]. Feel free to check it out!

[1] https://github.com/adam-lee/documentati ... display.md
Thank you for the link. I have display and one camera working, too. With the difference, that I had the camera connected to CAM0 (not CAM1) and in addition I had to swap the jump wires. As I saw it was working, I was keeping my hands off of it :lol: .

I don't understand the problem at all. I know, that there seems to be a problem, but I just can not grab it due to a lack of knowledge :( .
What we know is that we can get two cameras working (w/o display).
We also know, that we can get one camera and one display working.
The two I2C-buses are hard-wired between CAM0-DISP0 and CAM1-DISP1. So for 2C1D (I just invented this abbreviation for two cameras and one display :lol: ) we'd "just" need to merge 2C0D and 1C1D. One I2C bus would be used for both one camera and the display.
I tried editing my dts file to get a combination of the 2C0D configuration from the tutorial and the original RPi configuration, where the display and the camera are also connected to the same I2C bus. But I only managed to put my CM into a non-bootable state :oops: .


EDIT:
I am very sorry for bothering you guys... I just got it working. I had a look at the dts file for 1C1D from b1gtuna and saw, that it should also support 2C1D. I applied the changes and voilà... CM is still booting, display is working and cameras are detected on both CAM0 and CAM1 (atm I can test only one cam, because of a missing adapter...). Wiring is the same as in the 2C0D tutorial.
Sorry again.
Thanks and Cheers!
Great that it worked out! I also tested it with just one camera between the two interfaces. If someone with 2 camera adaptors can test this setup, it would be great for the sake of completeness.

The obvious differences between my 1C1D dts [1] and RPi's 2C0D dts [2] files are these:

- RPi's Camera 0 interface is jumped to GPIO 28,29,30 and 31, while mine is jumped to GPIO 0,1,4 and 5.
- RPi's Camera 1 interface is jumped to GPIO 0, 1, 2, and3, while mine is jumped to 28,29,30 and 31.
- RPi's pin definitions of `UNICAM_PORT` reverse the mapping - CAM0 is defined to be 1, and CAM1 is defined to be 0 (I found this to be confusing, so I corrected it).

[1] https://github.com/adam-lee/documentati ... display.md
[2] https://github.com/adam-lee/documentati ... -camera.md

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5829
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module IO board and official 7in LCD?

Thu Nov 12, 2015 9:29 pm

b1gtuna wrote:The obvious differences between my 1C1D dts [1] and RPi's 2C0D dts [2] files are these:

- RPi's Camera 0 interface is jumped to GPIO 28,29,30 and 31, while mine is jumped to GPIO 0,1,4 and 5.
- RPi's Camera 1 interface is jumped to GPIO 0, 1, 2, and3, while mine is jumped to 28,29,30 and 31.
- RPi's pin definitions of `UNICAM_PORT` reverse the mapping - CAM0 is defined to be 1, and CAM1 is defined to be 0 (I found this to be confusing, so I corrected it).

[1] https://github.com/adam-lee/documentati ... display.md
[2] https://github.com/adam-lee/documentati ... -camera.md
GPIO 2&3 vs 4&5 - we really must update the docs to say don't use I2C-1 from the ARM with the default blobs, as I'm fairly sure that is the only reason people are seeing issues.

UNICAM_PORT is mainly going to be that port 1 is the 4-lane capable port, and also the one used on standard Pis. I agree that it is a little weird that on a CM what the software considers to be camera 0 is connected to the CAM1 port. Making the most capable port "camera 0" makes some sense, but everything is pretty arbitrary there.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Jojo84
Posts: 5
Joined: Wed Nov 04, 2015 4:39 pm

Re: Compute Module IO board and official 7in LCD?

Fri Nov 13, 2015 2:22 pm

6by9 wrote: GPIO 2&3 vs 4&5 - we really must update the docs to say don't use I2C-1 from the ARM with the default blobs, as I'm fairly sure that is the only reason people are seeing issues.

UNICAM_PORT is mainly going to be that port 1 is the 4-lane capable port, and also the one used on standard Pis. I agree that it is a little weird that on a CM what the software considers to be camera 0 is connected to the CAM1 port. Making the most capable port "camera 0" makes some sense, but everything is pretty arbitrary there.
Is is strange, that I've never had problems with pins 2&3? As I sayed I have wired it up as noted above. Thats basically the wiring as noted in the tutorial about dualcams on the CM, with the difference, that I swapped the signals. I must say, that I don't really know, why I did that, but it worked for me :roll: .

b1gtuna
Posts: 23
Joined: Wed Oct 21, 2015 12:17 am

Re: Compute Module IO board and official 7in LCD?

Fri Nov 13, 2015 6:28 pm

Jojo84 wrote:
6by9 wrote: GPIO 2&3 vs 4&5 - we really must update the docs to say don't use I2C-1 from the ARM with the default blobs, as I'm fairly sure that is the only reason people are seeing issues.

UNICAM_PORT is mainly going to be that port 1 is the 4-lane capable port, and also the one used on standard Pis. I agree that it is a little weird that on a CM what the software considers to be camera 0 is connected to the CAM1 port. Making the most capable port "camera 0" makes some sense, but everything is pretty arbitrary there.
Is is strange, that I've never had problems with pins 2&3? As I sayed I have wired it up as noted above. Thats basically the wiring as noted in the tutorial about dualcams on the CM, with the difference, that I swapped the signals. I must say, that I don't really know, why I did that, but it worked for me :roll: .
RPi's wiki also has a footnote saying this:
As of 2015-04-17 some users are reporting issues with GPIO pin 2 and 3 for camera control. Pin 4 and 5 is reported to work. The issue is being investigated.
However I ended up using GPIO4 and 5 simply because GPIO 2 and 3 were enabled as I2C.1:

Code: Select all

$ sudo raspi-gpio get
BANK0 (GPIO 0 to 27):
  GPIO 00: level=1 fsel=4 alt=0 func=SDA0
  GPIO 01: level=1 fsel=4 alt=0 func=SCL0
  GPIO 02: level=0 fsel=4 alt=0 func=SDA1
  GPIO 03: level=0 fsel=4 alt=0 func=SCL1
  GPIO 04: level=1 fsel=0 alt=  func=INPUT
  GPIO 05: level=1 fsel=0 alt=  func=INPUT
So I am thinking the problem (RPi users had in the past) doesn't go beyond pin muxing of the pins, as suggested by 6by9 above.

kzmo
Posts: 3
Joined: Tue Dec 01, 2015 7:53 pm

Re: Compute Module IO board and official 7in LCD?

Tue Dec 01, 2015 8:11 pm

Hi all,

I'm also having some problems running 2 cameras and 1 display with CM and CMIO board.

I followed the instructions here:
https://www.raspberrypi.org/documentati ... -camera.md
using dt-blob.bin from http://goo.gl/lozvZB (mentioned in point 2.) I have successfully enabled two cameras: I'm running two instances of raspivid, one for each of the camera. Everything works on HDMI monitor (I get displayed two camera streams) but now I need to display those camera feeds on 7inch LCD I got from:
http://pl.farnell.com/raspberry-pi/rasp ... dp/2473872

I reversed dt-blob.dtb to source form and added [email protected]_I2C_PORT so my whole dt-blob.dts looks like this:

Code: Select all

/dts-v1/;

/ {

	videocore {

		pins_cm {

			pin_config {

				[email protected] {
					polarity = "active_high";
					termination = "pull_down";
					startup_state = "inactive";
					function = "input";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "output";
					termination = "no_pulling";
				};

				[email protected] {
					function = "output";
					termination = "no_pulling";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "uart0";
					termination = "no_pulling";
				};

				[email protected] {
					function = "uart0";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "output";
					termination = "no_pulling";
				};

				[email protected] {
					function = "output";
					termination = "no_pulling";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_up";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "pull_down";
				};

				[email protected] {
					function = "input";
					termination = "no_pulling";
					drive_strength_mA = <0x8>;
					polarity = "active_high";
				};

				[email protected] {
					function = "output";
					termination = "no_pulling";
					drive_strength_mA = <0x8>;
					polarity = "active_low";
					startup_state = "active";
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};

				[email protected] {
					function = "sdcard";
					termination = "pull_up";
					drive_strength_mA = <0x8>;
				};
			};

			pin_defines {

				[email protected]_CAMERAS {
					type = "internal";
					number = <0x2>;
				};

				[email protected]_0_LED {
					type = "internal";
					number = <0x2>;
				};

				[email protected]_0_SHUTDOWN {
					type = "internal";
					number = <0x3>;
				};

				[email protected]_0_UNICAM_PORT {
					type = "internal";
					number = <0x1>;
				};

				[email protected]_0_I2C_PORT {
					type = "internal";
					number = <0x0>;
				};

				[email protected]_0_SDA_PIN {
					type = "internal";
					number = <0x0>;
				};

				[email protected]_0_SCL_PIN {
					type = "internal";
					number = <0x1>;
				};

				[email protected]_1_LED {
					type = "internal";
					number = <0x1e>;
				};

				[email protected]_1_SHUTDOWN {
					type = "internal";
					number = <0x1f>;
				};

				[email protected]_1_UNICAM_PORT {
					type = "internal";
					number = <0x0>;
				};

				[email protected]_1_I2C_PORT {
					type = "internal";
					number = <0x0>;
				};

				[email protected]_1_SDA_PIN {
					type = "internal";
					number = <0x1c>;
				};

				[email protected]_1_SCL_PIN {
					type = "internal";
					number = <0x1d>;
				};

				[email protected]_I2C_PORT {
					type="internal";
					number=<0x0>;
				};
			};
		};
	};
}; 
And my config.txt looks like this:

Code: Select all

# For more options and information see 
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

start_x=1
gpu_mem=128

#dtparam=i2c_arm=off
display_default_lcd=1 
when display_default_lcd=1 is present, then HDMI is now working, the rpi boots up and I have nothing on LCD (not even backlight). When I remove display_default_lcd=1 then HDMI works again and LCD still doesn't work.
The 7inch LCD display is attached to DISP1 connector on CMIO board.

I have wired all the pins as described in camera guide, so:
J5:
GPIO0 -> CD1_SDA
GPIO1 -> CD1_SCL
GPIO2 -> CAM1_IO1
GPIO3 -> CAM1_IO0
GND -> GPIO GND on display board (as described here: http://www.farnell.com/datasheets/1960197.pdf)
5V0 -> GPIO 5V on display board

J6:
GPIO28 -> CD0_SDA
GPIO29 -> CD0_SCL
GPIO30 -> CAM0_IO1
GPIO31 -> CAM0_IO0

What could be wrong? How can I troubleshoot the matter?

Any help would be appreciated!

best regards,
Chris

Return to “Compute Module”