1/* 2 * Copyright (c) 2020 Brian Bradley <brian.bradley.p@gmail.com> 3 * Copyright (c) 2021 Kalyan Sriram <coder.kalyan@gmail.com> 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <st/f4/stm32f411Xe.dtsi> 10#include <st/f4/stm32f411c(c-e)ux-pinctrl.dtsi> 11 12/ { 13 model = "WeAct Studio Black Pill V2.0 Board"; 14 compatible = "weact,blackpill-f411ce"; 15 16 chosen { 17 zephyr,console = &usart1; 18 zephyr,shell-uart = &usart1; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 user_led: led { 26 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 27 label = "User LED"; 28 }; 29 }; 30 31 gpio_keys { 32 compatible = "gpio-keys"; 33 user_button: button { 34 label = "KEY"; 35 gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 36 }; 37 }; 38 39 aliases { 40 led0 = &user_led; 41 sw0 = &user_button; 42 }; 43}; 44 45&flash0 { 46 47 partitions { 48 compatible = "fixed-partitions"; 49 #address-cells = <1>; 50 #size-cells = <1>; 51 52 boot_partition: partition@0 { 53 label = "mcuboot"; 54 reg = <0x00000000 0x00008000>; 55 read-only; 56 }; 57 58 /* 59 * The flash starting at offset 0x00008000 and ending at 60 * offset 0x0001ffff (sectors 2 through 4) is reserved for 61 * use by the application. 62 */ 63 64 slot0_partition: partition@20000 { 65 label = "image-0"; 66 reg = <0x00020000 0x00020000>; 67 }; 68 slot1_partition: partition@40000 { 69 label = "image-1"; 70 reg = <0x00040000 0x00020000>; 71 }; 72 scratch_partition: partition@60000 { 73 label = "image-scratch"; 74 reg = <0x00060000 0x00020000>; 75 }; 76 }; 77}; 78 79&timers4 { 80 status = "okay"; 81 82 pwm4: pwm { 83 status = "okay"; 84 pinctrl-0 = <&tim4_ch1_pb6 &tim4_ch2_pb7>; 85 }; 86}; 87 88&usart1 { 89 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 90 status = "okay"; 91 current-speed = <115200>; 92}; 93 94&i2c1 { 95 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 96 status = "okay"; 97 clock-frequency = <I2C_BITRATE_FAST>; 98}; 99 100&spi1 { 101 pinctrl-0 = <&spi1_sck_pa5 &spi1_nss_pa4 102 &spi1_miso_pa6 &spi1_mosi_pa7>; 103 status = "okay"; 104}; 105 106&rtc { 107 status = "okay"; 108}; 109 110&usbotg_fs { 111 pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; 112 status = "okay"; 113}; 114 115&adc1 { 116 pinctrl-0 = <&adc1_in1_pa1>; 117 status = "okay"; 118}; 119 120&clk_hse { 121 clock-frequency = <DT_FREQ_M(25)>; 122 status = "okay"; 123}; 124 125&pll { 126 div-m = <25>; 127 mul-n = <192>; 128 div-p = <2>; 129 div-q = <4>; 130 clocks = <&clk_hse>; 131 status = "okay"; 132}; 133 134&rcc { 135 clocks = <&pll>; 136 clock-frequency = <DT_FREQ_M(96)>; 137 ahb-prescaler = <1>; 138 apb1-prescaler = <2>; 139 apb2-prescaler = <1>; 140}; 141