| /* |
| * Copyright (c) 2024 STMicroelectronics |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| /dts-v1/; |
| #include <st/c0/stm32c071Xb.dtsi> |
| #include <st/c0/stm32c071rbtx-pinctrl.dtsi> |
| #include "arduino_r3_connector.dtsi" |
| #include <zephyr/dt-bindings/input/input-event-codes.h> |
| |
| / { |
| model = "STMicroelectronics STM32C071RB-NUCLEO board"; |
| compatible = "st,stm32c071rb-nucleo"; |
| |
| chosen { |
| zephyr,console = &usart2; |
| zephyr,shell-uart = &usart2; |
| zephyr,sram = &sram0; |
| zephyr,flash = &flash0; |
| }; |
| |
| 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_HIGH>; |
| 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>; |
| status = "okay"; |
| zephyr,code = <INPUT_KEY_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; |
| }; |
| }; |
| |
| &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_BUS_APB1 0x00000400>, |
| <&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>; |
| }; |
| |
| &i2c2 { |
| pinctrl-0 = <&i2c2_scl_pa7 &i2c2_sda_pa6>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| clock-frequency = <I2C_BITRATE_FAST>; |
| }; |
| |
| &spi1 { |
| pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pb3 |
| &spi1_miso_pb4 &spi1_mosi_pb5>; |
| 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, 20U)>, |
| <&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"; |
| }; |