Questions about CM4
1: Can the two DSI channels be used at the same time?
2: Can PCIE connect to multiple PCIE devices?
3: Does HDMI output 4K FPS 60 need to be set? My 4K FPS output is only 30
4: The 111th pin, what is the function of VDAC_COMP, whether it outputs video or audio, it is enabled in raspi-config, what is the function after enabling?
5: What are the display rules of HDMI and DSI, and what should be output first when connected at the same time.
6: Are the 94 and 96 pins AnalogIP1 and AnalogIP0 only used for Type c? Can it run at full power if it is suspended? Should we plan to use POE power supply
-
- Posts: 28
- Joined: Wed Nov 04, 2020 2:56 am
-
- Posts: 2509
- Joined: Sat Aug 18, 2012 2:33 pm
Re: CM4 doubts
1: i believe both can be used at the same time, but the drivers/firmware may not fully support it yet
2: if you use a pci-e port multipler, yes
3: its likely the same hdmi_enable_4kp60=1 in config.txt as the rpi4b, with the same limitation that it only works on hdmi0
4: VDAC_COMP looks to be the raw composite video output, likely enabled by the same enable_tvout=1 as the rpi4b
6: i believe AnalogIP1 and AnalogIP0 are just 2 unused ADC's on the PMIC, you can then use them for whatever you want, the rpi4b happened to have one wired to CC1, but i dont think it was ever used by anything
2: if you use a pci-e port multipler, yes
3: its likely the same hdmi_enable_4kp60=1 in config.txt as the rpi4b, with the same limitation that it only works on hdmi0
4: VDAC_COMP looks to be the raw composite video output, likely enabled by the same enable_tvout=1 as the rpi4b
6: i believe AnalogIP1 and AnalogIP0 are just 2 unused ADC's on the PMIC, you can then use them for whatever you want, the rpi4b happened to have one wired to CC1, but i dont think it was ever used by anything
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 10318
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: CM4 doubts
1) Yes, you should be able to using the kernel DRM/KMS drivers. I'm working on those at the moment. Through the firmware drivers it's only one DSI display.
2) Yes, although you may find some restrictions due to number of interrupts and size of the PCIe mapping range.
3) Yes.
4) It's the composite video output - Video Digital to Analogue Converter Composite. Look at the CMIO4 circuit diagrams and you'd see it routed as a signal called TV_OUT to pin 11 of the 14 pin header.
5) It depends on the configuration of the DRM/KMS driver. The hardware has 3 composition pipelines, and can largely use any of them for any display (exceptions are DSI0, DPI, and composite video). HDMI has a hotplug detect line, so will be conditionally enabled based on that. DSI and DPI displays have to be defined via device tree, and if defined will always be considered to be connected.
6) I'm not sure anyone has thought about the software interface to read those analogue lines. The PMIC by itself will do nothing with them.
2) Yes, although you may find some restrictions due to number of interrupts and size of the PCIe mapping range.
3) Yes.
4) It's the composite video output - Video Digital to Analogue Converter Composite. Look at the CMIO4 circuit diagrams and you'd see it routed as a signal called TV_OUT to pin 11 of the 14 pin header.
5) It depends on the configuration of the DRM/KMS driver. The hardware has 3 composition pipelines, and can largely use any of them for any display (exceptions are DSI0, DPI, and composite video). HDMI has a hotplug detect line, so will be conditionally enabled based on that. DSI and DPI displays have to be defined via device tree, and if defined will always be considered to be connected.
6) I'm not sure anyone has thought about the software interface to read those analogue lines. The PMIC by itself will do nothing with them.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 2509
- Joined: Sat Aug 18, 2012 2:33 pm
Re: CM4 doubts
Code: Select all
root@raspberrypi:~# vcgencmd measure_volts usb_pd
volt=1.7600V
vcgencmd measure_volts ain1
analog1 was wired to gnd, so it got a boring name
-
- Posts: 28
- Joined: Wed Nov 04, 2020 2:56 am
Re: CM4 doubts
3: I added the corresponding code in config.txt, it has no effectcleverca22 wrote: ↑Mon Nov 09, 2020 11:51 am1: i believe both can be used at the same time, but the drivers/firmware may not fully support it yet
2: if you use a pci-e port multipler, yes
3: its likely the same hdmi_enable_4kp60=1 in config.txt as the rpi4b, with the same limitation that it only works on hdmi0
4: VDAC_COMP looks to be the raw composite video output, likely enabled by the same enable_tvout=1 as the rpi4b
6: i believe AnalogIP1 and AnalogIP0 are just 2 unused ADC's on the PMIC, you can then use them for whatever you want, the rpi4b happened to have one wired to CC1, but i dont think it was ever used by anything
It can only support 4K 30FPS instead of 60FPS, 2K can output 60FPS
- Attachments
-
- HDMI1_2K.png (77.65 KiB) Viewed 650 times
-
- HDMI0_30FPS.png (50.49 KiB) Viewed 650 times
-
- HDMI0_4K.png (47.04 KiB) Viewed 650 times
-
- Posts: 28
- Joined: Wed Nov 04, 2020 2:56 am
Re: CM4 doubts
qiangyou_peng wrote: ↑Tue Nov 10, 2020 8:55 am3: I added the corresponding code in config.txt, it has no effectcleverca22 wrote: ↑Mon Nov 09, 2020 11:51 am1: i believe both can be used at the same time, but the drivers/firmware may not fully support it yet
2: if you use a pci-e port multipler, yes
3: its likely the same hdmi_enable_4kp60=1 in config.txt as the rpi4b, with the same limitation that it only works on hdmi0
4: VDAC_COMP looks to be the raw composite video output, likely enabled by the same enable_tvout=1 as the rpi4b
6: i believe AnalogIP1 and AnalogIP0 are just 2 unused ADC's on the PMIC, you can then use them for whatever you want, the rpi4b happened to have one wired to CC1, but i dont think it was ever used by anything
It can only support 4K 30FPS instead of 60FPS, 2K can output 60FPS
- Attachments
-
- HDMI1_60FPS.png (63.96 KiB) Viewed 648 times
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 10318
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: CM4 doubts
CM4 using vc4-fkms-v3d with a 4k monitor attached.
It is true that vc4-kms-v3d currently doesn't support 4k60. Going above 4k30 requires a load of extra stuff over the HDMI link. It's being worked on.
Code: Select all
pi@raspberrypi:~ $ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 7680 x 7680
HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
3840x2160 60.00*+ 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98
2560x1440 59.95
2048x1080 24.00
1920x1080 60.00 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94 50.00
1600x1200 60.00
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 60.00 59.94
720x400 70.08
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 28
- Joined: Wed Nov 04, 2020 2:56 am
Re: CM4 doubts
4: I don’t really understand "composite video output-Video Digital to Analogue Converter Composite". I have heard of TV interface and AV interface.6by9 wrote: ↑Mon Nov 09, 2020 1:55 pm1) Yes, you should be able to using the kernel DRM/KMS drivers. I'm working on those at the moment. Through the firmware drivers it's only one DSI display.
2) Yes, although you may find some restrictions due to number of interrupts and size of the PCIe mapping range.
3) Yes.
4) It's the composite video output - Video Digital to Analogue Converter Composite. Look at the CMIO4 circuit diagrams and you'd see it routed as a signal called TV_OUT to pin 11 of the 14 pin header.
5) It depends on the configuration of the DRM/KMS driver. The hardware has 3 composition pipelines, and can largely use any of them for any display (exceptions are DSI0, DPI, and composite video). HDMI has a hotplug detect line, so will be conditionally enabled based on that. DSI and DPI displays have to be defined via device tree, and if defined will always be considered to be connected.
6) I'm not sure anyone has thought about the software interface to read those analogue lines. The PMIC by itself will do nothing with them.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 10318
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: CM4 doubts
VDAC_COMP is just a more complete description of what signal is involved within the SoC.qiangyou_peng wrote: ↑Wed Nov 11, 2020 3:22 am4: I don’t really understand "composite video output-Video Digital to Analogue Converter Composite". I have heard of TV interface and AV interface.
Composite video is an analogue signal. Inside the SoC video is all digital. Hence there is a digital to analogue converter to convert between the two domains.
The video encoder block can produce composite, S-video, or component video out. It's in composite mode mode on the Pi, hence composite.
It's a standard 1V p-p NTSC or PAL encoded standard definition CVBS video signal.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 2509
- Joined: Sat Aug 18, 2012 2:33 pm
Re: CM4 doubts
is the choice between composite/s-video/component done at the silicon level or the board schematic?6by9 wrote: ↑Wed Nov 11, 2020 7:23 amVDAC_COMP is just a more complete description of what signal is involved within the SoC.
Composite video is an analogue signal. Inside the SoC video is all digital. Hence there is a digital to analogue converter to convert between the two domains.
The video encoder block can produce composite, S-video, or component video out. It's in composite mode mode on the Pi, hence composite.
It's a standard 1V p-p NTSC or PAL encoded standard definition CVBS video signal.
getting svideo or component out sounds like a neat upgrade, for those who still want to remain in the analog world
Re: CM4 doubts
The encoder is connected to a single-channel DAC, so of the available options, only composite video makes sense.
Rockets are loud.
https://astro-pi.org
https://astro-pi.org
-
- Posts: 2509
- Joined: Sat Aug 18, 2012 2:33 pm
Re: CM4 doubts
ah, so it would need silicon changes to get more, and no point in asking for such a drastic change
if i wanted component that badly, it would be simpler to just get it out of the DPI port instead
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 10318
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: CM4 doubts
That must have changed - I'm sure VC2 dev boards had an S-Video jack on them. I haven't looked at the ball-out for the later chips.
The datasheet does still list registers for "Video output mode for chroma-luma-composite DACs", "Chroma DAC Disable", and "Luma DAC Disable", but those may be relics because it also includes the sentence "The VEC interfaces a single DAC, providing composite output"
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 2509
- Joined: Sat Aug 18, 2012 2:33 pm
Re: CM4 doubts
it could be that the digital ports still come out of the VEC, but the DAC is missing, so they go nowhere in the chip, but that likely also depends on how much "dead code" the chip synthesis software is deleting6by9 wrote: ↑Wed Nov 11, 2020 11:06 amThat must have changed - I'm sure VC2 dev boards had an S-Video jack on them. I haven't looked at the ball-out for the later chips.
The datasheet does still list registers for "Video output mode for chroma-luma-composite DACs", "Chroma DAC Disable", and "Luma DAC Disable", but those may be relics because it also includes the sentence "The VEC interfaces a single DAC, providing composite output"
and when you get to the config registers, its more fuzzy on if its "dead code" and will still persist, even with no effect