-
Notifications
You must be signed in to change notification settings - Fork 4
/
rpi-epd-overlay.dts
90 lines (82 loc) · 1.53 KB
/
rpi-epd-overlay.dts
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
88
89
90
/*
* Device Tree overlay for epd module for raspberry-pi
*/
/dts-v1/;
/plugin/; /* allow undefined label references */
/ {
compatible = "brcm,bcm2835", "bcrm,bcm2708";
/* enable pwm */
fragment@0 {
target = <&soc>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
pwm: pwm@7e20c000 {
compatible = "brcm,bcm2835-pwm";
reg = <0x7e20c000 0x28>;
clocks = <&clk_pwm>;
#pwm-cells = <2>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpiopwm>;
};
};
};
/* configure pwm gpios */
fragment@1 {
target = <&gpio>;
__overlay__ {
gpiopwm: pwm {
brcm,pins = <18>;
brcm,function = <2>;
};
};
};
/* disable spidev and add enable epd driver */
fragment@2 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
status = "disabled";
};
epd@0{
compatible = "prvdsp,g1-epd";
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <12000000>;
status = "okay";
pwms = <&pwm 0 5000000>;
panel_on-gpios = <&gpio 22 0>;
reset-gpios = <&gpio 24 0>;
border-gpios = <&gpio 14 0>;
busy-gpios = <&gpio 17 0>;
discharge-gpios = <&gpio 23 0>;
};
};
};
/* enable i2c */
fragment@3 {
target = <&i2c0>;
__overlay__ {
status = "okay";
};
};
/* enable i2c */
fragment@4 {
target = <&i2c1>;
__overlay__ {
status = "okay";
};
};
/* enable i2c */
fragment@5 {
target = <&i2c2>;
__overlay__ {
status = "okay";
};
};
};