-
Notifications
You must be signed in to change notification settings - Fork 0
/
nrf52840dongle_nrf52840.overlay
87 lines (75 loc) · 1.8 KB
/
nrf52840dongle_nrf52840.overlay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* Copyright (c) 2019, Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "nrf52-bindings.h"
&spi0 { /* MOSI on D11 / P1.13 */
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <SPI_FREQ>;
/* WS2812 */
chain-length = <68>; /* arbitrary; change at will */
spi-one-frame = <ONE_FRAME>;
spi-zero-frame = <ZERO_FRAME>;
};
};
/ {
aliases {
led-strip = &led_strip;
};
};
// &spi2 {
// compatible = "nordic,nrf-spi";
// status = "okay";
// sck-pin = <19>;
// mosi-pin = <20>;
// miso-pin = <21>;
// };
// &spi1 {
// compatible = "nordic,nrf-spi";
// status = "okay";
// sck-pin = <31>;
// mosi-pin = <30>;
// miso-pin = <40>;
// };
/*
* pin_no = PORT\*32 + PIN
* where a and b are from the Pin value in the table (Pb.a). For example, for P0.1, pin_no = 1 and for P1.0, pin_no = 32
*/
&spi1 {
status = "okay";
// cs-gpios = <&arduino_header 21 GPIO_ACTIVE_LOW>; /* D10 */
//cs-gpios = <&gpio0 22 0>;
st7789v@0 {
compatible = "sitronix,st7789v";
//label = "ST7789V";
label = "DISPLAY";
spi-max-frequency = <2000000>; //4000000 //10000000
reg = <0>;
cmd-data-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; /* p1.11 */
reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* P1.10 */
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];
};
};