| /* | 
 |  * Copyright (c) 2025 STMicroelectronics | 
 |  * | 
 |  * SPDX-License-Identifier: Apache-2.0 | 
 |  */ | 
 |  | 
 | /dts-v1/; | 
 | #include <st/wb0/stm32wb07Xc.dtsi> | 
 | #include <st/wb0/stm32wb07ccvx-pinctrl.dtsi> | 
 | #include <zephyr/dt-bindings/input/input-event-codes.h> | 
 |  | 
 | #include "arduino_r3_connector.dtsi" | 
 |  | 
 | / { | 
 | 	model = "STMicroelectronics STM32WB07CC-NUCLEO board"; | 
 | 	compatible = "st,stm32wb07cc-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 0 (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"; | 
 |  | 
 | 		pwm_red_led_1: pwm_red_led_1 { | 
 | 			pwms = <&pwm1 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 9 (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"; | 
 | }; | 
 |  | 
 | &radio_timer { | 
 | 	status = "okay"; | 
 | }; | 
 |  | 
 | &usart1 { | 
 | 	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa8>; | 
 | 	pinctrl-names = "default"; | 
 | 	current-speed = <115200>; | 
 | 	status = "okay"; | 
 | }; | 
 |  | 
 | &i2c2 { | 
 | 	pinctrl-0 = <&i2c2_scl_pb6 &i2c2_sda_pb7>; | 
 | 	pinctrl-names = "default"; | 
 | 	status = "okay"; | 
 | }; | 
 |  | 
 | &spi2 { | 
 | 	pinctrl-0 = <&spi2_nss_pa4 &spi2_sck_pa5 &spi2_miso_pa7 &spi2_mosi_pa6>; | 
 | 	pinctrl-names = "default"; | 
 | 	status = "okay"; | 
 | 	/* Select 32MHz clock for SPI2 */ | 
 | 	clocks = <&rcc STM32_CLOCK(APB1, 12)>, | 
 | 		 <&rcc STM32_SRC_SYSCLK SPI2_I2S2_SEL(1)>; | 
 | }; | 
 |  | 
 | &timers1 { | 
 | 	status = "okay"; | 
 | 	st,prescaler = <10000>; | 
 |  | 
 | 	pwm1: pwm { | 
 | 		status = "okay"; | 
 | 		pinctrl-0 = <&tim1_ch3_pb2>; | 
 | 		pinctrl-names = "default"; | 
 | 	}; | 
 | }; | 
 |  | 
 | &rng { | 
 | 	status = "okay"; | 
 | }; | 
 |  | 
 | &flash0 { | 
 | 	partitions { | 
 | 		compatible = "fixed-partitions"; | 
 | 		#address-cells = <1>; | 
 | 		#size-cells = <1>; | 
 |  | 
 | 		/* Set aside 16KB of storage at the end of 256KB flash */ | 
 | 		storage_partition: partition@3c000 { | 
 | 			label = "storage"; | 
 | 			reg = <0x0003c000 DT_SIZE_K(16)>; | 
 | 		}; | 
 | 	}; | 
 | }; |