Skip to content

Commit bca3662

Browse files
MWPpelwell
authored andcommitted
overlays: Update crystalfontz-cfa050_pi_m for CM5
Update DT Overlay to support CFA050-PI-M with CM5. Signed-off-by: Mark Williams <[email protected]>
1 parent f2a0ca0 commit bca3662

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,11 +1081,12 @@ Params: cma-512 CMA is 512MB (needs 1GB)
10811081

10821082
Name: crystalfontz-cfa050_pi_m
10831083
Info: Configures the Crystalfontz CFA050-PI-M series of Raspberry Pi CM4
1084-
based modules using the CFA7201280A0_050Tx 7" TFT LCD displays,
1084+
and CM5 based modules using the CFA7201280A0_050Tx 7" TFT LCD displays,
10851085
with or without capacitive touch screen.
10861086
Requires use of vc4-kms-v3d.
10871087
Load: dtoverlay=crystalfontz-cfa050_pi_m,<param>=<val>
10881088
Params: captouch Enable capacitive touch display
1089+
cm5 Enable support for the Raspberry Pi CM5
10891090

10901091

10911092
Name: cutiepi-panel

arch/arm/boot/dts/overlays/crystalfontz-cfa050_pi_m-overlay.dts

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RaspberryPi CM4
1010
compatible = "brcm,bcm2835";
1111
// PCF8574 I2C GPIO EXPANDER
12-
fragment@0 {
12+
frag0: fragment@0 {
1313
target = <&i2c_csi_dsi>;
1414
__overlay__ {
1515
#address-cells = <1>;
@@ -27,7 +27,7 @@
2727
};
2828
};
2929
// LM3630a BACKLIGHT LED CONTROLLER
30-
fragment@1 {
30+
frag1: fragment@1 {
3131
target = <&i2c_csi_dsi>;
3232
__overlay__ {
3333
#address-cells = <1>;
@@ -42,14 +42,28 @@
4242
reg = <0>;
4343
led-sources = <0 1>;
4444
label = "lcd-backlight";
45-
default-brightness = <128>;
45+
default-brightness = <255>;
4646
max-brightness = <255>;
4747
};
4848
};
4949
};
5050
};
51+
// PCF85063A RTC on I2C
52+
frag2: fragment@2 {
53+
target = <&i2c_csi_dsi>;
54+
__overlay__ {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
status = "okay";
58+
pcf85063a@51 {
59+
compatible = "nxp,pcf85063a";
60+
reg = <0x51>;
61+
};
62+
};
63+
};
64+
5165
// CFAF7201280A0_050Tx TFT DSI PANEL
52-
fragment@2 {
66+
fragment@3 {
5367
target = <&dsi1>;
5468
__overlay__ {
5569
#address-cells = <1>;
@@ -75,50 +89,43 @@
7589
};
7690
};
7791
// rPI GPIO INPUT FOR TOUCH IC IRQ
78-
fragment@3 {
92+
fragment@4 {
7993
target = <&gpio>;
8094
__dormant__ {
8195
gt928intpins: gt928intpins {
82-
brcm,pins = <26>;
83-
brcm,function = <0>;
84-
brcm,pull = <1>;
96+
brcm,pins = <26>; //gpio pin
97+
brcm,function = <0>; //input
98+
brcm,pull = <2>; //2=pull-up
8599
};
86100
};
87101
};
88102
// GT928 TOUCH CONTROLLER IC
89-
fragment@4 {
103+
frag5: fragment@5 {
90104
target = <&i2c_csi_dsi>;
91105
__dormant__ {
92106
#address-cells = <1>;
93107
#size-cells = <0>;
94108
status = "okay";
95-
gt928@5d {
109+
gt928: gt928@5d {
96110
compatible = "goodix,gt928";
97111
reg = <0x5d>;
98112
interrupt-parent = <&gpio>;
99-
interrupts = <26 2>;
100-
irq-gpios = <&gpio 26 0>;
113+
interrupts = <26 2>; //gpio 26, 2=high-to-low trigger
114+
irq-gpios = <&gpio 26 0>; //gpio 26, 0=active-high
101115
reset-gpios = <&pcf8574a 1 1>;
102116
touchscreen-inverted-x;
103117
touchscreen-inverted-y;
104118
};
105119
};
106120
};
107-
// PCF85063A RTC on I2C
108-
fragment@5 {
109-
target = <&i2c_csi_dsi>;
110-
__overlay__ {
111-
#address-cells = <1>;
112-
#size-cells = <0>;
113-
status = "okay";
114-
pcf85063a@51 {
115-
compatible = "nxp,pcf85063a";
116-
reg = <0x51>;
117-
};
118-
};
119-
};
120-
// CAPACITIVE TOUCH OPTION FOR TFT PANEL
121+
//OVERLAY OPTIONS
121122
__overrides__ {
122-
captouch = <0>,"+3+4";
123+
//enables captouch
124+
captouch = <0>,"+4+5";
125+
//changes options to support CM5 (default is CM4)
126+
cm5 = <&frag0>, "target:0=",<&i2c_csi_dsi0>,
127+
<&frag1>, "target:0=",<&i2c_csi_dsi0>,
128+
<&frag2>, "target:0=",<&i2c_csi_dsi0>,
129+
<&frag5>, "target:0=",<&i2c_csi_dsi0>;
123130
};
124131
};

0 commit comments

Comments
 (0)