1/*
2 * Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
7
8/ {
9	chosen {
10		zephyr,display = &st7789v_st7789v_tl019fqv01;
11	};
12
13	mipi_dbi_st7789v_tl019fqv01 {
14		compatible = "zephyr,mipi-dbi-spi";
15		spi-dev = <&arduino_spi>;
16		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;	/* D9 */
17		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
18		write-only;
19		#address-cells = <1>;
20		#size-cells = <0>;
21
22		st7789v_st7789v_tl019fqv01: st7789v@0 {
23			compatible = "sitronix,st7789v";
24			mipi-max-frequency = <20000000>;
25			reg = <0>;
26			width = <320>;
27			height = <170>;
28			x-offset = <0>;
29			y-offset = <35>;
30			vcom = <0x2b>;
31			gctrl = <0x35>;
32			vrhs = <0x0f>;
33			vdvs = <0x20>;
34			mdac = <0x60>;
35			gamma = <0x01>;
36			colmod = <0x55>;
37			lcm = <0x2c>;
38			porch-param = [0c 0c 00 33 33];
39			cmd2en-param = [5a 69 02 01];
40			pwctrl1-param = [52 a1];
41			pvgam-param = [D0 00 02 07 0B 1A 31 54 40 29 12 12 12 17];
42			nvgam-param = [D0 00 02 07 05 15 2D 44 44 1C 18 16 1C 1D];
43			ram-param = [00 F8];
44			rgb-param = [CD 08 14];
45			mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>;
46		};
47	};
48};
49
50&arduino_spi {
51	status = "okay";
52	cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>;	/* D10 */
53};
54