56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
/*
|
|
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
|
* Copyright (c) 2019 PHYTEC Messtechnik GmbH
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
|
|
|
|
/ {
|
|
chosen {
|
|
zephyr,display = &st7789v_st7789v_waveshare_240x240;
|
|
};
|
|
|
|
mipi_dbi_st7789v_waveshare_240x240 {
|
|
compatible = "zephyr,mipi-dbi-spi";
|
|
spi-dev = <&arduino_spi>;
|
|
dc-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>; /* D9 */
|
|
reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* D8 */
|
|
write-only;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
st7789v_st7789v_waveshare_240x240: st7789v@0 {
|
|
compatible = "sitronix,st7789v";
|
|
mipi-max-frequency = <20000000>;
|
|
reg = <0>;
|
|
width = <240>;
|
|
height = <240>;
|
|
x-offset = <0>;
|
|
y-offset = <0>;
|
|
vcom = <0x19>;
|
|
gctrl = <0x35>;
|
|
vrhs = <0x12>;
|
|
vdvs = <0x20>;
|
|
mdac = <0x00>;
|
|
gamma = <0x01>;
|
|
colmod = <0x05>;
|
|
lcm = <0x2c>;
|
|
porch-param = [0c 0c 00 33 33];
|
|
cmd2en-param = [5a 69 02 01];
|
|
pwctrl1-param = [a4 a1];
|
|
pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23];
|
|
nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23];
|
|
ram-param = [00 F0];
|
|
rgb-param = [CD 08 14];
|
|
mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&arduino_spi {
|
|
status = "okay";
|
|
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
|
|
};
|