notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.86k stars 494 forks source link

Support register params with DC=0 (e.g. SSD1306, SSD1225) #477

Closed StefanBruens closed 3 years ago

StefanBruens commented 7 years ago

Unfortunately SSD devices use two different concepts for register params:

e.g SSD1351:

e.g. SSD1306, SSD1225:

Currently fbtft_write_reg8_bus9 and fbtft_write_reg8_bus8 assume register params use DC=1.

notro commented 7 years ago

The work around for that is to pass regnr and value separately:

    /* Set Display Clock Divide Ratio/ Oscillator Frequency */
    write_reg(par, 0xD5);
    write_reg(par, 0x80);

fbtft_device:

modprobe fbtft_device ... init=-1,0xd5,-1,0x80,...
StefanBruens commented 7 years ago

Unfortunately the multiple write_reg fails in combination with 9 bit emulation. Each write_reg results in an independent 5 byte transfer (should be 9, but you corrected that in tinydrm), and the padding is interpreted as value.

The init sequence might actually work, will evaluate this.

Would you accept a patch to tinydrm with an additional "quirk" transfer mode, e.g mipi_dbi_typec1_command_no_dc ?

notro commented 7 years ago

Would you accept a patch to tinydrm with an additional "quirk" transfer mode, e.g mipi_dbi_typec1_command_no_dc ?

No, because then it's not MIPI DBI anymore. Better add a new driver for the controller in question with the necessary protocol functions.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.