diff --git a/app/boards/candlelightfd_stm32g0b1xx.overlay b/app/boards/candlelightfd_stm32g0b1xx.overlay new file mode 100644 index 0000000..57330e6 --- /dev/null +++ b/app/boards/candlelightfd_stm32g0b1xx.overlay @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 Henrik Brix Andersen + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counter2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan1>; + activity-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>, + <&gpioa 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&zephyr_udc0 { + gs_usb0: gs_usb0 { + compatible = "gs_usb"; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <59>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +}; diff --git a/app/boards/candlelightfd_stm32g0b1xx_dual.overlay b/app/boards/candlelightfd_stm32g0b1xx_dual.overlay new file mode 100644 index 0000000..aef3193 --- /dev/null +++ b/app/boards/candlelightfd_stm32g0b1xx_dual.overlay @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2024 Henrik Brix Andersen + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counter2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan1>; + /* Use RX LED for channel 0 state + activity */ + state-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>; + }; + + channel1 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan2>; + /* Use TX LED for channel 0 state + activity */ + state-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&zephyr_udc0 { + gs_usb0: gs_usb0 { + compatible = "gs_usb"; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <59>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +};