Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: staging: max96712: Add support for MAX96724

The MAX96724 is almost identical to the MAX96712 and can be supported by
the same driver, add support for it.

For the staging driver which only supports patter generation the big
difference is that the datasheet (rev 4) for MAX96724 do not describe
the DEBUG_EXTRA register, which is at offset 0x0009 on MAX96712. It's
not clear if this register is removed or moved to a different offset.
What is known is writing to register 0x0009 have no effect on MAX96724.

This makes it impossible to increase the test pattern clock frequency
from 25 MHz to 75Mhz on MAX96724. To be able to get a stable test
pattern the DPLL frequency have to be increase instead to compensate for
this. The frequency selected is found by experimentation as the MAX96724
datasheet is much sparser then what's available for MAX96712.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Niklas Söderlund and committed by
Mauro Carvalho Chehab
6c872b78 9350219a

+10 -2
+10 -2
drivers/staging/media/max96712/max96712.c
··· 27 27 28 28 struct max96712_info { 29 29 unsigned int dpllfreq; 30 + bool have_debug_extra; 30 31 }; 31 32 32 33 struct max96712_priv { ··· 174 173 return; 175 174 } 176 175 177 - /* PCLK 75MHz. */ 178 - max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); 176 + /* Set PCLK to 75MHz if device have DEBUG_EXTRA register. */ 177 + if (priv->info->have_debug_extra) 178 + max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); 179 179 180 180 /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */ 181 181 max96712_write_bulk_value(priv, 0x1052, 0, 3); ··· 457 455 458 456 static const struct max96712_info max96712_info_max96712 = { 459 457 .dpllfreq = 1000, 458 + .have_debug_extra = true, 459 + }; 460 + 461 + static const struct max96712_info max96712_info_max96724 = { 462 + .dpllfreq = 1200, 460 463 }; 461 464 462 465 static const struct of_device_id max96712_of_table[] = { 463 466 { .compatible = "maxim,max96712", .data = &max96712_info_max96712 }, 467 + { .compatible = "maxim,max96724", .data = &max96712_info_max96724 }, 464 468 { /* sentinel */ } 465 469 }; 466 470 MODULE_DEVICE_TABLE(of, max96712_of_table);