Skip to content

Commit 76dbac2

Browse files
app: boards: add support for the candlelightFD board
Add support for the candlelightFD board from Linux Automation. The board optionally supports a second CAN channel, but only provides two LEDs (RX/TX) in total. To work around this limitation, the "dual" configuration uses the RX LED for channel 0 state/activity, and the TX LED for channel 1 state/activity. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
1 parent 6d28c14 commit 76dbac2

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2024 Henrik Brix Andersen <henrik@brixandersen.dk>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/gpio.h>
8+
9+
/ {
10+
cannectivity: cannectivity {
11+
compatible = "cannectivity";
12+
timestamp-counter = <&counter2>;
13+
14+
channel0 {
15+
compatible = "cannectivity-channel";
16+
can-controller = <&fdcan1>;
17+
activity-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>,
18+
<&gpioa 4 GPIO_ACTIVE_LOW>;
19+
};
20+
};
21+
};
22+
23+
&zephyr_udc0 {
24+
gs_usb0: gs_usb0 {
25+
compatible = "gs_usb";
26+
};
27+
};
28+
29+
&timers2 {
30+
status = "okay";
31+
st,prescaler = <59>;
32+
33+
counter2: counter2 {
34+
compatible = "st,stm32-counter";
35+
status = "okay";
36+
};
37+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2024 Henrik Brix Andersen <henrik@brixandersen.dk>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_USB_DEVICE_GS_USB_MAX_CHANNELS=2
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (c) 2024 Henrik Brix Andersen <henrik@brixandersen.dk>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/gpio.h>
8+
9+
/ {
10+
cannectivity: cannectivity {
11+
compatible = "cannectivity";
12+
timestamp-counter = <&counter2>;
13+
14+
channel0 {
15+
compatible = "cannectivity-channel";
16+
can-controller = <&fdcan1>;
17+
/* Use RX LED for channel 0 state + activity */
18+
state-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>;
19+
};
20+
21+
channel1 {
22+
compatible = "cannectivity-channel";
23+
can-controller = <&fdcan2>;
24+
/* Use TX LED for channel 0 state + activity */
25+
state-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>;
26+
};
27+
};
28+
};
29+
30+
&zephyr_udc0 {
31+
gs_usb0: gs_usb0 {
32+
compatible = "gs_usb";
33+
};
34+
};
35+
36+
&timers2 {
37+
status = "okay";
38+
st,prescaler = <59>;
39+
40+
counter2: counter2 {
41+
compatible = "st,stm32-counter";
42+
status = "okay";
43+
};
44+
};

0 commit comments

Comments
 (0)