Skip to content

Commit 1274474

Browse files
Penk Chenpelwell
authored andcommitted
Add panel overlay for CutiePi
Signed-off-by: Penk Chen <penk@cutiepi.io>
1 parent f9ae7bc commit 1274474

4 files changed

Lines changed: 128 additions & 0 deletions

File tree

‎arch/arm/boot/dts/overlays/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
3434
cap1106.dtbo \
3535
chipdip-dac.dtbo \
3636
cma.dtbo \
37+
cutiepi-panel.dtbo \
3738
dht11.dtbo \
3839
dionaudio-loco.dtbo \
3940
dionaudio-loco-v2.dtbo \

‎arch/arm/boot/dts/overlays/README‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,12 @@ Params: cma-512 CMA is 512MB (needs 1GB)
679679
cma-default Use upstream's default value
680680

681681

682+
Name: cutiepi-panel
683+
Info: 8" TFT LCD display and touch panel used by cutiepi.io
684+
Load: dtoverlay=cutiepi-panel
685+
Params: <None>
686+
687+
682688
Name: dht11
683689
Info: Overlay for the DHT11/DHT21/DHT22 humidity/temperature sensors
684690
Also sometimes found with the part number(s) AM230x.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/ {
5+
compatible = "brcm,bcm2711";
6+
7+
fragment@0 {
8+
target=<&dsi1>;
9+
10+
__overlay__ {
11+
status = "okay";
12+
13+
#address-cells = <1>;
14+
#size-cells = <0>;
15+
16+
port {
17+
dsi1_out_port: endpoint {
18+
remote-endpoint = <&panel_dsi_in1>;
19+
};
20+
};
21+
22+
display1: panel@0 {
23+
compatible = "nwe,nwe080";
24+
reg=<0>;
25+
backlight = <&rpi_backlight>;
26+
reset-gpios = <&gpio 20 0>;
27+
port {
28+
panel_dsi_in1: endpoint {
29+
remote-endpoint = <&dsi1_out_port>;
30+
};
31+
};
32+
};
33+
};
34+
};
35+
36+
fragment@1 {
37+
target = <&gpio>;
38+
__overlay__ {
39+
pwm_pins: pwm_pins {
40+
brcm,pins = <12>;
41+
brcm,function = <4>; // ALT0
42+
};
43+
};
44+
};
45+
46+
fragment@2 {
47+
target = <&pwm>;
48+
frag1: __overlay__ {
49+
pinctrl-names = "default";
50+
pinctrl-0 = <&pwm_pins>;
51+
assigned-clock-rates = <1000000>;
52+
status = "okay";
53+
};
54+
};
55+
56+
fragment@3 {
57+
target-path = "/";
58+
__overlay__ {
59+
rpi_backlight: rpi_backlight {
60+
compatible = "pwm-backlight";
61+
brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;
62+
default-brightness-level = <6>;
63+
pwms = <&pwm 0 200000>;
64+
power-supply = <&vdd_3v3_reg>;
65+
status = "okay";
66+
};
67+
};
68+
};
69+
70+
fragment@4 {
71+
target = <&i2c6>;
72+
frag0: __overlay__ {
73+
status = "okay";
74+
pinctrl-names = "default";
75+
pinctrl-0 = <&i2c6_pins>;
76+
clock-frequency = <100000>;
77+
};
78+
};
79+
80+
fragment@5 {
81+
target = <&i2c6_pins>;
82+
__overlay__ {
83+
brcm,pins = <22 23>;
84+
};
85+
};
86+
87+
fragment@6 {
88+
target = <&gpio>;
89+
__overlay__ {
90+
goodix_pins: goodix_pins {
91+
brcm,pins = <21 26>; // interrupt and reset
92+
brcm,function = <0 0>; // in
93+
brcm,pull = <2 2>; // pull-up
94+
};
95+
};
96+
};
97+
98+
fragment@7 {
99+
target = <&i2c6>;
100+
__overlay__ {
101+
#address-cells = <1>;
102+
#size-cells = <0>;
103+
status = "okay";
104+
105+
gt9xx: gt9xx@5d {
106+
compatible = "goodix,gt9271";
107+
reg = <0x5D>;
108+
pinctrl-names = "default";
109+
pinctrl-0 = <&goodix_pins>;
110+
interrupt-parent = <&gpio>;
111+
interrupts = <21 2>; // high-to-low edge triggered
112+
irq-gpios = <&gpio 21 0>;
113+
reset-gpios = <&gpio 26 0>;
114+
};
115+
};
116+
};
117+
};

‎arch/arm/boot/dts/overlays/overlay_map.dts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
deprecated = "use i2c-sensor,bmp085";
66
};
77

8+
cutiepi-panel {
9+
bcm2711;
10+
};
11+
812
highperi {
913
bcm2711;
1014
};

0 commit comments

Comments
 (0)