I am using the i.MX 6ULL Applications Processor, seems on this chip , we don't need to use the flexbus to communicate with the oled controller. and we can just configure LCD controller into 8080 to control the SSD1322 controller.
Here is my configuration:
1. Enable the pix-clock bit in CCM regiseter and reset the clock
2. Configure the LCD ctrl register
/* CTRL DATA SELECT CONFIG*/
/* CTRL READ_WRITE SELECT */
/* CTRL BYPASS COUNT SELECT */
/* CTRL BUSY PIN DISABLE*/
gsOledReg->CTRL = (LCDIF_CTRL_READ_WRITEB(0)) | (LCDIF_CTRL_BYPASS_COUNT(0))
|(LCDIF_CTRL_DATA_SELECT(0)) | (LCDIF_CTRL_LCD_DATABUS_WIDTH(0x1U))
|(LCDIF_CTRL_WORD_LENGTH(0x1U)) | (LCDIF_CTRL_MASTER(0x1U))
| (LCDIF_CTRL_RUN_MASK);
/* CTRL1 8080 MODE SELECT */
gsOledReg->CTRL1_CLR = LCDIF_CTRL1_MODE86_MASK;
/* LCD TIMING REGISTER CONFIG*/
gsOledReg->TIMING = LCDIF_TIMING_DATA_SETUP(0x1U) | LCDIF_TIMING_DATA_HOLD(0x1U)
| LCDIF_TIMING_CMD_SETUP(0x1U) | LCDIF_TIMING_CMD_HOLD(0x1U);
3. write data function:
However , could anyone check if it is correct?
And I am rather confusing about the description on reference manual. Do we need to set "run" bit and "master" bit in 8080 mode ? what about set the DATA_SHIFT_DIR and SHIFT_NUM_BITS ??