MaK11-12
Posts: 17
Joined: Tue Aug 09, 2011 6:27 pm

I2S and DPI possible simultaneously?

Wed Mar 29, 2017 3:53 pm

Hi all,

Regarding the Compute Module 3, is it possible to use an I2S audio codec IC such as the PCM5102 on GPIO Bank 1 instead of Bank 0?
I was hoping to use all the pins of Bank 0 for 24 bit DPI functionality. Therefore, using I2S on Bank 1 would be great. I'm using the compute module datasheet here: http://docs-europe.electrocomponents.co ... 54fe3b.pdf
Also using additional pin information here: http://elinux.org/RPi_BCM2835_GPIOs

If I2S is not an option, I imagine using PWM audio output is the only other option?

Thanks in advance.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2070
Joined: Thu Jul 11, 2013 2:37 pm

Re: I2S and DPI possible simultaneously?

Wed Mar 29, 2017 4:29 pm

Yes. A bit of devicetree hackery is required, though.

For example the downstream DT for the compute module:
https://github.com/raspberrypi/linux/bl ... cm.dts#L34

Change the pins_i2s node definition to gpio 28-31 ALT2 instead of 18-21 ALT0 and build the kernel with "dtbs" specified as a build target. You may need to override the default devicetree (firmware knows it's running on a particular type of board, your custom board may require a custom DT) in config.txt.
Rockets are loud.
https://astro-pi.org

MaK11-12
Posts: 17
Joined: Tue Aug 09, 2011 6:27 pm

Re: I2S and DPI possible simultaneously?

Wed Mar 29, 2017 4:32 pm

jdb wrote:Yes. A bit of devicetree hackery is required, though.

For example the downstream DT for the compute module:
https://github.com/raspberrypi/linux/bl ... cm.dts#L34

Change the pins_i2s node definition to gpio 28-31 ALT2 instead of 18-21 ALT0 and build the kernel with "dtbs" specified as a build target. You may need to override the default devicetree (firmware knows it's running on a particular type of board, your custom board may require a custom DT) in config.txt.
That's fantastic! Thanks. :)

Edit: Ah, so it seems I2S uses the PCM_CLK, PCM_FS, PCM_DIN, and PCM_DOUT pins. :)

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2070
Joined: Thu Jul 11, 2013 2:37 pm

Re: I2S and DPI possible simultaneously?

Wed Mar 29, 2017 8:11 pm

This might actually be even easier:
https://github.com/raspberrypi/firmware ... EADME#L638

There's a canned overlay for swapping I2S to bank 1. Adding dtoverlay=i2s-gpio28-31 in config.txt should do it.
Rockets are loud.
https://astro-pi.org

Return to “Compute Module”