panel-orisetech-otm8009a.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) STMicroelectronics SA 2017
  4. *
  5. * Authors: Philippe Cornu <philippe.cornu@st.com>
  6. * Yannick Fertre <yannick.fertre@st.com>
  7. */
  8. #include <drm/drmP.h>
  9. #include <drm/drm_mipi_dsi.h>
  10. #include <drm/drm_panel.h>
  11. #include <linux/backlight.h>
  12. #include <linux/gpio/consumer.h>
  13. #include <linux/regulator/consumer.h>
  14. #include <video/mipi_display.h>
  15. #define OTM8009A_BACKLIGHT_DEFAULT 240
  16. #define OTM8009A_BACKLIGHT_MAX 255
  17. /* Manufacturer Command Set */
  18. #define MCS_ADRSFT 0x0000 /* Address Shift Function */
  19. #define MCS_PANSET 0xB3A6 /* Panel Type Setting */
  20. #define MCS_SD_CTRL 0xC0A2 /* Source Driver Timing Setting */
  21. #define MCS_P_DRV_M 0xC0B4 /* Panel Driving Mode */
  22. #define MCS_OSC_ADJ 0xC181 /* Oscillator Adjustment for Idle/Normal mode */
  23. #define MCS_RGB_VID_SET 0xC1A1 /* RGB Video Mode Setting */
  24. #define MCS_SD_PCH_CTRL 0xC480 /* Source Driver Precharge Control */
  25. #define MCS_NO_DOC1 0xC48A /* Command not documented */
  26. #define MCS_PWR_CTRL1 0xC580 /* Power Control Setting 1 */
  27. #define MCS_PWR_CTRL2 0xC590 /* Power Control Setting 2 for Normal Mode */
  28. #define MCS_PWR_CTRL4 0xC5B0 /* Power Control Setting 4 for DC Voltage */
  29. #define MCS_PANCTRLSET1 0xCB80 /* Panel Control Setting 1 */
  30. #define MCS_PANCTRLSET2 0xCB90 /* Panel Control Setting 2 */
  31. #define MCS_PANCTRLSET3 0xCBA0 /* Panel Control Setting 3 */
  32. #define MCS_PANCTRLSET4 0xCBB0 /* Panel Control Setting 4 */
  33. #define MCS_PANCTRLSET5 0xCBC0 /* Panel Control Setting 5 */
  34. #define MCS_PANCTRLSET6 0xCBD0 /* Panel Control Setting 6 */
  35. #define MCS_PANCTRLSET7 0xCBE0 /* Panel Control Setting 7 */
  36. #define MCS_PANCTRLSET8 0xCBF0 /* Panel Control Setting 8 */
  37. #define MCS_PANU2D1 0xCC80 /* Panel U2D Setting 1 */
  38. #define MCS_PANU2D2 0xCC90 /* Panel U2D Setting 2 */
  39. #define MCS_PANU2D3 0xCCA0 /* Panel U2D Setting 3 */
  40. #define MCS_PAND2U1 0xCCB0 /* Panel D2U Setting 1 */
  41. #define MCS_PAND2U2 0xCCC0 /* Panel D2U Setting 2 */
  42. #define MCS_PAND2U3 0xCCD0 /* Panel D2U Setting 3 */
  43. #define MCS_GOAVST 0xCE80 /* GOA VST Setting */
  44. #define MCS_GOACLKA1 0xCEA0 /* GOA CLKA1 Setting */
  45. #define MCS_GOACLKA3 0xCEB0 /* GOA CLKA3 Setting */
  46. #define MCS_GOAECLK 0xCFC0 /* GOA ECLK Setting */
  47. #define MCS_NO_DOC2 0xCFD0 /* Command not documented */
  48. #define MCS_GVDDSET 0xD800 /* GVDD/NGVDD */
  49. #define MCS_VCOMDC 0xD900 /* VCOM Voltage Setting */
  50. #define MCS_GMCT2_2P 0xE100 /* Gamma Correction 2.2+ Setting */
  51. #define MCS_GMCT2_2N 0xE200 /* Gamma Correction 2.2- Setting */
  52. #define MCS_NO_DOC3 0xF5B6 /* Command not documented */
  53. #define MCS_CMD2_ENA1 0xFF00 /* Enable Access Command2 "CMD2" */
  54. #define MCS_CMD2_ENA2 0xFF80 /* Enable Access Orise Command2 */
  55. struct otm8009a {
  56. struct device *dev;
  57. struct drm_panel panel;
  58. struct backlight_device *bl_dev;
  59. struct gpio_desc *reset_gpio;
  60. struct regulator *supply;
  61. bool prepared;
  62. bool enabled;
  63. };
  64. static const struct drm_display_mode default_mode = {
  65. .clock = 32729,
  66. .hdisplay = 480,
  67. .hsync_start = 480 + 120,
  68. .hsync_end = 480 + 120 + 63,
  69. .htotal = 480 + 120 + 63 + 120,
  70. .vdisplay = 800,
  71. .vsync_start = 800 + 12,
  72. .vsync_end = 800 + 12 + 12,
  73. .vtotal = 800 + 12 + 12 + 12,
  74. .vrefresh = 50,
  75. .flags = 0,
  76. .width_mm = 52,
  77. .height_mm = 86,
  78. };
  79. static inline struct otm8009a *panel_to_otm8009a(struct drm_panel *panel)
  80. {
  81. return container_of(panel, struct otm8009a, panel);
  82. }
  83. static void otm8009a_dcs_write_buf(struct otm8009a *ctx, const void *data,
  84. size_t len)
  85. {
  86. struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
  87. if (mipi_dsi_dcs_write_buffer(dsi, data, len) < 0)
  88. DRM_WARN("mipi dsi dcs write buffer failed\n");
  89. }
  90. static void otm8009a_dcs_write_buf_hs(struct otm8009a *ctx, const void *data,
  91. size_t len)
  92. {
  93. struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
  94. /* data will be sent in dsi hs mode (ie. no lpm) */
  95. dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
  96. otm8009a_dcs_write_buf(ctx, data, len);
  97. /* restore back the dsi lpm mode */
  98. dsi->mode_flags |= MIPI_DSI_MODE_LPM;
  99. }
  100. #define dcs_write_seq(ctx, seq...) \
  101. ({ \
  102. static const u8 d[] = { seq }; \
  103. otm8009a_dcs_write_buf(ctx, d, ARRAY_SIZE(d)); \
  104. })
  105. #define dcs_write_cmd_at(ctx, cmd, seq...) \
  106. ({ \
  107. dcs_write_seq(ctx, MCS_ADRSFT, (cmd) & 0xFF); \
  108. dcs_write_seq(ctx, (cmd) >> 8, seq); \
  109. })
  110. static int otm8009a_init_sequence(struct otm8009a *ctx)
  111. {
  112. struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
  113. int ret;
  114. /* Enter CMD2 */
  115. dcs_write_cmd_at(ctx, MCS_CMD2_ENA1, 0x80, 0x09, 0x01);
  116. /* Enter Orise Command2 */
  117. dcs_write_cmd_at(ctx, MCS_CMD2_ENA2, 0x80, 0x09);
  118. dcs_write_cmd_at(ctx, MCS_SD_PCH_CTRL, 0x30);
  119. mdelay(10);
  120. dcs_write_cmd_at(ctx, MCS_NO_DOC1, 0x40);
  121. mdelay(10);
  122. dcs_write_cmd_at(ctx, MCS_PWR_CTRL4 + 1, 0xA9);
  123. dcs_write_cmd_at(ctx, MCS_PWR_CTRL2 + 1, 0x34);
  124. dcs_write_cmd_at(ctx, MCS_P_DRV_M, 0x50);
  125. dcs_write_cmd_at(ctx, MCS_VCOMDC, 0x4E);
  126. dcs_write_cmd_at(ctx, MCS_OSC_ADJ, 0x66); /* 65Hz */
  127. dcs_write_cmd_at(ctx, MCS_PWR_CTRL2 + 2, 0x01);
  128. dcs_write_cmd_at(ctx, MCS_PWR_CTRL2 + 5, 0x34);
  129. dcs_write_cmd_at(ctx, MCS_PWR_CTRL2 + 4, 0x33);
  130. dcs_write_cmd_at(ctx, MCS_GVDDSET, 0x79, 0x79);
  131. dcs_write_cmd_at(ctx, MCS_SD_CTRL + 1, 0x1B);
  132. dcs_write_cmd_at(ctx, MCS_PWR_CTRL1 + 2, 0x83);
  133. dcs_write_cmd_at(ctx, MCS_SD_PCH_CTRL + 1, 0x83);
  134. dcs_write_cmd_at(ctx, MCS_RGB_VID_SET, 0x0E);
  135. dcs_write_cmd_at(ctx, MCS_PANSET, 0x00, 0x01);
  136. dcs_write_cmd_at(ctx, MCS_GOAVST, 0x85, 0x01, 0x00, 0x84, 0x01, 0x00);
  137. dcs_write_cmd_at(ctx, MCS_GOACLKA1, 0x18, 0x04, 0x03, 0x39, 0x00, 0x00,
  138. 0x00, 0x18, 0x03, 0x03, 0x3A, 0x00, 0x00, 0x00);
  139. dcs_write_cmd_at(ctx, MCS_GOACLKA3, 0x18, 0x02, 0x03, 0x3B, 0x00, 0x00,
  140. 0x00, 0x18, 0x01, 0x03, 0x3C, 0x00, 0x00, 0x00);
  141. dcs_write_cmd_at(ctx, MCS_GOAECLK, 0x01, 0x01, 0x20, 0x20, 0x00, 0x00,
  142. 0x01, 0x02, 0x00, 0x00);
  143. dcs_write_cmd_at(ctx, MCS_NO_DOC2, 0x00);
  144. dcs_write_cmd_at(ctx, MCS_PANCTRLSET1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  145. dcs_write_cmd_at(ctx, MCS_PANCTRLSET2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  146. 0, 0, 0, 0, 0);
  147. dcs_write_cmd_at(ctx, MCS_PANCTRLSET3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  148. 0, 0, 0, 0, 0);
  149. dcs_write_cmd_at(ctx, MCS_PANCTRLSET4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  150. dcs_write_cmd_at(ctx, MCS_PANCTRLSET5, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0,
  151. 0, 0, 0, 0, 0);
  152. dcs_write_cmd_at(ctx, MCS_PANCTRLSET6, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4,
  153. 4, 0, 0, 0, 0);
  154. dcs_write_cmd_at(ctx, MCS_PANCTRLSET7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  155. dcs_write_cmd_at(ctx, MCS_PANCTRLSET8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  156. 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
  157. dcs_write_cmd_at(ctx, MCS_PANU2D1, 0x00, 0x26, 0x09, 0x0B, 0x01, 0x25,
  158. 0x00, 0x00, 0x00, 0x00);
  159. dcs_write_cmd_at(ctx, MCS_PANU2D2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  160. 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0A, 0x0C, 0x02);
  161. dcs_write_cmd_at(ctx, MCS_PANU2D3, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00,
  162. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
  163. dcs_write_cmd_at(ctx, MCS_PAND2U1, 0x00, 0x25, 0x0C, 0x0A, 0x02, 0x26,
  164. 0x00, 0x00, 0x00, 0x00);
  165. dcs_write_cmd_at(ctx, MCS_PAND2U2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  166. 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x0B, 0x09, 0x01);
  167. dcs_write_cmd_at(ctx, MCS_PAND2U3, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00,
  168. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
  169. dcs_write_cmd_at(ctx, MCS_PWR_CTRL1 + 1, 0x66);
  170. dcs_write_cmd_at(ctx, MCS_NO_DOC3, 0x06);
  171. dcs_write_cmd_at(ctx, MCS_GMCT2_2P, 0x00, 0x09, 0x0F, 0x0E, 0x07, 0x10,
  172. 0x0B, 0x0A, 0x04, 0x07, 0x0B, 0x08, 0x0F, 0x10, 0x0A,
  173. 0x01);
  174. dcs_write_cmd_at(ctx, MCS_GMCT2_2N, 0x00, 0x09, 0x0F, 0x0E, 0x07, 0x10,
  175. 0x0B, 0x0A, 0x04, 0x07, 0x0B, 0x08, 0x0F, 0x10, 0x0A,
  176. 0x01);
  177. /* Exit CMD2 */
  178. dcs_write_cmd_at(ctx, MCS_CMD2_ENA1, 0xFF, 0xFF, 0xFF);
  179. ret = mipi_dsi_dcs_nop(dsi);
  180. if (ret)
  181. return ret;
  182. ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
  183. if (ret)
  184. return ret;
  185. /* Wait for sleep out exit */
  186. mdelay(120);
  187. /* Default portrait 480x800 rgb24 */
  188. dcs_write_seq(ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x00);
  189. ret = mipi_dsi_dcs_set_column_address(dsi, 0,
  190. default_mode.hdisplay - 1);
  191. if (ret)
  192. return ret;
  193. ret = mipi_dsi_dcs_set_page_address(dsi, 0, default_mode.vdisplay - 1);
  194. if (ret)
  195. return ret;
  196. /* See otm8009a driver documentation for pixel format descriptions */
  197. ret = mipi_dsi_dcs_set_pixel_format(dsi, MIPI_DCS_PIXEL_FMT_24BIT |
  198. MIPI_DCS_PIXEL_FMT_24BIT << 4);
  199. if (ret)
  200. return ret;
  201. /* Disable CABC feature */
  202. dcs_write_seq(ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
  203. ret = mipi_dsi_dcs_set_display_on(dsi);
  204. if (ret)
  205. return ret;
  206. ret = mipi_dsi_dcs_nop(dsi);
  207. if (ret)
  208. return ret;
  209. /* Send Command GRAM memory write (no parameters) */
  210. dcs_write_seq(ctx, MIPI_DCS_WRITE_MEMORY_START);
  211. return 0;
  212. }
  213. static int otm8009a_disable(struct drm_panel *panel)
  214. {
  215. struct otm8009a *ctx = panel_to_otm8009a(panel);
  216. struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
  217. int ret;
  218. if (!ctx->enabled)
  219. return 0; /* This is not an issue so we return 0 here */
  220. backlight_disable(ctx->bl_dev);
  221. ret = mipi_dsi_dcs_set_display_off(dsi);
  222. if (ret)
  223. return ret;
  224. ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
  225. if (ret)
  226. return ret;
  227. msleep(120);
  228. ctx->enabled = false;
  229. return 0;
  230. }
  231. static int otm8009a_unprepare(struct drm_panel *panel)
  232. {
  233. struct otm8009a *ctx = panel_to_otm8009a(panel);
  234. if (!ctx->prepared)
  235. return 0;
  236. if (ctx->reset_gpio) {
  237. gpiod_set_value_cansleep(ctx->reset_gpio, 1);
  238. msleep(20);
  239. }
  240. regulator_disable(ctx->supply);
  241. ctx->prepared = false;
  242. return 0;
  243. }
  244. static int otm8009a_prepare(struct drm_panel *panel)
  245. {
  246. struct otm8009a *ctx = panel_to_otm8009a(panel);
  247. int ret;
  248. if (ctx->prepared)
  249. return 0;
  250. ret = regulator_enable(ctx->supply);
  251. if (ret < 0) {
  252. DRM_ERROR("failed to enable supply: %d\n", ret);
  253. return ret;
  254. }
  255. if (ctx->reset_gpio) {
  256. gpiod_set_value_cansleep(ctx->reset_gpio, 0);
  257. gpiod_set_value_cansleep(ctx->reset_gpio, 1);
  258. msleep(20);
  259. gpiod_set_value_cansleep(ctx->reset_gpio, 0);
  260. msleep(100);
  261. }
  262. ret = otm8009a_init_sequence(ctx);
  263. if (ret)
  264. return ret;
  265. ctx->prepared = true;
  266. return 0;
  267. }
  268. static int otm8009a_enable(struct drm_panel *panel)
  269. {
  270. struct otm8009a *ctx = panel_to_otm8009a(panel);
  271. if (ctx->enabled)
  272. return 0;
  273. backlight_enable(ctx->bl_dev);
  274. ctx->enabled = true;
  275. return 0;
  276. }
  277. static int otm8009a_get_modes(struct drm_panel *panel)
  278. {
  279. struct drm_display_mode *mode;
  280. mode = drm_mode_duplicate(panel->drm, &default_mode);
  281. if (!mode) {
  282. DRM_ERROR("failed to add mode %ux%ux@%u\n",
  283. default_mode.hdisplay, default_mode.vdisplay,
  284. default_mode.vrefresh);
  285. return -ENOMEM;
  286. }
  287. drm_mode_set_name(mode);
  288. mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
  289. drm_mode_probed_add(panel->connector, mode);
  290. panel->connector->display_info.width_mm = mode->width_mm;
  291. panel->connector->display_info.height_mm = mode->height_mm;
  292. return 1;
  293. }
  294. static const struct drm_panel_funcs otm8009a_drm_funcs = {
  295. .disable = otm8009a_disable,
  296. .unprepare = otm8009a_unprepare,
  297. .prepare = otm8009a_prepare,
  298. .enable = otm8009a_enable,
  299. .get_modes = otm8009a_get_modes,
  300. };
  301. /*
  302. * DSI-BASED BACKLIGHT
  303. */
  304. static int otm8009a_backlight_update_status(struct backlight_device *bd)
  305. {
  306. struct otm8009a *ctx = bl_get_data(bd);
  307. u8 data[2];
  308. if (!ctx->prepared) {
  309. DRM_DEBUG("lcd not ready yet for setting its backlight!\n");
  310. return -ENXIO;
  311. }
  312. if (bd->props.power <= FB_BLANK_NORMAL) {
  313. /* Power on the backlight with the requested brightness
  314. * Note We can not use mipi_dsi_dcs_set_display_brightness()
  315. * as otm8009a driver support only 8-bit brightness (1 param).
  316. */
  317. data[0] = MIPI_DCS_SET_DISPLAY_BRIGHTNESS;
  318. data[1] = bd->props.brightness;
  319. otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
  320. /* set Brightness Control & Backlight on */
  321. data[1] = 0x24;
  322. } else {
  323. /* Power off the backlight: set Brightness Control & Bl off */
  324. data[1] = 0;
  325. }
  326. /* Update Brightness Control & Backlight */
  327. data[0] = MIPI_DCS_WRITE_CONTROL_DISPLAY;
  328. otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
  329. return 0;
  330. }
  331. static const struct backlight_ops otm8009a_backlight_ops = {
  332. .update_status = otm8009a_backlight_update_status,
  333. };
  334. static int otm8009a_probe(struct mipi_dsi_device *dsi)
  335. {
  336. struct device *dev = &dsi->dev;
  337. struct otm8009a *ctx;
  338. int ret;
  339. ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
  340. if (!ctx)
  341. return -ENOMEM;
  342. ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
  343. if (IS_ERR(ctx->reset_gpio)) {
  344. dev_err(dev, "cannot get reset-gpio\n");
  345. return PTR_ERR(ctx->reset_gpio);
  346. }
  347. ctx->supply = devm_regulator_get(dev, "power");
  348. if (IS_ERR(ctx->supply)) {
  349. ret = PTR_ERR(ctx->supply);
  350. dev_err(dev, "failed to request regulator: %d\n", ret);
  351. return ret;
  352. }
  353. mipi_dsi_set_drvdata(dsi, ctx);
  354. ctx->dev = dev;
  355. dsi->lanes = 2;
  356. dsi->format = MIPI_DSI_FMT_RGB888;
  357. dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
  358. MIPI_DSI_MODE_LPM;
  359. drm_panel_init(&ctx->panel);
  360. ctx->panel.dev = dev;
  361. ctx->panel.funcs = &otm8009a_drm_funcs;
  362. ctx->bl_dev = devm_backlight_device_register(dev, dev_name(dev),
  363. dsi->host->dev, ctx,
  364. &otm8009a_backlight_ops,
  365. NULL);
  366. if (IS_ERR(ctx->bl_dev)) {
  367. ret = PTR_ERR(ctx->bl_dev);
  368. dev_err(dev, "failed to register backlight: %d\n", ret);
  369. return ret;
  370. }
  371. ctx->bl_dev->props.max_brightness = OTM8009A_BACKLIGHT_MAX;
  372. ctx->bl_dev->props.brightness = OTM8009A_BACKLIGHT_DEFAULT;
  373. ctx->bl_dev->props.power = FB_BLANK_POWERDOWN;
  374. ctx->bl_dev->props.type = BACKLIGHT_RAW;
  375. drm_panel_add(&ctx->panel);
  376. ret = mipi_dsi_attach(dsi);
  377. if (ret < 0) {
  378. dev_err(dev, "mipi_dsi_attach failed. Is host ready?\n");
  379. drm_panel_remove(&ctx->panel);
  380. backlight_device_unregister(ctx->bl_dev);
  381. return ret;
  382. }
  383. return 0;
  384. }
  385. static int otm8009a_remove(struct mipi_dsi_device *dsi)
  386. {
  387. struct otm8009a *ctx = mipi_dsi_get_drvdata(dsi);
  388. mipi_dsi_detach(dsi);
  389. drm_panel_remove(&ctx->panel);
  390. return 0;
  391. }
  392. static const struct of_device_id orisetech_otm8009a_of_match[] = {
  393. { .compatible = "orisetech,otm8009a" },
  394. { }
  395. };
  396. MODULE_DEVICE_TABLE(of, orisetech_otm8009a_of_match);
  397. static struct mipi_dsi_driver orisetech_otm8009a_driver = {
  398. .probe = otm8009a_probe,
  399. .remove = otm8009a_remove,
  400. .driver = {
  401. .name = "panel-orisetech-otm8009a",
  402. .of_match_table = orisetech_otm8009a_of_match,
  403. },
  404. };
  405. module_mipi_dsi_driver(orisetech_otm8009a_driver);
  406. MODULE_AUTHOR("Philippe Cornu <philippe.cornu@st.com>");
  407. MODULE_AUTHOR("Yannick Fertre <yannick.fertre@st.com>");
  408. MODULE_DESCRIPTION("DRM driver for Orise Tech OTM8009A MIPI DSI panel");
  409. MODULE_LICENSE("GPL v2");