blob: d3bf59e195b4e791c3d264161bbf528e3c83b80b [file] [log] [blame]
/*
* Copyright (c) 2024 STMicroelectronics
* Copyright (c) 2025 Thomas Stranger
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/c0/stm32c092Xc.dtsi>
#include <st/c0/stm32c092rctx-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "STMicroelectronics STM32C092RC-NUCLEO board";
compatible = "st,stm32c092rc-nucleo";
chosen {
zephyr,console = &usart2;
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,canbus = &fdcan1;
};
leds: leds {
compatible = "gpio-leds";
green_led_1: led_1 {
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
label = "User LD1";
};
blue_led: led_2 {
gpios = <&gpioc 9 GPIO_ACTIVE_LOW>;
label = "User LD2";
};
};
pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
gpio_keys {
compatible = "gpio-keys";
user_button: button {
label = "user button";
gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
status = "okay";
zephyr,code = <INPUT_KEY_0>;
};
};
transceiver0: can-phy0 {
compatible = "microchip,mcp2562fd", "can-transceiver-gpio";
standby-gpios = <&gpiod 2 GPIO_ACTIVE_HIGH>;
max-bitrate = <5000000>;
#phy-cells = <0>;
};
aliases {
led0 = &green_led_1;
led1 = &blue_led;
pwm-led0 = &green_pwm_led;
sw0 = &user_button;
watchdog0 = &iwdg;
die-temp0 = &die_temp;
volt-sensor0 = &vref;
};
};
&pwr {
wkup-pin@2 {
reg = <0x2>;
wkup-gpios = <&gpioc 13 STM32_PWR_WKUP_PIN_NOT_MUXED>;
};
wkup-pin@5 {
reg = <0x5>;
wkup-gpios = <&gpioc 5 STM32_PWR_WKUP_PIN_NOT_MUXED>;
};
wkup-pin@6 {
reg = <0x6>;
wkup-gpios = <&gpiob 5 STM32_PWR_WKUP_PIN_NOT_MUXED>;
};
};
&clk_lse {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(48)>;
status = "okay";
};
&clk_hsi {
status = "okay";
};
&rcc {
clocks = <&clk_hse>;
clock-frequency = <DT_FREQ_M(48)>;
ahb-prescaler = <1>;
apb1-prescaler = <1>;
};
&usart1 {
pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&usart2 {
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&rtc {
clocks = <&rcc STM32_CLOCK(APB1, 10)>,
<&rcc STM32_SRC_LSE RTC_SEL(1)>;
status = "okay";
};
&iwdg {
status = "okay";
};
&timers1 {
st,prescaler = <10000>;
status = "okay";
pwm1: pwm {
pinctrl-0 = <&tim1_ch1_pa5>;
pinctrl-names = "default";
status = "okay";
};
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};
&spi1 {
/* Note: PA5 is shared with green led0 */
pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pa5
&spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
status = "okay";
};
&adc1 {
pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1 &adc1_in4_pa4>;
pinctrl-names = "default";
st,adc-clock-source = "ASYNC";
clocks = <&rcc STM32_CLOCK(APB1_2, 20)>,
<&rcc STM32_SRC_HSI ADC_SEL(2)>;
st,adc-prescaler = <4>;
status = "okay";
vref-mv = <3300>;
};
&die_temp {
status = "okay";
};
&vref {
status = "okay";
};
&dma1 {
status = "okay";
};
&dmamux1 {
status = "okay";
};
/* Make sure SB11, SB12, and SB13 are closed (default configuration).
* Close JP9 to enable 120 Ohm termination on the board.
*/
&fdcan1 {
clocks = <&rcc STM32_CLOCK(APB1, 12)>,
<&rcc STM32_SRC_HSE FDCAN_SEL(2)>;
pinctrl-0 = <&fdcan1_rx_pd0 &fdcan1_tx_pd1>;
pinctrl-names = "default";
phys = <&transceiver0>;
status = "okay";
};