i2c driver on imx8q_evk board
Sebastian.Sumpf at genode-labs.com
Mon Feb 22 14:04:22 CET 2021
On 2/22/21 11:17 AM, Jean-Adrien Domage wrote:
> Dear Genodians,
> I am currently working on an i2c driver for the imx8q_evk board. I'm
> to generate any kind of signal(s) on the i2c bus.
> First I had a look at os/src/drivers/touch/synaptic_dsx. I tried to run
> the i2c implementation from this
> driver on the i2c bus 2. It hang at the first _busy() call in the
> _start() method, i2c.h l:83.
> Please note that I skip all gpio and Event related part to make it work.
> Settings I used for I2c bus 2 -> irq: 68 () mmio:0x303a0000 (),
> freq_div: 0x2a (64 for 400kHz)
> 1. Is this possible that this implementation is specific to the synaptic
> device? Then not working for others bus?
> 2. Reading , I noticed that _start() does not exactly follow this
> flowchart, is there any reason? Doing  is sufficient?
> 3. Do you have any other example of driver(s) using i2c like the
> touch/synaptic_dsx that may help me ?
>  IMX8MDQLQRM.pdf, chapter 7.1.2 A53 Interrupts, table 7-1 page 1023
>  IMX8MDQLQRM.pdf, chapter 2.1.5 AIPS Memory Maps, table 2-5 page 28
>  IMX8MDQLQRM.pdf, chapter 16.1 I2C Controller, Figure 16-7, page 6277
>  IMX8MDQLQRM.pdf, chapter 22.214.171.124 Initialization sequence, page 6270
This sounds like as if there is no device connected to the i2c bus. For
our implementation we connected the touchscreen to the MIPI DSI
connector. The i2c mmio region and the irq are board revision dependent,
since other pins are connected:
For revision B3, which is default on Genode:
mmio: 0x30a20000 irq: 67
for revision A1:
mmio: 0x30a40000 irq: 69
These settings can be configured in:
The bus you are using is connected to ov5640_mipi, which is the camera
mipi port. This kind of information you can find in the Linux device
tree (see link in http://genodians.org/ssumpf/2020-09-30-mipi_touch). So
if nothing is connected there, i2c will not work.
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users