Skip to content

Commit 256d6b4

Browse files
zjzhao-edapelwell
authored andcommitted
overlays: ed-ipc: Add EDATEC IPC/EXP unified board overlay
Add a new overlay for EDATEC IPC/EXP series industrial PC carrier boards. This overlay configures PCA9535 GPIO expanders on both i2c_csi_dsi and i2c_arm buses, with support for multiple board profiles (IPC2100, IPC2300, IPC3100, IPC3300, PLC2010, etc.) and optional expansion modules (exp8x8y, exp4x4y). Signed-off-by: zjzhao <zjzhao@edatec.cn>
1 parent a96eaa6 commit 256d6b4

3 files changed

Lines changed: 333 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
@@ -63,6 +63,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
6363
draws-pi5.dtbo \
6464
dwc-otg-deprecated.dtbo \
6565
dwc2.dtbo \
66+
ed-ipc.dtbo \
6667
edt-ft5406.dtbo \
6768
enc28j60.dtbo \
6869
enc28j60-spi2.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,59 @@ Params: dr_mode Dual role mode: "host", "peripheral" or "otg"
12781278
mode
12791279

12801280

1281+
Name: ed-ipc
1282+
Info: Configures the EDATEC IPC/EXP series hardware peripherals.
1283+
This overlay provides support for PCA9535 GPIO expanders on
1284+
the EDATEC industrial PC carrier boards, including interrupt
1285+
handling, GPIO line names, and optional secondary expander
1286+
on i2c_arm.
1287+
Load: dtoverlay=ed-ipc,<param>=<val>
1288+
Params: addr I2C address for primary PCA9535 GPIO expander
1289+
(default 0x20)
1290+
1291+
exp_addr I2C address for secondary PCA9535 GPIO
1292+
expander on i2c_arm (default 0x27)
1293+
1294+
ipc3100 Enable configuration for IPC3100 board
1295+
(CM5, i2c_csi_dsi0, PCA int GPIO6)
1296+
1297+
ipc2100 Enable configuration for IPC2100 board
1298+
(CM4, i2c_csi_dsi, PCA int GPIO6)
1299+
1300+
ipc2210 Enable configuration for IPC2210 board
1301+
(CM4, i2c_csi_dsi, PCA int GPIO6)
1302+
1303+
ipc3210 Enable configuration for IPC3210 board
1304+
(CM5, i2c_csi_dsi0, PCA int GPIO6)
1305+
1306+
ipc1200 Enable configuration for IPC1200 board
1307+
(CM4, i2c_csi_dsi, PCA int GPIO15)
1308+
1309+
ipc3300 Enable configuration for IPC3300 board
1310+
(CM5, i2c_arm, PCA int GPIO38)
1311+
1312+
ipc2300 Enable configuration for IPC2300 board
1313+
(CM4, i2c_arm, PCA int GPIO44)
1314+
1315+
plc2010 Enable configuration for PLC2010 board
1316+
(i2c_arm, PCA int GPIO7, addr 0x21)
1317+
1318+
exp8x8y Enable 8-input/8-output expansion module
1319+
(CM5, i2c_arm)
1320+
1321+
exp4x4y Enable 4-input/4-output expansion module
1322+
(CM5, i2c_arm, exp at addr 0x21)
1323+
1324+
ipc3600 Enable combined configuration for IPC3600
1325+
(IPC3100 + exp8x8y)
1326+
1327+
ipc2600 Enable combined configuration for IPC2600
1328+
(IPC2100 + exp8x8y)
1329+
1330+
ipc1220 Enable combined configuration for IPC1220
1331+
(IPC1200 + exp4x4y)
1332+
1333+
12811334
[ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
12821335

12831336

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
/*
2+
* EDATEC IPC/EXP unified board overlay
3+
*/
4+
/dts-v1/;
5+
/plugin/;
6+
7+
/ {
8+
compatible = "brcm,bcm2835";
9+
i2c_frag: fragment@0 {
10+
target = <&i2c_csi_dsi0>;
11+
__dormant__ {
12+
#address-cells = <1>;
13+
#size-cells = <0>;
14+
status = "okay";
15+
16+
pca_base: pca@20 {
17+
compatible = "nxp,pca9535";
18+
reg = <0x20>;
19+
gpio-controller;
20+
#gpio-cells = <2>;
21+
status = "okay";
22+
};
23+
};
24+
};
25+
26+
fragment@100 {
27+
target = <&i2c0if>;
28+
__overlay__ {
29+
status = "okay";
30+
};
31+
};
32+
33+
fragment@101 {
34+
target = <&i2c0mux>;
35+
__overlay__ {
36+
status = "okay";
37+
};
38+
};
39+
40+
fragment@200 {
41+
target = <&pca_base>;
42+
__dormant__ {
43+
gpio-line-names = "5V_GOOD", "LVD", "BUZZER_EN",
44+
"4G_RST", "4G_LED", "USER_LED";
45+
};
46+
};
47+
48+
fragment@201 {
49+
target = <&pca_base>;
50+
__dormant__ {
51+
gpio-line-names = "5V_GOOD", "LVD", "BUZZER_EN",
52+
"4G_RST", "4G_LED", "5G_RST",
53+
"5G_PWR_ON", "USER_LED",
54+
"MSATA_PRSNT";
55+
};
56+
};
57+
58+
fragment@203 {
59+
target = <&pca_base>;
60+
__dormant__ {
61+
gpio-line-names = "BL_EN_L", "BL_BTN_EN", "BL_BTN_UP",
62+
"BL_BTN_DOWN", "BUZZER_EN",
63+
"4G_RST", "MSATA_PRSNT", "FAN_EN",
64+
"NC", "NC", "NC", "NC",
65+
"NC", "NC", "NC", "PANEL_ON_L";
66+
};
67+
};
68+
69+
fragment@205 {
70+
target = <&pca_base>;
71+
__dormant__ {
72+
gpio-line-names = "USB_RST", "WK_RST", "4G_PWR",
73+
"4G_RST", "4G_BOOT",
74+
"4G_LED_REG_RED", "4G_LED_REG_GED",
75+
"4G_LED_SIG_RED", "4G_LED_SIG_GED",
76+
"USER_LED_RED", "USER_LED_GED",
77+
"LCD_RST", "4G_PRESENT",
78+
"IOB1_PRESENT", "IOB2_PRESENT";
79+
};
80+
};
81+
82+
fragment@206 {
83+
target = <&pca_base>;
84+
__dormant__ {
85+
gpio-line-names = "4G_RST", "LED_ERR", "LED_UPDATE",
86+
"LED_UDISK_BUSY", "LED_4G_EXP",
87+
"LED_UDISK_DET",
88+
"SW_FACTORY_RST", "SW_IP_ADDR_RST",
89+
"SW_START_STOP", "SW_APP_IMPORT",
90+
"SW_UDISK_REMOVE";
91+
};
92+
};
93+
94+
fragment@210 {
95+
target = <&pca_base>;
96+
__dormant__ {
97+
interrupt-parent = <&gpio>;
98+
interrupts = <6 2>; /* IRQ_TYPE_EDGE_FALLING */
99+
pinctrl-names = "default";
100+
pinctrl-0 = <&pca_irq6>;
101+
};
102+
};
103+
104+
fragment@212 {
105+
target = <&pca_base>;
106+
__dormant__ {
107+
interrupt-parent = <&gpio>;
108+
interrupts = <38 2>; /* IPC2300 CM5 */
109+
pinctrl-names = "default";
110+
pinctrl-0 = <&pca_irq38>;
111+
};
112+
};
113+
114+
fragment@213 {
115+
target = <&pca_base>;
116+
__dormant__ {
117+
interrupt-parent = <&gpio>;
118+
interrupts = <44 2>; /* IPC2300 CM4 */
119+
pinctrl-names = "default";
120+
pinctrl-0 = <&pca_irq44>;
121+
};
122+
};
123+
124+
fragment@214 {
125+
target = <&pca_base>;
126+
__dormant__ {
127+
interrupt-parent = <&gpio>;
128+
interrupts = <7 2>; /* PLC2010 */
129+
pinctrl-names = "default";
130+
pinctrl-0 = <&pca_irq7>;
131+
};
132+
};
133+
134+
fragment@310 {
135+
target = <&gpio>;
136+
__dormant__ {
137+
pca_irq6: pca_irq6 {
138+
brcm,pins = <6>;
139+
brcm,function = <0>; /* input */
140+
};
141+
};
142+
};
143+
144+
fragment@312 {
145+
target = <&gpio>;
146+
__dormant__ {
147+
pca_irq38: pca_irq38 {
148+
brcm,pins = <38>;
149+
brcm,function = <0>; /* input */
150+
};
151+
};
152+
};
153+
154+
fragment@313 {
155+
target = <&gpio>;
156+
__dormant__ {
157+
pca_irq44: pca_irq44 {
158+
brcm,pins = <44>;
159+
brcm,function = <0>; /* input */
160+
};
161+
};
162+
};
163+
164+
fragment@314 {
165+
target = <&gpio>;
166+
__dormant__ {
167+
pca_irq7: pca_irq7 {
168+
brcm,pins = <7>;
169+
brcm,function = <0>; /* input */
170+
};
171+
};
172+
};
173+
174+
fragment@400 {
175+
target = <&i2c_arm>;
176+
__dormant__ {
177+
#address-cells = <1>;
178+
#size-cells = <0>;
179+
status = "okay";
180+
181+
pca_exp: pca@27 {
182+
compatible = "nxp,pca9535";
183+
reg = <0x27>;
184+
gpio-controller;
185+
#gpio-cells = <2>;
186+
status = "okay";
187+
};
188+
};
189+
};
190+
191+
fragment@500 {
192+
target = <&pca_exp>;
193+
__dormant__ {
194+
gpio-line-names = "DI0", "DI1", "DI2", "DI3",
195+
"DI4", "DI5", "DI6", "DI7",
196+
"DO0", "DO1", "DO2", "DO3",
197+
"DO4", "DO5", "DO6", "DO7";
198+
};
199+
};
200+
201+
fragment@501 {
202+
target = <&pca_exp>;
203+
__dormant__ {
204+
gpio-line-names = "DI4", "DI5", "DI6", "DI7",
205+
"DO4", "DO5", "DO6", "DO7",
206+
"NC", "NC", "NC", "NC",
207+
"NC", "NC", "NC", "NC";
208+
};
209+
};
210+
211+
fragment@410 {
212+
target = <&pca_exp>;
213+
__dormant__ {
214+
interrupt-parent = <&gpio>;
215+
interrupts = <10 2>; /* EXP8X8Y */
216+
pinctrl-names = "default";
217+
pinctrl-0 = <&pca_irq10>;
218+
};
219+
};
220+
221+
fragment@411 {
222+
target = <&pca_exp>;
223+
__dormant__ {
224+
interrupt-parent = <&gpio>;
225+
interrupts = <4 2>; /* EXP4X4Y */
226+
pinctrl-names = "default";
227+
pinctrl-0 = <&pca_irq4>;
228+
};
229+
};
230+
231+
fragment@510 {
232+
target = <&gpio>;
233+
__dormant__ {
234+
pca_irq10: pca_irq10 {
235+
brcm,pins = <10>;
236+
brcm,function = <0>; /* input */
237+
};
238+
};
239+
};
240+
241+
fragment@511 {
242+
target = <&gpio>;
243+
__dormant__ {
244+
pca_irq4: pca_irq4 {
245+
brcm,pins = <4>;
246+
brcm,function = <0>; /* input */
247+
};
248+
};
249+
};
250+
251+
__overrides__ {
252+
addr = <&pca_base>, "reg:0";
253+
exp_addr = <&pca_exp>, "reg:0";
254+
ipc3100 = <0>, "+0+200+210+310";
255+
ipc2100 = <0>, "+0+200+210+310",
256+
<&i2c_frag>, "target:0=", <&i2c_csi_dsi>;
257+
ipc2210 = <0>, "+0+201+210+310",
258+
<&i2c_frag>, "target:0=", <&i2c_csi_dsi>;
259+
ipc3210 = <0>, "+0+201+210+310";
260+
ipc1200 = <0>, "+0+205",
261+
<&i2c_frag>, "target:0=", <&i2c_csi_dsi>;
262+
ipc3300 = <0>, "+0+203+212+312",
263+
<&i2c_frag>, "target:0=", <&i2c_arm>;
264+
ipc2300 = <0>, "+0+203+213+313",
265+
<&i2c_frag>, "target:0=", <&i2c_arm>;
266+
plc2010 = <0>, "+0+206+214+314",
267+
<&i2c_frag>, "target:0=", <&i2c_arm>,
268+
<&pca_base>, "reg:0=", <0x21>;
269+
exp8x8y = <0>, "+400+500+410+510"; /* default CM5 */
270+
exp4x4y = <0>, "+400+501+411+511",
271+
<&pca_exp>, "reg:0=", <0x21>; /* default CM5 */
272+
ipc3600 = <0>, "+0+200+210+310+400+500+410+510";
273+
ipc2600 = <0>, "+0+200+210+310+400+500+410+510",
274+
<&i2c_frag>, "target:0=", <&i2c_csi_dsi>;
275+
ipc1220 = <0>, "+0+205+400+501+411+511",
276+
<&i2c_frag>, "target:0=", <&i2c_csi_dsi>,
277+
<&pca_exp>, "reg:0=", <0x21>;
278+
};
279+
};

0 commit comments

Comments
 (0)