blob: 63c88eb088114d278a003d5f22723ed26d4f24e0 [file] [log] [blame]
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/wb0/stm32wb05Xz.dtsi>
#include <st/wb0/stm32wb05kzvx-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "arduino_r3_connector.dtsi"
/ {
model = "STMicroelectronics STM32WB05KZ-NUCLEO board";
compatible = "st,stm32wb05kz-nucleo";
#address-cells = <1>;
#size-cells = <1>;
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,bt-c2h-uart = &usart1;
zephyr,entropy = &rng;
};
leds: leds {
compatible ="gpio-leds";
blue_led_1: led_0 {
gpios = <&gpiob 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
green_led_1: led_1 {
gpios = <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
red_led_1: led_2 {
gpios = <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
pwmleds: pwmleds {
compatible = "pwm-leds";
status = "okay";
pwm_red_led_1: pwm_led_1 {
pwms = <&pwm2 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_1: button_0 {
label = "SW1";
gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_0>;
};
user_button_2: button_1 {
label = "SW2";
gpios = <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_1>;
};
user_button_3: button_2 {
label = "SW3";
gpios = <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_2>;
};
};
aliases {
rtc = &rtc;
led0 = &blue_led_1;
led1 = &green_led_1;
led2 = &red_led_1;
pwm-led0 = &pwm_red_led_1;
sw0 = &user_button_1;
sw1 = &user_button_2;
sw2 = &user_button_3;
watchdog0 = &iwdg;
};
};
&pwrc {
smps-mode = "RUN";
smps-bom = <3>;
};
&clk_lse {
status = "okay";
};
&clk_hse {
status = "okay";
};
&clk_hsi {
status = "okay";
};
&pll {
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(64)>;
clksys-prescaler = <1>;
slow-clock = <&clk_lse>;
};
&rtc {
/**
* STM32_SRC_LSE reflects the "slow-clock" selected on RCC node.
* NO_SEL reflects STM32WB0's lack of RTC clock mux to configure.
*/
clocks = <&rcc STM32_CLOCK(APB0, 12)>,
<&rcc STM32_SRC_LSE NO_SEL>;
status = "okay";
};
&iwdg {
status = "okay";
};
&bt_hci_wb0 {
status = "okay";
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa1 &usart1_rx_pb0>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
pinctrl-names = "default";
status = "okay";
};
&spi3 {
pinctrl-0 = <&spi3_nss_pa9 &spi3_sck_pb3 &spi3_miso_pa8 &spi3_mosi_pa11>;
pinctrl-names = "default";
status = "okay";
/* Select 64MHz clock for SPI3 */
clocks = <&rcc STM32_CLOCK_BUS_APB1 (1 << 14)>,
<&rcc STM32_SRC_SYSCLK SPI3_I2S3_SEL(3)>;
};
&timers2 {
status = "okay";
st,prescaler = <10000>;
pwm2: pwm {
/* PWM on red_led_1 */
pinctrl-0 = <&tim2_ch3_pb2>;
pinctrl-names = "default";
status = "okay";
};
};
&rng {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Set 8KB of storage at the end of 192KB flash */
storage_partition: partition@2e000 {
label = "storage";
reg = <0x0002e000 DT_SIZE_K(8)>;
};
};
};