panel-sitronix-st7789v.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. /*
  2. * Copyright (C) 2017 Free Electrons
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License version
  6. * 2 as published by the Free Software Foundation.
  7. */
  8. #include <linux/gpio/consumer.h>
  9. #include <linux/regulator/consumer.h>
  10. #include <linux/spi/spi.h>
  11. #include <drm/drmP.h>
  12. #include <drm/drm_panel.h>
  13. #include <video/mipi_display.h>
  14. #define ST7789V_COLMOD_RGB_FMT_18BITS (6 << 4)
  15. #define ST7789V_COLMOD_CTRL_FMT_18BITS (6 << 0)
  16. #define ST7789V_RAMCTRL_CMD 0xb0
  17. #define ST7789V_RAMCTRL_RM_RGB BIT(4)
  18. #define ST7789V_RAMCTRL_DM_RGB BIT(0)
  19. #define ST7789V_RAMCTRL_MAGIC (3 << 6)
  20. #define ST7789V_RAMCTRL_EPF(n) (((n) & 3) << 4)
  21. #define ST7789V_RGBCTRL_CMD 0xb1
  22. #define ST7789V_RGBCTRL_WO BIT(7)
  23. #define ST7789V_RGBCTRL_RCM(n) (((n) & 3) << 5)
  24. #define ST7789V_RGBCTRL_VSYNC_HIGH BIT(3)
  25. #define ST7789V_RGBCTRL_HSYNC_HIGH BIT(2)
  26. #define ST7789V_RGBCTRL_PCLK_HIGH BIT(1)
  27. #define ST7789V_RGBCTRL_VBP(n) ((n) & 0x7f)
  28. #define ST7789V_RGBCTRL_HBP(n) ((n) & 0x1f)
  29. #define ST7789V_PORCTRL_CMD 0xb2
  30. #define ST7789V_PORCTRL_IDLE_BP(n) (((n) & 0xf) << 4)
  31. #define ST7789V_PORCTRL_IDLE_FP(n) ((n) & 0xf)
  32. #define ST7789V_PORCTRL_PARTIAL_BP(n) (((n) & 0xf) << 4)
  33. #define ST7789V_PORCTRL_PARTIAL_FP(n) ((n) & 0xf)
  34. #define ST7789V_GCTRL_CMD 0xb7
  35. #define ST7789V_GCTRL_VGHS(n) (((n) & 7) << 4)
  36. #define ST7789V_GCTRL_VGLS(n) ((n) & 7)
  37. #define ST7789V_VCOMS_CMD 0xbb
  38. #define ST7789V_LCMCTRL_CMD 0xc0
  39. #define ST7789V_LCMCTRL_XBGR BIT(5)
  40. #define ST7789V_LCMCTRL_XMX BIT(3)
  41. #define ST7789V_LCMCTRL_XMH BIT(2)
  42. #define ST7789V_VDVVRHEN_CMD 0xc2
  43. #define ST7789V_VDVVRHEN_CMDEN BIT(0)
  44. #define ST7789V_VRHS_CMD 0xc3
  45. #define ST7789V_VDVS_CMD 0xc4
  46. #define ST7789V_FRCTRL2_CMD 0xc6
  47. #define ST7789V_PWCTRL1_CMD 0xd0
  48. #define ST7789V_PWCTRL1_MAGIC 0xa4
  49. #define ST7789V_PWCTRL1_AVDD(n) (((n) & 3) << 6)
  50. #define ST7789V_PWCTRL1_AVCL(n) (((n) & 3) << 4)
  51. #define ST7789V_PWCTRL1_VDS(n) ((n) & 3)
  52. #define ST7789V_PVGAMCTRL_CMD 0xe0
  53. #define ST7789V_PVGAMCTRL_JP0(n) (((n) & 3) << 4)
  54. #define ST7789V_PVGAMCTRL_JP1(n) (((n) & 3) << 4)
  55. #define ST7789V_PVGAMCTRL_VP0(n) ((n) & 0xf)
  56. #define ST7789V_PVGAMCTRL_VP1(n) ((n) & 0x3f)
  57. #define ST7789V_PVGAMCTRL_VP2(n) ((n) & 0x3f)
  58. #define ST7789V_PVGAMCTRL_VP4(n) ((n) & 0x1f)
  59. #define ST7789V_PVGAMCTRL_VP6(n) ((n) & 0x1f)
  60. #define ST7789V_PVGAMCTRL_VP13(n) ((n) & 0xf)
  61. #define ST7789V_PVGAMCTRL_VP20(n) ((n) & 0x7f)
  62. #define ST7789V_PVGAMCTRL_VP27(n) ((n) & 7)
  63. #define ST7789V_PVGAMCTRL_VP36(n) (((n) & 7) << 4)
  64. #define ST7789V_PVGAMCTRL_VP43(n) ((n) & 0x7f)
  65. #define ST7789V_PVGAMCTRL_VP50(n) ((n) & 0xf)
  66. #define ST7789V_PVGAMCTRL_VP57(n) ((n) & 0x1f)
  67. #define ST7789V_PVGAMCTRL_VP59(n) ((n) & 0x1f)
  68. #define ST7789V_PVGAMCTRL_VP61(n) ((n) & 0x3f)
  69. #define ST7789V_PVGAMCTRL_VP62(n) ((n) & 0x3f)
  70. #define ST7789V_PVGAMCTRL_VP63(n) (((n) & 0xf) << 4)
  71. #define ST7789V_NVGAMCTRL_CMD 0xe1
  72. #define ST7789V_NVGAMCTRL_JN0(n) (((n) & 3) << 4)
  73. #define ST7789V_NVGAMCTRL_JN1(n) (((n) & 3) << 4)
  74. #define ST7789V_NVGAMCTRL_VN0(n) ((n) & 0xf)
  75. #define ST7789V_NVGAMCTRL_VN1(n) ((n) & 0x3f)
  76. #define ST7789V_NVGAMCTRL_VN2(n) ((n) & 0x3f)
  77. #define ST7789V_NVGAMCTRL_VN4(n) ((n) & 0x1f)
  78. #define ST7789V_NVGAMCTRL_VN6(n) ((n) & 0x1f)
  79. #define ST7789V_NVGAMCTRL_VN13(n) ((n) & 0xf)
  80. #define ST7789V_NVGAMCTRL_VN20(n) ((n) & 0x7f)
  81. #define ST7789V_NVGAMCTRL_VN27(n) ((n) & 7)
  82. #define ST7789V_NVGAMCTRL_VN36(n) (((n) & 7) << 4)
  83. #define ST7789V_NVGAMCTRL_VN43(n) ((n) & 0x7f)
  84. #define ST7789V_NVGAMCTRL_VN50(n) ((n) & 0xf)
  85. #define ST7789V_NVGAMCTRL_VN57(n) ((n) & 0x1f)
  86. #define ST7789V_NVGAMCTRL_VN59(n) ((n) & 0x1f)
  87. #define ST7789V_NVGAMCTRL_VN61(n) ((n) & 0x3f)
  88. #define ST7789V_NVGAMCTRL_VN62(n) ((n) & 0x3f)
  89. #define ST7789V_NVGAMCTRL_VN63(n) (((n) & 0xf) << 4)
  90. #define ST7789V_TEST(val, func) \
  91. do { \
  92. if ((val = (func))) \
  93. return val; \
  94. } while (0)
  95. struct st7789v {
  96. struct drm_panel panel;
  97. struct spi_device *spi;
  98. struct gpio_desc *reset;
  99. struct backlight_device *backlight;
  100. struct regulator *power;
  101. };
  102. enum st7789v_prefix {
  103. ST7789V_COMMAND = 0,
  104. ST7789V_DATA = 1,
  105. };
  106. static inline struct st7789v *panel_to_st7789v(struct drm_panel *panel)
  107. {
  108. return container_of(panel, struct st7789v, panel);
  109. }
  110. static int st7789v_spi_write(struct st7789v *ctx, enum st7789v_prefix prefix,
  111. u8 data)
  112. {
  113. struct spi_transfer xfer = { };
  114. struct spi_message msg;
  115. u16 txbuf = ((prefix & 1) << 8) | data;
  116. spi_message_init(&msg);
  117. xfer.tx_buf = &txbuf;
  118. xfer.bits_per_word = 9;
  119. xfer.len = sizeof(txbuf);
  120. spi_message_add_tail(&xfer, &msg);
  121. return spi_sync(ctx->spi, &msg);
  122. }
  123. static int st7789v_write_command(struct st7789v *ctx, u8 cmd)
  124. {
  125. return st7789v_spi_write(ctx, ST7789V_COMMAND, cmd);
  126. }
  127. static int st7789v_write_data(struct st7789v *ctx, u8 cmd)
  128. {
  129. return st7789v_spi_write(ctx, ST7789V_DATA, cmd);
  130. }
  131. static const struct drm_display_mode default_mode = {
  132. .clock = 7000,
  133. .hdisplay = 240,
  134. .hsync_start = 240 + 38,
  135. .hsync_end = 240 + 38 + 10,
  136. .htotal = 240 + 38 + 10 + 10,
  137. .vdisplay = 320,
  138. .vsync_start = 320 + 8,
  139. .vsync_end = 320 + 8 + 4,
  140. .vtotal = 320 + 8 + 4 + 4,
  141. .vrefresh = 60,
  142. };
  143. static int st7789v_get_modes(struct drm_panel *panel)
  144. {
  145. struct drm_connector *connector = panel->connector;
  146. struct drm_display_mode *mode;
  147. mode = drm_mode_duplicate(panel->drm, &default_mode);
  148. if (!mode) {
  149. dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
  150. default_mode.hdisplay, default_mode.vdisplay,
  151. default_mode.vrefresh);
  152. return -ENOMEM;
  153. }
  154. drm_mode_set_name(mode);
  155. mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
  156. drm_mode_probed_add(connector, mode);
  157. panel->connector->display_info.width_mm = 61;
  158. panel->connector->display_info.height_mm = 103;
  159. return 1;
  160. }
  161. static int st7789v_prepare(struct drm_panel *panel)
  162. {
  163. struct st7789v *ctx = panel_to_st7789v(panel);
  164. int ret;
  165. ret = regulator_enable(ctx->power);
  166. if (ret)
  167. return ret;
  168. gpiod_set_value(ctx->reset, 1);
  169. msleep(30);
  170. gpiod_set_value(ctx->reset, 0);
  171. msleep(120);
  172. ST7789V_TEST(ret, st7789v_write_command(ctx, MIPI_DCS_EXIT_SLEEP_MODE));
  173. /* We need to wait 120ms after a sleep out command */
  174. msleep(120);
  175. ST7789V_TEST(ret, st7789v_write_command(ctx,
  176. MIPI_DCS_SET_ADDRESS_MODE));
  177. ST7789V_TEST(ret, st7789v_write_data(ctx, 0));
  178. ST7789V_TEST(ret, st7789v_write_command(ctx,
  179. MIPI_DCS_SET_PIXEL_FORMAT));
  180. ST7789V_TEST(ret, st7789v_write_data(ctx,
  181. (MIPI_DCS_PIXEL_FMT_18BIT << 4) |
  182. (MIPI_DCS_PIXEL_FMT_18BIT)));
  183. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_PORCTRL_CMD));
  184. ST7789V_TEST(ret, st7789v_write_data(ctx, 0xc));
  185. ST7789V_TEST(ret, st7789v_write_data(ctx, 0xc));
  186. ST7789V_TEST(ret, st7789v_write_data(ctx, 0));
  187. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PORCTRL_IDLE_BP(3) |
  188. ST7789V_PORCTRL_IDLE_FP(3)));
  189. ST7789V_TEST(ret, st7789v_write_data(ctx,
  190. ST7789V_PORCTRL_PARTIAL_BP(3) |
  191. ST7789V_PORCTRL_PARTIAL_FP(3)));
  192. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_GCTRL_CMD));
  193. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_GCTRL_VGLS(5) |
  194. ST7789V_GCTRL_VGHS(3)));
  195. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_VCOMS_CMD));
  196. ST7789V_TEST(ret, st7789v_write_data(ctx, 0x2b));
  197. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_LCMCTRL_CMD));
  198. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_LCMCTRL_XMH |
  199. ST7789V_LCMCTRL_XMX |
  200. ST7789V_LCMCTRL_XBGR));
  201. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_VDVVRHEN_CMD));
  202. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_VDVVRHEN_CMDEN));
  203. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_VRHS_CMD));
  204. ST7789V_TEST(ret, st7789v_write_data(ctx, 0xf));
  205. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_VDVS_CMD));
  206. ST7789V_TEST(ret, st7789v_write_data(ctx, 0x20));
  207. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_FRCTRL2_CMD));
  208. ST7789V_TEST(ret, st7789v_write_data(ctx, 0xf));
  209. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_PWCTRL1_CMD));
  210. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PWCTRL1_MAGIC));
  211. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PWCTRL1_AVDD(2) |
  212. ST7789V_PWCTRL1_AVCL(2) |
  213. ST7789V_PWCTRL1_VDS(1)));
  214. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_PVGAMCTRL_CMD));
  215. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP63(0xd)));
  216. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP1(0xca)));
  217. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP2(0xe)));
  218. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP4(8)));
  219. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP6(9)));
  220. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP13(7)));
  221. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP20(0x2d)));
  222. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP27(0xb) |
  223. ST7789V_PVGAMCTRL_VP36(3)));
  224. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP43(0x3d)));
  225. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_JP1(3) |
  226. ST7789V_PVGAMCTRL_VP50(4)));
  227. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP57(0xa)));
  228. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP59(0xa)));
  229. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP61(0x1b)));
  230. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_PVGAMCTRL_VP62(0x28)));
  231. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_NVGAMCTRL_CMD));
  232. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN63(0xd)));
  233. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN1(0xca)));
  234. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN2(0xf)));
  235. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN4(8)));
  236. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN6(8)));
  237. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN13(7)));
  238. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN20(0x2e)));
  239. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN27(0xc) |
  240. ST7789V_NVGAMCTRL_VN36(5)));
  241. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN43(0x40)));
  242. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_JN1(3) |
  243. ST7789V_NVGAMCTRL_VN50(4)));
  244. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN57(9)));
  245. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN59(0xb)));
  246. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN61(0x1b)));
  247. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN62(0x28)));
  248. ST7789V_TEST(ret, st7789v_write_command(ctx, MIPI_DCS_ENTER_INVERT_MODE));
  249. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_RAMCTRL_CMD));
  250. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RAMCTRL_DM_RGB |
  251. ST7789V_RAMCTRL_RM_RGB));
  252. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RAMCTRL_EPF(3) |
  253. ST7789V_RAMCTRL_MAGIC));
  254. ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_RGBCTRL_CMD));
  255. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RGBCTRL_WO |
  256. ST7789V_RGBCTRL_RCM(2) |
  257. ST7789V_RGBCTRL_VSYNC_HIGH |
  258. ST7789V_RGBCTRL_HSYNC_HIGH |
  259. ST7789V_RGBCTRL_PCLK_HIGH));
  260. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RGBCTRL_VBP(8)));
  261. ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RGBCTRL_HBP(20)));
  262. return 0;
  263. }
  264. static int st7789v_enable(struct drm_panel *panel)
  265. {
  266. struct st7789v *ctx = panel_to_st7789v(panel);
  267. if (ctx->backlight) {
  268. ctx->backlight->props.state &= ~BL_CORE_FBBLANK;
  269. ctx->backlight->props.power = FB_BLANK_UNBLANK;
  270. backlight_update_status(ctx->backlight);
  271. }
  272. return st7789v_write_command(ctx, MIPI_DCS_SET_DISPLAY_ON);
  273. }
  274. static int st7789v_disable(struct drm_panel *panel)
  275. {
  276. struct st7789v *ctx = panel_to_st7789v(panel);
  277. int ret;
  278. ST7789V_TEST(ret, st7789v_write_command(ctx, MIPI_DCS_SET_DISPLAY_OFF));
  279. if (ctx->backlight) {
  280. ctx->backlight->props.power = FB_BLANK_POWERDOWN;
  281. ctx->backlight->props.state |= BL_CORE_FBBLANK;
  282. backlight_update_status(ctx->backlight);
  283. }
  284. return 0;
  285. }
  286. static int st7789v_unprepare(struct drm_panel *panel)
  287. {
  288. struct st7789v *ctx = panel_to_st7789v(panel);
  289. int ret;
  290. ST7789V_TEST(ret, st7789v_write_command(ctx, MIPI_DCS_ENTER_SLEEP_MODE));
  291. regulator_disable(ctx->power);
  292. return 0;
  293. }
  294. static const struct drm_panel_funcs st7789v_drm_funcs = {
  295. .disable = st7789v_disable,
  296. .enable = st7789v_enable,
  297. .get_modes = st7789v_get_modes,
  298. .prepare = st7789v_prepare,
  299. .unprepare = st7789v_unprepare,
  300. };
  301. static int st7789v_probe(struct spi_device *spi)
  302. {
  303. struct device_node *backlight;
  304. struct st7789v *ctx;
  305. int ret;
  306. ctx = devm_kzalloc(&spi->dev, sizeof(*ctx), GFP_KERNEL);
  307. if (!ctx)
  308. return -ENOMEM;
  309. spi_set_drvdata(spi, ctx);
  310. ctx->spi = spi;
  311. ctx->panel.dev = &spi->dev;
  312. ctx->panel.funcs = &st7789v_drm_funcs;
  313. ctx->power = devm_regulator_get(&spi->dev, "power");
  314. if (IS_ERR(ctx->power))
  315. return PTR_ERR(ctx->power);
  316. ctx->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW);
  317. if (IS_ERR(ctx->reset)) {
  318. dev_err(&spi->dev, "Couldn't get our reset line\n");
  319. return PTR_ERR(ctx->reset);
  320. }
  321. backlight = of_parse_phandle(spi->dev.of_node, "backlight", 0);
  322. if (backlight) {
  323. ctx->backlight = of_find_backlight_by_node(backlight);
  324. of_node_put(backlight);
  325. if (!ctx->backlight)
  326. return -EPROBE_DEFER;
  327. }
  328. ret = drm_panel_add(&ctx->panel);
  329. if (ret < 0)
  330. goto err_free_backlight;
  331. return 0;
  332. err_free_backlight:
  333. if (ctx->backlight)
  334. put_device(&ctx->backlight->dev);
  335. return ret;
  336. }
  337. static int st7789v_remove(struct spi_device *spi)
  338. {
  339. struct st7789v *ctx = spi_get_drvdata(spi);
  340. drm_panel_detach(&ctx->panel);
  341. drm_panel_remove(&ctx->panel);
  342. if (ctx->backlight)
  343. put_device(&ctx->backlight->dev);
  344. return 0;
  345. }
  346. static const struct of_device_id st7789v_of_match[] = {
  347. { .compatible = "sitronix,st7789v" },
  348. { }
  349. };
  350. MODULE_DEVICE_TABLE(of, st7789v_of_match);
  351. static struct spi_driver st7789v_driver = {
  352. .probe = st7789v_probe,
  353. .remove = st7789v_remove,
  354. .driver = {
  355. .name = "st7789v",
  356. .of_match_table = st7789v_of_match,
  357. },
  358. };
  359. module_spi_driver(st7789v_driver);
  360. MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
  361. MODULE_DESCRIPTION("Sitronix st7789v LCD Driver");
  362. MODULE_LICENSE("GPL v2");